Daemon666 / CSB Admin Logger Publiczny

Logs every admin command (kick/ban/gag/slay/slap/map) with SteamID, target, map and time to MySQL via threaded SQLx, with a flat-file fallback and a csb_log_action native.

v1.0.0 160 pobrań GPL-3.0 Ostatnia aktualizacja Aug 23, 2026
Daemon666 1.0.0 - Initial release. v1.0.0 Feb 8, 2026 1 Wersje
csb_admin_logger.sma main 0b5cb17 5.8 KB
README.md

CSB Admin Logger keeps an audit trail of what admins do. It watches the common commands — amx_kick, amx_ban, amx_banip, amx_gag, amx_slay, amx_slap, amx_map — and records the admin's name and SteamID, the target/args, the current map and a timestamp into a MySQL table using threaded SQLx, so the game thread never blocks on the database. If the DB is unreachable it falls back to a flat log file, and it exposes a csb_log_action() native other CSB admin plugins can call to record their own actions.

Features

  • Watches the standard admin commands without swallowing them (they still run normally).
  • Threaded inserts through SQL_ThreadQuery — no lag spike on a slow database.
  • Automatic flat-file fallback (addons/amxmodx/logs/csb_admin_actions.log) when SQL fails.
  • native csb_log_action(const admin_auth[], const admin_name[], const target[], const action[]) for other plugins.
  • All string fields are sanitised before they reach the query.

Installation

  1. Enable the sqlx module in addons/amxmodx/configs/modules.ini.
  2. Set csb_log_sql_host/user/pass/db (in amxx.cfg or a server cfg). Leave them empty to use file logging only.
  3. Compile csb_admin_logger.sma, copy it to addons/amxmodx/plugins/, add it to plugins.ini and change the map.

The csb_admin_log table is created automatically on first load if it does not exist.

Instalacja
1. Enable the sqlx module in addons/amxmodx/configs/modules.ini
2. Set csb_log_sql_host/user/pass/db (or leave empty for file-only)
3. Put csb_admin_logger.amxx in addons/amxmodx/plugins/ and add it to plugins.ini
4. Change map
Cvary
CVARDefaultDescription
csb_log_sql_host 127.0.0.1 MySQL host (empty disables the DB and uses file logging).
csb_log_sql_user root MySQL user.
csb_log_sql_pass MySQL password.
csb_log_sql_db amxx MySQL database name.
Lista zmian — v1.0.0
1.0.0 - Initial release.
Wersje →
Ocena

No ratings yet.

Informacje
Download v1.0.0
Compiled live from the source below — nothing pre-built.
Pobierz .sma
Wymagania
AMX Mod X ≥ 1.9
Engine ReHLDS HLDS
ReGameDLL Opcjonalne
ReAPI Opcjonalne
Metamod Metamod / Metamod-r
Moduły sqlx
Znane konflikty If two copies of this plugin (or two command watchers) load, admin actions will be logged twice.
Współtwórcy
Wróć do Pluginów