The game's plugins
The game comes with nine plugins in data/plugins/ (and the game modes: docs/plugins_mods.md). They are off until the server enables them in its plugins/plugins.toml (in the user folder):
# plugins/plugins.toml
enable = ["admin", "adminmenu", "bans", "chatcmds", "mapvote", "reserved", "antiflood", "stats"]
# disable = ["some_plugin"] # also turns off a plugin of your own without removing it
A server with no plugin enabled runs no plugin host at all. Admins and their rights are in admins.toml. An admin command needs the command's name in the admin's allow (or "*"), and the server console may always run it. Commands work from the console and from the chat as /name or !name. From the server console, kick and banid stay the server's own commands (the plugins' answer players and the chat). A player is named by #slot, by player ID, or by a part of the name that matches only one player. Immunity (admins.toml) keeps an admin safe from lower ones.
| Plugin | Commands | Settings |
|---|---|---|
admin | kick <player> [reason], map <name>, cvar <name> [value], who, asay <text> (to the admins), csay <text> (mid-screen) | |
adminmenu | adminmenu: a menu of the actions the admin may run | |
bans | ban <player> <minutes> [reason], banid <CSID> <minutes> [reason], unban <CSID>, bans | |
chatcmds | slap <player> [damage], slay, gag <player> [minutes], ungag, respawn, swap | |
mapvote | rtv, nextmap, timeleft (everyone); votemap <map>... (admins) | mapvote_choices, mapvote_before, mapvote_extend, mapvote_rtv_ratio, mapvote_rtv_delay |
reserved | reserved_slots, reserved_kick | |
antiflood | antiflood_seconds, antiflood_burst, antiflood_repeat | |
stats | rank, top [n], stats [player] (everyone) | |
semiclip | semiclip_option [name] [value] | semiclip, semiclip_team, semiclip_time, semiclip_crouch, semiclip_effects, semiclip_distance, semiclip_transparency, semiclip_penetfire |
admin
The base of the others: its lib/target.luau finds the player a command names (require("@admin/lib/target") in a plugin that depends on admin). Changing a setting with cvar needs the setting's name in the admin's rights, or cvar_set; reading a password (sv_password, rcon_password) needs the setting's name itself, and a change of one is announced as ***PROTECTED***. The plugin has the server_console permission, which setting the server's settings needs.
bans
Bans go by player ID and are kept in the plugin's store (its data folder). They last some minutes, or for good with 0, and a timed ban runs out by itself. A banned player is refused when connecting, and told why and for how long. Other plugins ban through its ban export and ask with banned. banid of a player here keeps immunity like ban; banning the ID of someone not here (whose immunity is unknown) needs the banid_offline right.
chatcmds
slap throws the player and takes some health. slay kills. gag stops the player's chat for some minutes or until ungag (this map only). swap moves the player to the other team, alive.
mapvote
When the map has a time limit (mp_timelimit), a vote for the next map starts mapvote_before seconds before the end, among mapvote_choices maps the server has (and a choice to stay mapvote_extend more minutes). The winner is played when the time is up. Without a vote, the server's map cycle (maps.toml) decides. Players /rtv to rock the vote: when mapvote_rtv_ratio of the humans did, a vote runs and its map follows at once.
reserved
The last reserved_slots slots are kept for admins allowed reserved. Others are refused when only those are free. With reserved_kick 1, an admin joining a full server makes room by dropping the newest player without a reservation.
antiflood
A player may say antiflood_burst lines within antiflood_seconds, and not the same line again within antiflood_repeat seconds. Lines past that are dropped, with a warning to the player. Admins allowed antiflood_immune are left alone.
stats
Statistics by player ID (bots are left out) in the plugin's SQLite database: kills, deaths, headshots, suicides, damage dealt and time played. They are written when a player leaves, when the map ends, and every minute. The rank is by kills minus deaths. Its totals export gives a player's numbers to other plugins.
semiclip
Players pass through each other, as ReSemiclip (s1lentq) does on other servers, with its settings: semiclip_team (0 everyone, 1 the terrorists only, 2 the counter-terrorists only, 3 teammates), semiclip_time (seconds from the freeze time's end; after them a player no longer close to another becomes solid until the next round; 0: always), semiclip_crouch (a player who jumps with the duck key onto a crouched one stands on them), semiclip_distance (how close they must be), semiclip_transparency (how see-through they are seen, 0 not at all), semiclip_effects (the see-through amount follows the distance instead, at any distance) and semiclip_penetfire (a shot goes through an ally passed through to what is behind, cs.game.bullets_pass_through). A flash's light goes through the players passed through, and the terrorists pass through the planted bomb. The players' games predict who they pass through.
At each map the settings come from the plugin's data folder (plugin_data/semiclip/): config.ini (written with its notes the first time), then maps/prefix_<prefix>.ini (prefix_de.ini) and maps/<map>.ini, each with lines like team = 3;. semiclip_option lists them or changes one for the map.
Checked by tools/plugin_shipped_test.sh, and semiclip by its own tests (tools/reference_mods_test.sh).