From dc7a1e42bd1c0810f705d58299b9bfce653997f8 Mon Sep 17 00:00:00 2001 From: Astra Date: Tue, 29 Sep 2026 17:58:27 +0100 Subject: [PATCH] Offer the @zio/... flags in the rank editor The rank editor only listed @css/... flags, so a @zio/ flag showed up only on a rank that already held it and couldn't be added to others. List the flags admin_overrides.json uses, plus @zio/penalties from our SimpleAdmin fork. --- README.md | 4 +++- internal/web/admin.go | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7dddc43..d540458 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,9 @@ RCON. Without it the panel still works, but shows the server as offline and can' SimpleAdmin writes them. They apply when the player next joins (bans are also picked up by SimpleAdmin within about a minute). Kicks and warnings need the server. - **Ranks and staff**: written to the database, then `css_reloadadmins`. A rank is a SimpleAdmin - group (`#rank/mod`); staff are admins holding exactly one such group. + group (`#rank/mod`); staff are admins holding exactly one such group. The rank editor offers the + `@css/...` flags and our `@zio/...` ones (from the server's `admin_overrides.json` and our + SimpleAdmin fork); a new `@zio/` flag needs adding to `knownFlags` in `internal/web/admin.go`. - **Permissions**: commands sent over RCON run as Console, which skips all of SimpleAdmin's own checks, so the panel enforces them itself with the same flags: diff --git a/internal/web/admin.go b/internal/web/admin.go index d41fb87..8556cb6 100644 --- a/internal/web/admin.go +++ b/internal/web/admin.go @@ -283,6 +283,20 @@ var knownFlags = [][3]string{ {"@css/cheats", "Cheats", "sv_cheats-protected commands"}, {"@css/bypassipban", "Bypass IP bans", "Joins even when their IP, or another account on it, is banned"}, {"@css/vip", "VIP", "VIP perks in other plugins"}, + // Our own flags: admin_overrides.json (in the server repo) moves these commands onto them, and + // our SimpleAdmin fork checks @zio/penalties itself. Each command also accepts @css/root. + {"@zio/menu", "Admin menu", "css_admin and css_adminhelp"}, + {"@zio/who", "Who", "css_who and css_players"}, + {"@zio/penalties", "Others' penalties", "css_penalties on another player"}, + {"@zio/psay", "Private message", "css_psay"}, + {"@zio/csay", "Centre messages", "css_csay, css_hsay and css_cssay"}, + {"@zio/listenall", "Listen to all", "css_listenall and css_adminvoice"}, + {"@zio/team", "Move teams", "css_team"}, + {"@zio/rename", "Rename", "css_rename"}, + {"@zio/banip", "IP bans", "css_banip"}, + {"@zio/restart", "Restart game", "css_rr, css_rg, css_restart and css_restartgame"}, + {"@zio/vote", "Start votes", "css_vote"}, + {"@zio/plugins", "Plugins", "css_plugins and css"}, {"@css/root", "Root", "Every permission, and managing ranks and staff"}, }