Chapter 7. Admin System

Table of Contents

Synopsis
Operation
Quickstart Checklist
Privileges
Managing ACLs
Various examples

The Admin System is a collection of commands used to aid in server administration. The mechanism allows for a user to issue text-based commands from a variety of sources which are then executed on the game server. The system has been influenced by ET mod community's comfort level with Shrubmod, to which we have attempted to maintain some cosmetic familiarity.

Over time the system has grown to include more than just administrative commands; some commands have been added to make game play more enjoyable.

An access control list (ACL) based security system is in place to allow for fine-grained grants or denials of various privileges.

[Note]Note
After installing Jaymod the only user which has full access to all commands is the server console. Thus one must send commands through rcon or server console. Once users begin connecting and known to the server, privileges can be granted to online or offline users as per server policy.

[Caution]Caution
The person responsible for managing the game server is ultimately responsible for making sure commands are locked down and granted only to other responsible users. Please do not assume that Jaymod offers any kinds of guarantees. This is a free project, so we do not guarantee anything!

Synopsis

Commands may be issued from any of the following sources:

  • client console
  • client chat window
  • client team-chat window (if privilege granted)
  • client fireteam-chat window (if privilege granted)
  • client say bindings
  • client say_team bindings (if privilege granted)
  • client say_buddy bindings (if privilege granted)
  • rcon
  • server console

General command syntax is as follows. Note that commands are case-insensitive.

!command [OPTION]...

Use the !help command to obtain a list of all available commands. Optionally, a detailed synopsis and description for a specific command is also available.

!help [COMMAND]

Operation

The admin system is controlled using cvars and are effective immediately upon changing the value.

Table 7.1. Admin System Operation

CVARDESCRIPTION
g_admin(cvar)enable or disables admin system
g_adminLog(cvar)sets the filename used for admin command logging

Quickstart Checklist

Most admins installing a new version of Jaymod just want to know how to get it up and running as fast as possible. The following is a simple checklist of steps to go through to grant yourself full access after connecting.

  1. Enable server RCON access by setting the password in server console.
    [server-console] rconPassword PASSWORD
  2. Inform client of default RCON password to use by setting the password in client console.
    [client-console] /rconPassword PASSWORD
  3. Enable the admin system.
    [client-console] /rcon g_admin 1
  4. Test that RCON has full access to all available commands. You should see a large list of commands. If you do not get any results there's probably something else wrong.
    [client-console] /rcon !help
  5. Create a high admin-level. The number is arbitrary but must be a positive value.
    [client-console] /rcon !levadd 9
  6. Grant level 9 all commands.
    [client-console] /rcon !levedit 9 -acl +@commands
  7. Determine your client SLOT number as known to the server. This will usually be zero if you connected to an empty server.
    [client-console] /players
  8. Now set your client SLOT to level 9.
    [client-console] /rcon !setlevel SLOT 9
  9. Finished! Now try a few typical commands to see your new level in action.
    [client-console] !admintest
    [client-console] !help
    [client-console] !levlist
    

Privileges

Access control lists (ACL) are used to grant or deny privileges to an admin level or user. Generally, each admin level is different and by convention more privileges are granted to higher levels. Privilege naming is important and to help keep things clean the naming is a clear indicator of the type of privilege as follows:

pseudo
Pseudo privileges are a logical grouping of other privileges.

Table 7.2. Behavior Privileges

PRIVILEGEDESCRIPTION
@allall privileges
@behaviorsall behavior privileges
@commandsall command privileges

behavior
Behavior privileges are used to control the behavior of the server in very specific ways. They usually effect the way commands operate or general policy enforcement.

Table 7.3. Behavior Privileges

PRIVILEGEDESCRIPTION
B/balanceImmunitycan switch to any team regardless of balance
B/banPermanentdoes not need to specify the duration of a ban (permanent ban)
B/censorImmunitycannot be censored or flood protected
B/commandChatcan run commands from team or fireteam chat
B/commandSilentcan run commands silently from console (/!command)
B/reasonNonedoes not need to specify a reason for kick/ban
B/specChatcan see all team, fireteam and PM chat as spectator
B/voteAnycan call a vote anytime (even if disabled)
B/voteImmunitycannot be kicked, vote-muted, dropped for inactivity or complained against

command
Each command has a corresponding privilege that follows the naming convention C/command . For example, the privilege for !status is C/status. Privilege names are case-insensitive but by for clarity we capitalize the prefix. Use the !help command to determine the privilege for a specific command.

Managing ACLs

ACL management is how we grant or deny a privilege to an admin level or user. Basically, an ACL is a list of intermixed granted or denied privileges, and our goal is to manage that list. In cases of logical conflict, a DENIED privilege takes precedence over a GRANTED privilege. Note ACL lists are reduced to their canonical value automatically by removing superfluous or conflicting entries.

Level manipulation is accomplished with !levedit and effects all users at the level being edited immediately. User manipulation is accomplished with !useredit but only effects the specific user being edited.

For the purposes of this documentation we'll be editing an admin level and assume it already exists. The examples will use level 5 and privilege C/news which corresponds to the popular !news command. Substitute these values according to your particular needs.

add grant
The plus sign + immediately in front of a privilege specifies the privilege is to be granted.
!levedit 5 -acl +C/news
add deny
The minus sign - immediately in front of a privilege specifies the privilege is to be denied.
!levedit 5 -acl -C/news
clear privilege
The exclamation mark ! immediately in front of a privilege (without any space!) specifies the privilege is to be cleared (removed) from the ACL.
!levedit 5 -acl !C/news

Various examples

The following are various examples of how the commands may be used for some of the more complex tasks typical for a server admin.

  1. Create a new admin level 500 for people who donate to server, add commands { !pants, !pip, !pop } to it and then assign some online players to that level.
    !levadd 500
    !levedit 500 -name Donators
    !levedit 500 -gtext ^3Greetings donator! Thanks for your contribution.
    !levedit 500 -gsound sound/osp/goat.wav
    !levedit 500 -acl +C/pants
    !levedit 500 -acl +C/pip
    !levedit 500 -acl +C/pop
    !levinfo 500
    !setlevel JohnSmith 500
    !setlevel MarthaKent 500
    !finger JohnSmith
    !finger MarthKent
    
  2. A nasty user has come and gone from your server, but not without first creating a huge disruption. Maybe it's time to ban the player even though they already disconnected. The two pieces of information we have to go on is that the player's name was Jerry and he was connected within the last hour.

    !userlist -name jerry -since 60m

    According to the results, the offending user has been identified with ID 1fea4ad9. Now let's ban the user for 30 days.

    !banuser 1fea4ad9 30d offensive behavior is not tolerated

    And finally lets take a look at our ban list. As luck would have it, the list shows bans in order of newest bans to oldest so he should be right at the top of the list.

    !banlist

    But we've had a change of heart! Let's review his ban details and unban him.

    !baninfo 1fea4ad9
    !unban 1fea4ad9