Administration and commands

Roles and passwords

A player becomes staff with /login <role> <password> in ngspades-client’s chat. There are five roles, each with a password in [passwords]. A higher role holds the permissions of the lower ones.

RoleConfig keyBitTypically for
trustedtrusted1Regular players you trust; the lowest staff level. Few commands need it alone.
guardguard2Helpers: mute, kick, ban, /tb, /tk.
modmoderator4Moderators. Note the name: /login mod ..., but the config key is moderator.
adminadmin8Administrators: maps, teleports, the sky, crates, perks, /reset.
managermanager16The owner: everything, including /shutdown.

An empty password turns that role off. The server warns at every start while a password is still changeme.... A plugin may ask for more than the password before the role is held (on_login, a second factor). /logout drops the role.

Note The host of a listen server (a player who started a match from ngspades-client’s menu) owns it: every staff permission is granted without a /login. A dedicated server always asks for a login. The console and the remote console run every command with all permissions.

Using commands

In ngspades-client, type the command in the chat with a /. Commands are lower-cased before they run (arguments keep their case). Arguments are separated by spaces or tabs, and a pair of quotes wraps one that contains spaces. A player is named by #<id> (/kick #3; the id is on the scoreboard and in /bots). A line is limited to 1000 characters; the server flood-limits chat commands for non-staff.

On the server’s own console (a TTY), the prompt Console> takes the same commands, with or without the slash. The console is off when the server runs without a terminal (a service, Docker without -it); use the remote console below.

/kick #3
/ban #3 60 spawn killing        a ban of 60 minutes with a reason
/pban #3                        permanent
/map Normandie
/say The server restarts in 5 minutes
/addbot 4 blue

The ban commands: /ban #id [minutes] [reason] (0 or none: for good), and fixed lengths /hban (6 hours), /dban (a day), /wban (a week), /mban (a month), /pban (for good). /unban <ip>, /undoban, /banrange and /unbanrange complete them. Bans are kept by address in Bans.json in the data folder (an IPv6 player by its /64), and the kicked player is told. game.ban in a plugin writes the same list.

Every command

The table is generated from the server’s command registry. Who is the lowest role that may use it.

CommandWhoWhat it does
/addboteveryoneAdds bots to the server. Usage: addbot [n] [blue|green]
/admineveryoneSends a message to all online admins.
/adminmuteguard or higherMutes or unmutes player from /admin usage
/autofilleveryoneKeeps the given player count as bots. Usage: autofill <n>
/banguard or higherPuts specified IP into ban list
/banrangeguard or higherBans specified IP range
/botfilleveryoneTops both teams up to n players each. Usage: botfill <n>
/botseveryoneShows bot, human and autofill counts
/classesguard or higherTurns the classes on or off (the zombie mode’s). Usage: classes [on|off]
/clienteveryoneShows players client info
/clineveryoneShows players client info
/colinfoeveryonedebug: dump a map column
/crateadmin or higherDrops a supply crate on a player (yourself without one). Usage: crate <ammo|health> [player]
/dbanguard or higherBans specified player for a day
/endmatchadmin or higherEnds the match now (the summary, then the next map). Usage: endmatch [1|2]: that team wins
/extendadmin or higherAdds minutes to a timed match. Usage: extend <minutes>
/hbanguard or higherBans specified player for 6 hours
/helpeveryoneShows commands and their description
/inteleveryoneShows info about intel
/invguard or higherMakes you go invisible
/kickguard or higherKicks specified player from the server
/kickboteveryoneRemoves the bot with the given id. Usage: kickbot <id>
/kickbotseveryoneRemoves every bot from the server
/killeveryoneKills player who sent it or player specified in argument
/logineveryoneLogin command. First argument is a role. Second password
/logoutany logged-in roleLogs out logged in player
/mapadmin or higherLoads a map now. Usage: map <Name>
/mbanguard or higherBans specified player for a month
/muteguard or higherMutes or unmutes specified player
/nextmapadmin or higherLoads the next map of the rotation
/nightadmin or higherNight or day for the 0.75 clients (Daytime and Weather). Usage: night [on|off]
/outfitadmin or higherHow a player or a team looks (1.0). Usage: outfit <player> <0..255> [colour] | outfit team <1|2> <0..254>
/pbanguard or higherPermanently bans a specified player
/perkguard or higherGrants a perk for a test. Usage: perk <mg|sentry|jetpack|landmine|dynamite> [player]
/pmeveryonePrivate message to specified player
/profileguard or higherShows the server’s profile (1.0 or 0.75), config, data folder, ports and masters
/ratioeveryoneShows yours or requested player ratio
/resetadmin or higherResets server and loads next map
/restartadmin or higherReloads the current map
/sayguard or higherSend message to everyone as the server
/scoreeveryoneShows the teams’ score and the match limit
/servereveryoneShows info about the server
/shutdownmanager onlyShutdown the server
/skyadmin or higherThe time of day and the weather (1.0). Usage: sky [time <hh:mm|day|night|dawn|dusk> | rate <n> | weather <kind> [0..100] | moon <0..100>]
/statseveryoneShows your match stats, or a player’s. Usage: stats [player]
/tbguard or higherToggles ability to build for everyone or specified player
/timeeveryoneShows how long this match has been running
/tkguard or higherToggles ability to kill for everyone or specified player
/tpadmin or higherTeleports specified player to another specified player
/tpcadmin or higherTeleports to specified cordinates
/ttkguard or higherToggles ability to team kill for everyone or specified player
/unbanguard or higherUnbans specified IP
/unbanrangeguard or higherUnbans specified IP range
/undobanguard or higherReverts the last ban
/upseveryoneSets UPS of player to requested ammount. Range: 1-300
/wbanguard or higherBans specified player for a week
Note Commands from plugins (game.command) appear in /help after the server’s own, with the role the plugin set. A plugin cannot override a server command: a name already taken is refused (EVT plugin action=command_refused why=taken). The shipped server_tools plugin adds /spawn, /spawn crate and /goto <x> <y> for admins (protocol 1.0 only).

