Skip to content

Bans and Mutes

Liam Robinson edited this page Nov 8, 2026 · 1 revision

Bans and Mutes

A ban keeps a player id, an address or a range of addresses off the server. A mute keeps a player's chat lines from reaching anyone. Both are kept in bans.toml in the data folder, last across restarts and end on the server's clock.

Commands

Command What it does
ban <who> <duration or forever> [reason] bans; a connected rider is sent away
unban <ban number or who> ends a ban (the number from bans)
bans lists the bans with their numbers
bans reload reads bans.toml again after a hand edit
mute <rider or player:<id>> <duration or forever> [reason] mutes
unmute <rider or player:<id>> ends a mute
mutes lists the mutes

Who:

Form Bans
a rider (its number, a player id prefix of 8+ hex digits, or its exact name) that player's id and current address
player:<64 hex digits> a player id, connected or not
ip:<address> one IPv4 or IPv6 address
range:<prefix or wildcard> range:198.51.100.0/24, range:2001:db8::/32, range:192.0.2.*

status shows each rider's number and the first 16 hex digits of the player id. A player id is the SHA-256 of the player's own key: it stays the same when their name or address changes.

Durations: a number with s, m, h, d or w (30m, 12h, 7d, 2w), at most 100 years, or forever. A reason is at most 200 bytes; the banned player sees it.

Example

ban ip:203.0.113.7 7d spamming the chat
banned: ip:203.0.113.7 until 2026-11-14 21:36 UTC (in 7 d): "spamming the chat"
ban range:192.0.2.* 12h
banned: range:192.0.2.* until 2026-11-08 09:36 UTC (in 12 h)
bans
4 bans:
  1. ip:203.0.113.7 until 2026-11-14 21:36 UTC (in 6 d 23 h) by "console": "spamming the chat"
  …
unban 1
ban ip:10.0.0.0/8 1d
10.0.0.0/8 is a range: write range:10.0.0.0/8

Each ban and mute is logged with who made it: console, operator <id> for the remote console, or resource <name> for a script with the right.

The file

[[ban]]
range = "192.0.2.*"
reason = ""
by = "console"
at = 1794087401  # 2026-11-07 21:36 UTC
until = 1794130601  # 2026-11-08 09:36 UTC

[[ban]]
player = "abababababababababababababababababababababababababababababababab"
reason = "cheating"
by = "console"
at = 1794087402  # 2026-11-07 21:36 UTC
until = 1795297002  # 2026-11-21 21:36 UTC

Each [[ban]] names exactly one of player, ip or range. at and until are Unix seconds (UTC); until = 0 never ends. Mutes are [[mute]] tables with a player. The server writes the file whole on every change; edit it while the server is stopped, or run bans reload. At most 65 536 bans and 65 536 mutes; the file at most 16 MiB.

Because bans end on the server's system clock, a clock set forward ends them early and one set back makes them last longer.

Clone this wiki locally