CSB Ban Manager

v1.0.0 0 изтегляния Daemon666 Последна актуализация: Jul 14, 2026

MySQL bans with reason, admin and expiry, checked asynchronously on connect with threaded SQLx.

CSB Ban Manager keeps your bans in MySQL instead of banned.cfg, so every server in your community shares one ban list and your website can read it. All queries go through threaded SQLx (SQL_ThreadQuery), which means a slow or dead database never freezes the game thread — the worst case is that a ban check silently does not fire.

Inspired by AMXBans (Kanagava and the AMXBans team). This is an independent GPL re-implementation with its own, deliberately small schema; no AMXBans code is reused.

How it works

  1. amx_ban <target> <minutes> [reason] inserts a row (SteamID, IP, player name, admin name, admin SteamID, reason, created, expires) and kicks the player.
  2. On client_authorized the plugin fires an async SELECT matching the SteamID or the IP, ignoring rows whose expires is in the past.
  3. If a row comes back, the player gets a MOTD with the reason, the banning admin and the time left, and is then kicked.

Features

  • Timed bans (minutes) and permanent bans (0).
  • SteamID and IP matching — catches non-Steam clients that change their SteamID.
  • amx_bans shows the 20 most recent bans as a MOTD table.
  • amx_unban <steamid> deletes the row and also runs removeid + writeid so an old engine ban does not survive.
  • The table is created automatically on map start with CREATE TABLE IF NOT EXISTS.
  • All user-supplied strings are stripped of quotes, backslashes and control characters before they touch a query.

Installation

  1. Make sure the mysql module is enabled in addons/amxmodx/configs/modules.ini.
  2. Compile and drop csb_ban_manager.amxx into addons/amxmodx/plugins/, add it to plugins.ini.
  3. Put the credentials in addons/amxmodx/configs/amxx.cfg (or a server.cfg that runs before the map starts):
    csb_ban_host "127.0.0.1", csb_ban_user "csb", csb_ban_pass "secret", csb_ban_db "csb".
  4. Change the map. The csb_bans table is created on the first map load.

Troubleshooting

If nothing is ever inserted, check addons/amxmodx/logs/ — every failed query is logged with the MySQL error string. A blocked port 3306 or a user without CREATE privileges are the two usual causes.

Инсталация

1. Enable the mysql module in addons/amxmodx/configs/modules.ini
2. Put csb_ban_manager.amxx in addons/amxmodx/plugins/ and add it to plugins.ini
3. Set csb_ban_host / csb_ban_user / csb_ban_pass / csb_ban_db in amxx.cfg
4. Change map - the csb_bans table is created automatically

Cvar-и

CVARDefaultDescription
csb_ban_host 127.0.0.1 MySQL host.
csb_ban_user csb MySQL user.
csb_ban_pass MySQL password.
csb_ban_db csb MySQL database name.
csb_ban_kickmsg You are banned on this server Kick message and MOTD title shown to banned players.

Команди

CommandAccessDescription
amx_ban d (ADMIN_BAN) amx_ban <name or #userid> <minutes, 0 = permanent> [reason]
amx_unban d (ADMIN_BAN) amx_unban <steamid>
amx_bans d (ADMIN_BAN) Shows the 20 most recent bans in a MOTD.

Списък с промени — v1.0.0

1.0.0 - Initial release.
Версии →
Сътрудници: Daemon666 ✦
Оригинален автор: AMXBans team (Kanagava) Лиценз: GPL-3.0

Оценка

No ratings yet.

Download v1.0.0

Compiled live from the source below — nothing pre-built.
Изтегли .sma
Файлове:
csb_ban_manager.sma main 11.2 KB

Изисквания

AMX Mod X ≥ 1.9
Engine ReHLDS HLDS
ReGameDLL Незадължително
ReAPI Незадължително
Metamod Metamod / Metamod-r
Модули sqlx
Известни конфликти Do not run it together with AMXBans; both will try to reject the same clients and you will get double kicks.
Обратно към плъгините