Skip to content

Staff commands and in-game alerts

Bastrel uses two ACE permissions, set in server.cfg:

  • bastrel.staff: in-game alerts, /bas info, /bas score, /bas tx, /bas screenshot;
  • bastrel.admin: also /bas ban, /bas unban, /bas license and /bas config.
add_ace group.moderator bastrel.staff allow
add_ace group.admin bastrel.admin allow
add_principal identifier.license:<license> group.admin

The server console can run every command. A player without the permission gets a refusal, and the attempt is written to bastrel_staff_actions, like every command.

Command Permission What it does
/bas info <id> staff Server id, license, mode, score and ban in force of a player
/bas score <id> staff Current score and the score thresholds waiting to apply
/bas ban <id> <duration> <reason> admin Bans the player; duration is 30m, 12h, 7d, 4w or perm
/bas unban <ban_id> <reason> admin Lifts a ban; nothing is deleted, the ban keeps who lifted it, when and why, and Bastrel never rewrites it afterwards (only the owner of the database can disable the trigger that guards it)
/bas license admin State of the licence (state, reason, plan, expiry, last contact, and a configuration problem or a refusal of the API if any); never the token
/bas config pending [page] admin The remote configuration waiting for your approval: version, full hash, and the changes computed on your server (remote configuration)
/bas config accept <hash> admin Accepts the waiting configuration whose full hash is given; a stale hash is refused; takes effect when the resource starts again
/bas screenshot <id> staff Asks for an encrypted screenshot of a connected player (screenshots); refused while screenshots.enabled is false
/bas tx <id> <duration> staff The economy journal of a player over the last 30m, 2h, 7d or 4w (economy); read only

<id> is the server id of a connected player, or a full identifier, for example license:abc… or discord:123…. An identifier of a connected player designates that player: a ban then takes all their identifiers and hardware tokens and removes them from the server. For an offline player, only that identifier is banned. The IP is never accepted.

Each player can run at most 5 commands per 10 seconds (commands.attempts in config/modules.lua); beyond that, nothing is answered nor written. The server console is not limited.

When a player with neither bastrel.staff nor bastrel.admin keeps sending /bas, only the first refusal of each interval is written to the staff actions table; the next ones are counted per sub-command and written as one summary line per player and interval, also when the player leaves or Bastrel stops (commands.refusalLogMs in config/modules.lua, optional, 60000 ms by default). The player is still answered each time. The target of a refused command, whatever the sub-command, is written as typed only when it is a server id (plain decimal digits, 20 at most), a valid ban id (an id is not a secret) or an identifier of a known type (license:…, discord:…); anything else (a hardware token, an IP, free text, a number written +12, 12.0, 1e1 or in hexadecimal) is replaced by <masked:N>, where N is its length.

A manual ban carries its own evidence: a BAS-ADM-001 detection with who banned, the reason and the duration. The ban id shown is the final one: if the drawn id was already taken in the database, Bastrel tells you the new one. If the database is down, the ban applies at once and is written when the database comes back; the command says so. If the ban is refused (no usable identifier, reason longer than 255 characters…), nothing is written as a ban and the command gives the reason.

In observe mode, /bas ban is applied like in enforce: a manual ban is a staff decision, not an automatic detection (a connected player is banned and kicked, an offline target gets the ban written). A rule mode observe on BAS-ADM-001 (sanctions.ruleModes in config/modules.lua) does not stop it either; an override on BAS-ADM-001 is ignored, with a warning at startup; a rule mode on BAS-ADM-001 has no effect either and also raises a startup warning (ruleMode.ignored). /bas unban works in every mode.

When Bastrel decides to alert the staff, every connected player with bastrel.staff (or bastrel.admin) gets a chat message with the code, the severity, the player’s server id, the actions and the detection id. This needs the chat resource; without it, alerts stay in the console and on Discord.

To keep the chat readable, at most 10 in-game alerts are shown per 10 seconds for the whole server (commands.alerts in config/modules.lua). The console and Discord keep every alert. The staff list is checked again every 30 seconds (commands.staffRefreshMs), so a permission given while a player is connected applies within that delay.