Difference between revisions of "SemiAdmin"
(→b_semiAdminCmds#: cvars and cfgs) |
|||
(5 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | + | '''Semi Admins''' are admins who can perform only certain commands without having full referee or rcon access. | |
+ | The commands each semiadmin can perform and the password each needs for logging in are defined via cvars. | ||
− | + | ==cvar overview== | |
+ | {| cellspacing="2" cellpadding="2" | ||
+ | |- style="background: #CCCCFF;" | ||
+ | !width="200"|cvar | ||
+ | !width="100"|default | ||
+ | !description | ||
+ | |- style="background-color: #F4F4F4;" | ||
+ | |<tt style="color: green;">b_semiAdminLevels</tt> | ||
+ | |align="center"|0 | ||
+ | |The number of semiadmin levels. | ||
+ | |- style="background-color: #EEEEEE;" | ||
+ | |<tt style="color: green;">b_semiAdminPass#</tt> | ||
+ | |align="center" style="color: gray;"|undefined | ||
+ | |Defines the password for each semiadmin level, where # is the level to set the password for. | ||
+ | |- style="background-color: #F4F4F4;" | ||
+ | |<tt style="color:green;">b_semiAdminCmds#</tt> | ||
+ | |align="center" style="color: gray;"|undefined | ||
+ | |A space-seperated list of commands a level # semiadmin can use. | ||
+ | |} | ||
− | |||
+ | ==cvar descriptions== | ||
− | + | ===b_semiAdminLevels=== | |
− | + | Defines the number of semiadmin levels to use. Valid values are 0–999. The default value of 0 disables semiadmin functionality. | |
+ | set b_semiAdminLevels 3 // you will have 3 semiadmin levels | ||
+ | ===b_semiAdminPass#=== | ||
− | + | Sets the password for each semiadmin level. # is the level to set the password for. Every level must have its own password. | |
− | + | set b_semiAdminPass1 "foo" // foo is the password to log in as a level 1 semiadmin | |
+ | ===b_semiAdminCmds#=== | ||
− | - | + | A space-seperated list of commands a semiadmin with level # is allowed to perform. Be carefull with commands like <code>set</code>, <code>exec</code>, <code>vstr</code> etc. |
+ | set b_semiAdminCmds1 "clientkick say kick" | ||
+ | In addition to built in commands, you can permit semi-admins to exec .cfg files or vstr cvars. | ||
+ | If blah is in b_semiAdminCmds# <code>sa blah</code> looks for a file named blah.cfg and then a cvar named blah.cvar, and finally a builtin command named blah. | ||
− | + | ==Example configuration== | |
− | + | ||
+ | set b_semiAdminLevels "3" // we will have 3 semiadmin levels | ||
+ | set b_semiAdminPass1 "foo" // foo is the password for level 1 | ||
+ | set b_semiAdminPass2 "bar" // the password for level 2 | ||
+ | set b_semiAdminPass3 "foobar" | ||
+ | <span style="color: red;">set b_semiAdminPass4 "wrong" // will not work since we have only defined 3 semiadmin levels</span> | ||
+ | set b_semiAdminCmds1 "say map_restart" | ||
+ | set b_semiAdminCmds2 "kick say clientkick g_friendyfire" // level 2 is allowed to change the cvar g_friendlyfire | ||
+ | set b_semiAdminCmds3 "set kick clientkick exec" | ||
− | The | + | The above lines will create 3 semiadmin levels. Each level has its own password and an own list of commands which can be used by a semiadmin with that level. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ==Usage of the semiadmin functionality== | |
+ | To log in as a semiadmin use the command <code>/semiadminlogin <password></code> or the shorter one <code>/sal <password></code>. Performing a command is done via the commands <code>/semiadmin <command></code> or <code>/sa <command></code>. | ||
− | + | Some commands send information back, like the rcon command <code>status</code>. These information will not be sent back to the semiadmin. | |
− | + | Typing <code>/sa</code> without any parameters will give you a list of commands you’re allowed to perform. | |
+ | /sal baz // login with the password baz | ||
+ | /semiadmin say Hello all // perform the command "say Hello all" | ||
+ | /sa // shows you a list of commands you’re able to perform | ||
− | + | [[Category:ETPro]] | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + |
Latest revision as of 02:23, 24 April 2007
Semi Admins are admins who can perform only certain commands without having full referee or rcon access. The commands each semiadmin can perform and the password each needs for logging in are defined via cvars.
Contents
cvar overview
cvar | default | description |
---|---|---|
b_semiAdminLevels | 0 | The number of semiadmin levels. |
b_semiAdminPass# | undefined | Defines the password for each semiadmin level, where # is the level to set the password for. |
b_semiAdminCmds# | undefined | A space-seperated list of commands a level # semiadmin can use. |
cvar descriptions
b_semiAdminLevels
Defines the number of semiadmin levels to use. Valid values are 0–999. The default value of 0 disables semiadmin functionality.
set b_semiAdminLevels 3 // you will have 3 semiadmin levels
b_semiAdminPass#
Sets the password for each semiadmin level. # is the level to set the password for. Every level must have its own password.
set b_semiAdminPass1 "foo" // foo is the password to log in as a level 1 semiadmin
b_semiAdminCmds#
A space-seperated list of commands a semiadmin with level # is allowed to perform. Be carefull with commands like set
, exec
, vstr
etc.
set b_semiAdminCmds1 "clientkick say kick"
In addition to built in commands, you can permit semi-admins to exec .cfg files or vstr cvars.
If blah is in b_semiAdminCmds# sa blah
looks for a file named blah.cfg and then a cvar named blah.cvar, and finally a builtin command named blah.
Example configuration
set b_semiAdminLevels "3" // we will have 3 semiadmin levels
set b_semiAdminPass1 "foo" // foo is the password for level 1
set b_semiAdminPass2 "bar" // the password for level 2
set b_semiAdminPass3 "foobar"
set b_semiAdminPass4 "wrong" // will not work since we have only defined 3 semiadmin levels
set b_semiAdminCmds1 "say map_restart"
set b_semiAdminCmds2 "kick say clientkick g_friendyfire" // level 2 is allowed to change the cvar g_friendlyfire
set b_semiAdminCmds3 "set kick clientkick exec"
The above lines will create 3 semiadmin levels. Each level has its own password and an own list of commands which can be used by a semiadmin with that level.
Usage of the semiadmin functionality
To log in as a semiadmin use the command /semiadminlogin <password>
or the shorter one /sal <password>
. Performing a command is done via the commands /semiadmin <command>
or /sa <command>
.
Some commands send information back, like the rcon command status
. These information will not be sent back to the semiadmin.
Typing /sa
without any parameters will give you a list of commands you’re allowed to perform.
/sal baz // login with the password baz /semiadmin say Hello all // perform the command "say Hello all" /sa // shows you a list of commands you’re able to perform