Public rank change log: sa_rank_log, written on rank changes, listed on the Staff page

This commit is contained in:
Astra 2026-09-29 16:56:37 +01:00
parent 861692c534
commit 611b79cdba
11 changed files with 346 additions and 17 deletions

View file

@ -4,8 +4,8 @@ A SourceBans-style web panel for [CS2-SimpleAdmin](https://github.com/daffyyyy/C
(built against 1.8.2b's MySQL schema).
- **Public site** (`/`): the live server (name, map, players, team score and a scoreboard), bans,
gags and mutes, and the staff list. Read-only. It never shows admin names, IP addresses or
internal immunity values.
gags and mutes, the staff list and its rank changes (promotions, demotions, who made them).
Read-only. It never shows who issued a penalty, IP addresses or internal immunity values.
- **Staff panel** (`/admin`): sign in through Steam. Ban, gag, mute, silence, warn and kick; lift
bans and blocks; manage ranks, permissions and staff; change server cvars and SimpleAdmin's
punishment settings.
@ -82,6 +82,17 @@ SimpleAdmin groups have no display name or colour, so those come from a site con
`"supporter": true` are listed apart from staff and can't sign in unless they hold
`@css/generic`.
### Rank changes
Every change to a player's rank (their highest-immunity group) is recorded in `sa_rank_log` and
listed under the public Staff page: who, from which rank to which, who changed it and when. The
panel creates the table at startup (`sql/rank-log.sql`, embedded; run it by hand if the database
user can't create tables). It logs changes made in the panel (giving, moving or removing a rank,
and deleting a rank that people hold). Our SimpleAdmin fork (1.8.2b-zio10+) logs `css_addadmin`,
`css_deladmin` and the in-game admin menu to the same table, marked "in game". Not logged: ranks
that lapse when their expiry passes, `css_delgroup`, and edits made straight in the database.
History starts when the table is created.
### Name history (optional)
SimpleAdmin keeps one row per SteamID + IP in `sa_players_ips` and overwrites its name on each