Admin Action Log 1.0.0 (olds.ro)
================================
Moderation: every admin command (amx_...) is written to a daily log with the
time, who ran it (name, SteamID, IP, admin flags; or the server console /
rcon), the target player and the command text, for owners to review.
Requirements
- AMX Mod X 1.10.0.5490 or newer, fakemeta
Install
Compile scripting/olds_adminlog.sma and copy olds_adminlog.amxx to
addons/amxmodx/plugins/ (anywhere in plugins.ini). No downloads.
Settings (addons/amxmodx/configs/plugins/olds_adminlog.cfg, made on first run)
olds_alog_hidepass 1 passwords are written as stars
olds_alog_days 30 at map start, admin logs older than this many days
are deleted (0 = keep them all)
The log
addons/amxmodx/logs/olds_adminlog_YYYYMMDD.log, one line per command:
21:04:11 | "Alpha" <STEAM_0:1:23> 10.0.0.5 flags "abcd" | target "Bravo"
<STEAM_0:0:45> 10.0.0.7 flags "z" | amx_kick Bravo "spamming the chat"
(one line in the file). The target is the player the first argument names
(#userid, SteamID, name or part of it), or "-".
How it works
- Players: FM_ClientCommand sees every client command starting with amx_
(also from players without admin flags, so refused tries are logged).
- Server console and rcon: at map start, every amx_ console command that
the loaded plugins registered gets a register_srvcmd echo.
- Passwords: with olds_alog_hidepass 1, every argument of a command whose
name holds "pass" (amx_pass ...) and every word after a word holding
"pass" or "_pw" (rcon_password x, sv_password x), also inside quoted
arguments, become ****.
- If the log cannot be written (read-only folder, disk full), one error
goes to the server console and logging resumes by itself later; other
plugins are not affected.
- Old logs: only files named olds_adminlog_YYYYMMDD.log are deleted, by
the date in their name.