Difference between revisions of "SemiAdmin"

From WolfWiki
Jump to: navigation, search
m (added set becase they dot work whitout it)
Line 1: Line 1:
[[ETPro]] allows admins to use SemiAdmins. These are admins who can do some server commands without having full [[rcon]] access.
+
'''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.
  
Semiadmin is split up in levels from 1 to 999 but you probably wont need them all, each level can have different commands.
+
==cvar overview==
  
== Setup ==
+
{| cellspacing="2" cellpadding="2"
First you need a server variable called:
+
|- 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.
 +
|}
  
<pre>b_semiAdminLevels #</pre>
 
  
 +
==cvar descriptions==
  
This variable uses 1 number, it is the number of semiadmin levels you want use
+
===b_semiAdminLevels===
the number can be from 0 to 999, where 0 is no semiadmins at all. Any value higher than 0 is the number of levels so if you have it set to 2 you will have 2 semiadmin levels.
+
  
 +
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
  
== Setting Password ==
+
===b_semiAdminPass#===
  
The second thing you need is the password this is done by a variable called:
+
Sets the password for each semiadmin level. # is the level to set the password for. Every level must have its own password.
<pre>set b_semiAdminPass# "thepassword"</pre>
+
set b_semiAdminPass1 "foo"   // foo is the password to log in as a level 1 semiadmin
  
 +
===b_semiAdminCmds#===
  
The # is the level number you want to use for this password.
+
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.
so b_semiadminpass2 "lol" will make 'lol' the password to log into level 2, but b_semiadminlevels must be 2 or higher than 2 for level 2 to work.
+
set b_semiAdminCmds1 "clientkick say kick"
Also every level must have its own password, since the password is used to choose which level a person logs in like:
+
''set b_semiadminpass1 "omg"''
+
''set b_semiadminpass2 "lol"'' this will make anyone that logs in with 'lol' a level 2 semiadmin and everyone that logs in with 'omg' a level 1 semiadmin.
+
  
  
== Commands ==
+
==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"
  
Third, you need the command that can be used by a level this is done by a variable called:
+
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.
  
<pre>set b_semiAdminCmds# "command"</pre>
 
  
 +
==Usage of the semiadmin functionality==
  
The # is the level number you want to use for these commands.
+
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>.
Each command must be separated with a space so ''b_semiadmincmds1 "say broadcast"'' allows any level 1 semiadmin to use both 'broadcast' and 'say', any arguments that are added to any of those commands are also sent, so it's possible to do ''/sa say "hello all"''
+
  
Be careful with that in cases of ''b_semiadmincmds2 "exec vstr set"'' the level2 semiadmin can add any arguments to these commands so, they can exec any .cfg on the server using ''/sa exec filename.cfg'' and, they can vstr any string using ''/sa vstr stringname'' and they can also set any cvar using ''/sa set cvarname value'' this means they can even set ''rconpassword Very Happy''
+
Some commands send information back, like the rcon command <code>status</code>. These information will not be sent back to the semiadmin.
But this can be done a different way, you can add the variable in the cmd list just like you wont need "set" in the server console.
+
For strings that you want to vstr you can add the string name in the cmd list then a semiadmin can /sa stringname to vstr it
+
This both allows you to limit the powers more specific e.g.
+
<pre>set b_semiadmincmds3 "g_speed g_gravity m1 m2 m3"</pre>
+
  
For the rest of the cmds list can contain any console command and it will also be done as if it was typed in the server console itself with only 1 big exception:
+
Typing <code>/sa</code> without any parameters will give you a list of commands you’re allowed to perform.
Some command send information back, such as when you do ''/rcon status'' it will show the server status, sadly this does not work for semiadmins, if a semiadmin does a command like that, it will do the command on the server only but the text will never reach it back to the client.
+
  
 
+
/sal baz                              // login with the password baz
== Logging In ==
+
/semiadmin say Hello all              // perform the command "say Hello all"
 
+
/sa                                  // shows you a list of commands you’re able to perform
Now when that is all done people should be able to log in, this is done by the command ''/semiadminlogin'' or short ''/sal'' like this:
+
 
+
<pre>/semiadminlogin passwordofyourlevel</pre>
+
 
+
 
+
If it succeeds it will broadcast ''‘playername has become a semiadmin’'' and in your console it says ''seminadmin level yourlevel logged in''. Now you can start using the SemiAdmon commands.
+
 
+
To do server commands you use the command ''/semiadmin'' or ''/sa'' like:
+
 
+
<pre>/semiadmin yourcommand</pre>
+
 
+
 
+
If you don't know what commands you can do you can just type /sa to get your level number and your commands.
+
if the command is not in your command list (/sa) you cannot use it.
+
  
 
[[Category:ETPro]]
 
[[Category:ETPro]]

Revision as of 18:18, 7 November 2006

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

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"


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