Duelers Mod Admin Commands

Setting the client side password

To enable the admin commands you must know the server admin password as assigned by the server administrator. Set the client side cvar "c_aP" to this password. For example, if the admin password is "letmedoit", then type the following command on the client console:

seta c_aP letmedoit

This will set and record the admin password in your jk2mpconfig.cfg file. You should not ever have to set it again unless it is changed on the server. There is no login procedure! When you connect to the server the client side cvar c_aP is checked by the server. If the client password matched the server admin password the server "marks" you as a valid administrator and enables admin commands for you. Note that if you change the c_aP password while connected, the server may not see the new value until you become a spectator (or disconnect) and then re-join (or reconnect) the game.

Admin Commands

Many of the admin commands have two forms. The first form is the console command where you type the command on your console and provide a client name or client number argument. If the client name has spaces or other punctuation in it, a partial string will suffice provided it can un-ambiguously define the client name. If this fails, use the client number instead. The second form is an admin "gun". That is, the command is applied to the client  currently targeted in your crosshair. These commands are best bound to special keys in order to use them without the need to access the console.

When you use an admin command on another player, the screen will shake for the affected party (and anyone close by) and thunder will sound (again, for those closeby). A message will be displayed on the screen describing the administrative action, and the action will also be logged to the game log file.

Admin features can also be controlled by using the m_ac and m_sac cvariables. Use of these cvariables is described in the cvariables section.

To get current client information about names and client numbers use the "who" command. This will provide a listing of the current clients, their names and client numbers.

To get a listing of available admin commands, type "info".

Showmotd:

The subject is shown the MOTD. This might help remind them of the server rules to which they should have paid more attention.

Teleport and Origin:

Teleport will take you directly to any point on the map. You provide x, y, and z as arguments. The Origin command will tell you the x, y and z co-ordinates of your current location on the map.

Freeze and Thaw: freeze, thaw, freeze_gun, thaw_gun

The subject is frozen or thawed. When frozen, the subject cannot move (save to turn), cannot use their weapon and cannot use any force power. They are still, however, able to talk.

Silence and Speak: silence, speak, silence_gun, speak_gun

The subject is silenced and forbidden to speak. No broadcast chat, no team chat, no private chat.

Bring and Goto: bring, goto

The bring command teleports the subject  to your location. They will be placed in your line of sight, moving away from you and a short distance away.  Find a decent place to bring them to, unless you want to teleport them into a wall or over a cliff.

The goto command sends you to the subject's location. Similar to bring, you will be teleported into the subject's line of sight a short distance away from them. This is not particularly safe for you, unless the subject is friendly, as you do not know where they are or where they are looking.

Twilight Zone, Reality: tzone, real, tzone_gun, real_gun

The subject is sent to the Twilight Zone or restored to reality. While in the twilight zone a player cannot interact with any other player. You can see them and their neat purple aura, but they cant hurt you or bother you in any way.

Rename: rename, rename_gun

The subject is renamed to "Padawan".

Boot: boot, boot_gun

The subject is kicked from the server.

Setmap: setmap

Change the map the server is currently running. The command expects a map name, e.g. ffa_bespin.

Macro Scanning

The Duelers/JA server can be configured to direct each (pure) client connecting to scan the client key bindings for macros that are used to emulate key combinations for special moves. By default, this capability is enabled. However, there is much controversy over whether or not binding keys to special move is "bad" or "good". As a server administrator you will have to be the judge.

Many users have macros to change skins or hilts or rotate through taunts or select admin commands. These macros are not targeted. However, there are other macros that use movement and attack commands in special sequences to perform difficult manoeuvres flawlessly and effortlessly. A common example is:

Blue Stance Lunge Macro:

bind key "-forward;wait 2;+forward;wait 2;+movedown;+attack;wait 2;-attack;-movedown;-forward"

this turns 'key' into a single click lunger (assuming you are in blue stance).

