Difference between revisions of "War Mode (SourceMod)"

From AlliedModders Wiki
Jump to: navigation, search
(New page: SourceMod does not have a "war mode" built-in. Instead, it has options that let you lock-down SourceMod to only keep a few plugins loaded. Matches can be completed without SourceMod inte...)
 
Line 1: Line 1:
 +
__FORCETOC__
 +
 
SourceMod does not have a "war mode" built-in.  Instead, it has options that let you lock-down SourceMod to only keep a few plugins loaded.  Matches can be completed without SourceMod interfering, and once done, SourceMod can be "unlocked" again.  You can still retain administrative control.
 
SourceMod does not have a "war mode" built-in.  Instead, it has options that let you lock-down SourceMod to only keep a few plugins loaded.  Matches can be completed without SourceMod interfering, and once done, SourceMod can be "unlocked" again.  You can still retain administrative control.
  
 +
 +
=Safe Plugins=
 
There are a few plugins that are absolutely safe to use for matches.  They are:
 
There are a few plugins that are absolutely safe to use for matches.  They are:
 
*<tt>adminhelp.smx</tt> - Provides the <tt>sm_help</tt> command.
 
*<tt>adminhelp.smx</tt> - Provides the <tt>sm_help</tt> command.
Line 8: Line 12:
 
*<tt>basecommands.smx</tt> - General, non-abusive admin commands.  [[Admin_Commands_%28SourceMod%29#Basic Commands|Click here]] for command listing.
 
*<tt>basecommands.smx</tt> - General, non-abusive admin commands.  [[Admin_Commands_%28SourceMod%29#Basic Commands|Click here]] for command listing.
  
 +
=War Mode Configs=
 
Implementing warmode is very simple.  Two sample configs are provided as <tt>cfg/sourcemod/sm_warmode_on.cfg</tt> and <tt>cfg/sourcemod/sm_warmode_off.cfg</tt>.   
 
Implementing warmode is very simple.  Two sample configs are provided as <tt>cfg/sourcemod/sm_warmode_on.cfg</tt> and <tt>cfg/sourcemod/sm_warmode_off.cfg</tt>.   
  
Line 19: Line 24:
 
You can simply use <tt>sm_execcfg</tt>, <tt>rcon exec</tt>, or the admin menu to run these configs.  Of course, you can also change or rename them.  Samples are provided in the default package, and also reproduced below.
 
You can simply use <tt>sm_execcfg</tt>, <tt>rcon exec</tt>, or the admin menu to run these configs.  Of course, you can also change or rename them.  Samples are provided in the default package, and also reproduced below.
  
 +
=Sample Files=
 
<tt>sm_warmode_off.cfg</tt>:
 
<tt>sm_warmode_off.cfg</tt>:
 
<pre>
 
<pre>

Revision as of 23:40, 21 October 2007


SourceMod does not have a "war mode" built-in. Instead, it has options that let you lock-down SourceMod to only keep a few plugins loaded. Matches can be completed without SourceMod interfering, and once done, SourceMod can be "unlocked" again. You can still retain administrative control.


Safe Plugins

There are a few plugins that are absolutely safe to use for matches. They are:

  • adminhelp.smx - Provides the sm_help command.
  • adminmenu.smx - Provides the sm_admin command. Note that menu items are only added from other plugins, and thus enabling the menu plugin will not add abusive admin commands unless the plugin implementing those commands is also loaded.
  • admin-flatfile.smx, admin-sql-threaded.smx, and admin-sql-prefetch.smx - These three plugins simply load administrators.
  • basebans.smx - Ban/unban functionality. Click here for command listing.
  • basecommands.smx - General, non-abusive admin commands. Click here for command listing.

War Mode Configs

Implementing warmode is very simple. Two sample configs are provided as cfg/sourcemod/sm_warmode_on.cfg and cfg/sourcemod/sm_warmode_off.cfg.

The first file, sm_warmode_on.cfg, does three things:

  • Unloads all plugins.
  • Re-loads the "safe" plugins.
  • Locks any more plugins from being loaded.

The second file, sm_warmode_off.cfg, removes the plugin loading lock, and then reloads all plugins from the plugins folder (as would happen on server start).

You can simply use sm_execcfg, rcon exec, or the admin menu to run these configs. Of course, you can also change or rename them. Samples are provided in the default package, and also reproduced below.

Sample Files

sm_warmode_off.cfg:

//This file unloads all plugins, re-loads a few "safe" ones, and then prevents 
//any more plugins from being loaded.
sm plugins unload_all
sm plugins load basebans.smx
sm plugins load basecommands.smx
sm plugins load admin-flatfile.smx
sm plugins load adminhelp.smx
sm plugins load adminmenu.smx
sm plugins load_lock

sm_warmode_on.cfg

//This file re-enables a server from "war mode" by unlocking plugin loading 
//and refreshing the plugins list.
sm plugins load_unlock
sm plugins refresh