Two registered commands are for diagnosis: /colinfo dumps a map column, /profile (guard or higher) shows the profile, config path, data folder, ports and masters, which it keeps from other players because it names the machine’s folders.

The remote console

A TCP connection that runs the console’s commands, for a tool that manages the server: sadctl (which also offers an MCP endpoint for AI agents), a monitor, a script. Nothing else is in the server: no HTTP, no JSON-RPC, no tokens.

[rcon]
enabled = true
bind = "127.0.0.1"
port = 32890          # the 0.75 profile's config uses 32900
password = "at least sixteen characters"

SP_RCON_PASSWORD (which also turns it on), SP_RCON_PORT and SP_RCON_BIND win over the file. With a shorter password the server logs a warning and leaves it off. It is not built on Windows.

Warning The password is the only authentication, a console command runs with every permission, and the password travels in the clear. Never open the port to the internet. Keep bind on 127.0.0.1 and, from another machine, use an SSH tunnel: ssh -L 32890:127.0.0.1:32890 host.

The wire

Text, one line at a time (1000 bytes at most).

  1. Connect and send auth <password>. The answer is ok, or denied (after a second’s pause) and the connection closes.
  2. Send one command per line, with or without the leading / (addbot 4 blue, /kick #3, /say hello). The answer is what the command printed (up to 64 KB), followed by an EOT byte (0x04) and a newline. A command that prints nothing answers (done, nothing printed).
  3. The line status is the exception: the answer is the server’s state as one JSON object (name, map, mode, profile, uptime, score, limits, and every player with id, team, bot, alive, hp, kills, deaths, assists, captures, score, ip and ping).

/shutdown, /login and /logout are refused. A quiet connection is closed after a minute. One client is served at a time; a line runs on the server’s tick (5 s at most to answer). Every line is written to the admin audit (actor=rcon) and the event log (EVT rcon).

# a try, with netcat
(printf 'auth %s\nstatus\n' "$PW"; sleep 1) | nc 127.0.0.1 32890

The admin audit

Every command, host command and remote console line is appended to logs/admin.log in the data folder (and to the event log as EVT admin). The rcon password is never written. [audit] enabled = false keeps only the event-log line; [audit] file moves it.

Host commands (the bots menu)

A player hosting from ngspades-client changes bots, their difficulty and autofill from the pause menu. On protocol 1.0 this travels as host <command> <arg1> <arg2> GenericCommands, and the server pushes host-status and host-bots back. The contract (ids, layout, semantics) is in docs/host-commands.md an owner does not need it, the console commands above do the same.

Conduct, anti-cheat and flood limits

Keep a public server healthy with the sections [conduct] (AFK kicks, team-grief points; staff and a listen host are exempt) and [anticheat] (counters and a rate-limited log, no ban; kick_on_protocol_violation for hard violations). The flood limits (per player: 400 packets a second, one chat line a second with a burst of 5, 20 commands a second) and the per-address connection guard ([net] max_connections_per_ip) are described in Network.

Match control from the keyboard

/endmatch [1|2]Ends the match now with the score as it is, or with that team winning; the summary runs, then the next map.
/extend <minutes>Adds minutes to a match that has a time limit.
/nextmap, /restart, /resetLoad the next map, reload this one, or reset (the same family).
/map <Name>Load a map now; downloads one that is not installed.
/classes on|offTurn the classes on or off for modes that have the option.
/sky time ..., /night on|offThe time of day and the weather (1.0), or day and night for 0.75 clients.
/perk <name> [player], /crate <ammo|health> [player]Grant a perk, or drop a supply crate: for tests and rewards.