These macros are targeted and disabled. Here is a description of how the scanning behaves to help you make your decision:

  • a regular scan of all key bindings is made by the client.
    • If during the scan a key is found that is bound to a series of commands then the series of commands is investigated. Most game bindings are from a key to a single command. The presence of the ';' character in a bind, tells the client that there is a sequence of commands.
      • The command sequence is scanned for the presence of any movement or attack commands. Specifically: +moveup, +attack, +forward, +back, and +movedown are illegal commands in the sequence
      • If these commands are found, the key binding is disabled
    • If during the scan a key is found that is bound to a string that uses exec to read commands from a file, that file is inspected. If the file contains illegal commands (as above), the bind is disabled.
    • If during the scan a key is found that is bound to a string that uses vstr to evaluate the contents of a cvariable, the cvariable is inspected. If the cvariable contains illegal command (as above), the bind is disabled.
    • If the key binding is disabled the bind is rewritten in a way so that the bind sends a message to the client console but also in a way that the new bind string may be easily easily restored when the client wishes to play on a server that allows such binds. Specifically the bind is re-written to:

      echo illegal macro: the_original_bind_with_;_replaced_with_:
       

    • If the client connects to a server which allows macros or if the server changes the value of m_ms to 0, then the old macros will be restored. This does, however, rely on the client not having edited the bind as re-written by the server.
  • the scanning of all keys happens approximately every second, so re-binding a disabled key will not be an effective way to continue to use macros that are illegal.
  • Scans are very quick and efficient and should not impact the client performance. A very convoluted attempt to hide macros behind multiple recursions of exec and vstr commands will only result in deeper scans which might eventually impact the performance of the client (and yet will ultimately succeed in disabling the macro).
  • Note that the macro scanner is not a full command parser. It makes some quick guesses to see if your binds are OK. If it gets confused because you have a very complicated set up, it will assume the worst and disable the bind. If this happens to you, please send me a note describing the problem and I can try to improve the scanner.

Advanced Ban Capabilities

Duelers/JA has the same advanced ban code built for Duelers/JO and now used in many other mods. This new code uses a file, ban.dat, to store banned IP addresses rather than a cvariable. The cvariable length limit only allowed a few IP addresses to be banned before running out of space. The file allows you to use the full allowable set of 1024 banned addresses. Furthermore, the new code allows a client to be banned easily from the console (and only the console -- this is not a mod "admin" command). To ban a player, type

ban client_id, or

ban player_name, or

ban player_name_substring

The ban command will, find the client_id associated with the player name (or partial substring), kick the player from the server and then add their IP address to the list of banned IP addresses.

For managing the ban list, you can:

  • manually edit the ban.dat file (it is just text). Do this while the server is not running!
  • use the command "addip" to add an ip to the banned list
  • use the command "removeip" to remove an IP address from the banned list
  • use the command "listip" to list the current set of banned IP addresses.

Enhanced Voting

One of the problems with a mod like duelers/JA that provides so many options is that the folks currently playing on a server may have a different set of likes and dislikes from the administrator of the server. Or as often can be the case the folks playing in the afternoon want a different game from the folks who play in the evening. Generally speaking unless someone on the server has rcon access there is very little you can do about it! Until now that is.

Duelers/JA has an enhanced vote system for controlling the behaviour of the mod (or even base game features) is available. By default the new votes are:

  • Disable use of Macros. This vote will disable any illegal macros that players currently are using.
  • Enable use of Macros. This will allow any macros to be used.
  • Disable/Enable use of the grapple.
  • Disable/Enable use of the jetpack.
  • Full Weapons Play (Restart Map). This vote will enable full weapons play to commence on a map. It does, however, require a map restart.
  • Saber Only Play (Restart Map). This will restrict the game to saber only. It also requires a map restart.

These defaults are just examples. This voting system is completely configurable by the admin of the server. The votes are created by setting up any number of sixteen cvars on the server (m_v1, ... , m_v16). The format of the cvars is:

set m_v1 "Disable use of Macros:m_ms 1"

or more generally,

set m_v1 "Descriptive_Vote_String:command1; ... ; commandN"

Here is how it works:

The client user interface has been extended so that the "Call Vote" menu now includes a section called "Mod". When this section is selected, a Mod Control panel is shown which will contain all of the administratively configured votes. Only the descriptive strings show, so they should be, well, descriptive!

When a vote is called, the descriptive string is shown to other players and they can elect to vote for or against the called vote. Just like normal!

If the vote is passed, the string of commands in the second half of the vote cvar is executed on the server. These commands should "implement" the change described! For the default votes that come with Duelers/JA the commands are all just setting cvars. I expect most votes will be this simple. For reference and example, here are the default cvar settings:

m_v1  =  Disable use of Macros:m_ms 1

m_v2  =  Enable use of Macros:m_ms 0

m_v3  =  Disable use of Jetpack:m_jetpack 1

m_v4  =  Enable use of Jetpack:m_jetpack 0

m_v5  =  Disable use of Grapple:m_grapple 1

m_v6 =   Enable use of Grapple:m_grapple 0

m_v7  =  Full Weapons Play (Restart Map):g_weaponDisable 0;map_restart

m_v8  =  Saber Only Play (Restart Map):g_weaponDisable 65531;map_restart