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.