[CS:S/CS:GO] CT Bans
Allows admins to restrict access to the CT team from those who violate the server's rules. Designed for specific usage in Jailbreak environments.
v2.0.0 Feature Details:
- CT Bans are stored in the ClientPrefs database and survive map changes, re-joins, and server crashes.
- The Rage Ban feature allows admins to CT ban rage quitters who break the server's rules and then quickly disconnect.
- You may give a timed CT ban which will work based on in minutes spent alive (so idlers in spectate or those who suicide at the beginning of the round will not be working toward an unban.)
- The timed CT bans are stored in a SQL table for stateful access.
- The plugin logs CT ban to a SQL table in addition to your regular SM logs.
- Re-displays the team selection screen after an improper selection was made.
- SM Menu integration for the rageban and ctban commands.
- Displays helpful message to users who are CT banned when they join the server.
- SM Translations support.
- Custom reasons permitted (addons/sourcemod/configs/ctban_reasons.ini).
- Custom ban lengths permitted (addons/sourcemod/configs/ctban_times.ini)
Place the ctban.phrases.txt file in your addons/sourcemod/translations directory.
Place the sm_ctban.smx file in your addons/sourcemod/plugins directory.
Check your logs/server-console after the initial load for any SQL errors. If you have any SQL errors check your addons/sourcemod/configs/databases.cfg file and verify you can connect using the drivers you have specified.
Upgrade: Delete cfg/sourcemod/ctban.cfg or manually add new convars to the file.
Optional: Generate custom reasons list by creating a simple text file (addons/sourcemod/configs/ctban_reasons.ini) with 1 reason per line.
Optional: Generate custom times in (addons/sourcemod/configs/ctban_times.ini)
sm_ctban <player> <time> <optional: reason>
Bans the selected player from joining the CT team.
sm_removectban <player> | sm_unctban <player>
Removes the CT ban on the selected player.
Reports back the status of the current player's CT ban and the time remaining on the ban, if any.
Brings up a menu so you may choose a recently disconnected player to permanently CT ban.
Bans the given Steam Id from playing on the CT team.
sm_removectban_offline <steamid> | sm_unctban_offline <steamid>
Unbans the given Steam Id from the CT team.
Resets the entire CTBan cookie database.
Overrides any CTBans and swaps a player to CT team.
Removes overrides and moves player to T team.
Reports back the status of the target Steam Id from the ban database.
sm_change_ctban_time <player> <time>
Changes an existing CTBan to the new time specified. 0 would be permanently CTBan.
Displays a menu of active players who are CT Banned.
, <path>: The path to the soundfile to play when denying a team-change request. Set to "" to disable.
, <message>: This message is appended to a time-stamp when a CT banned user joins the server.
, <prefix>: This prefix will be added in front of the table names.
, <driver>: This specifies which driver to use from database.cfg
, [0,1]: Specifies whether a reason is required for the CT Ban command.
, [a-z]: Specifies the admin flag levels that may use the !ctbanlist and !isbanned command targeting anyone. Blank allows all players access on everyone.
, [0,1]: Specifies whether a non-admin can target themselves using the !isbanned command.
, [0,1]: Specifies whether to respawn players after team changes.
Special Thanks (Development):
Azelphur for snippets of cross-mod code.
Kigen for the idea of CT banning based on time spent alive.
oaaron99 for the idea of smart !ctban menu re-directs.
Bara for include file ideas.
Using API-- Steam Group CTBans
Plugins Using CTBan API:
!tctban Limited Timed CTBan for Lower Admins https://forums.alliedmods.net/showthread.php?p=2547113
2.0.3 Adds !rageban console user support. Fixed bug where !rageban was not permanent. Fixed bug with custom times (configs/ctban_times.ini) not displaying menu options correctly.
Adds multi-targeting filters for other admin commands: @ctban @!ctban and @noctbans (@noctbans specifies players who have never had a CT Ban).
2.0.2 Adds SQLite support. Updated include file: Adds more intelligent #tryinclude and pre-compile directives.
Alerts admins if someone is swapped to CT without !forcect. Added custom times options (configs/ctban_times.ini).
2.0.1 Small bug fixes in UnForceCT, ForceCT, and OnClientAuthorized code segments.
2.0.0 Ported to the new syntax. Translation file updated. CS:GO Fixes bug where mp_force_pick_time could assign a banned player to CT. Made !ctban open menus if more info is needed.
CS:GO Fixes incompatibility with Zephyrus's Team Limit Bypass plugin. Adds spawn check to verify CTBans. Added !forcect/!unforcect to override CTBan and swap players.
Allows custom reasons (configs/ctban_reasons.ini). Allows non-admins to use !isbanned. Added command to reset all CT Ban cookies. Added Player Commands menu for !unctban.
Adds CT Ban to !admin Player Commands menu. Allowed fallback for !isbanned to return ban info even if database log entries were missing. Added !ctbanlist command.
Added CT Ban reason to !ctban chat output where possible. Changed from [SM] to [CTBAN] chat tag and added colors. Removing compile option USESQL (Now Always Uses SQL).
Added !isbanned_offline to find CT Ban info of offline players. !ctban_offline and !unctban_offline now update the log database records.
Added convar sm_ctban_respawn to allow respawns after team swaps due to !ctban or !forcect. Added !change_ctban_time command to edit the time remaining on CTBans.
Added API (ctban.inc) for 3rd-party plugin interfaces. The convar sm_ctban_enable is being removed (disable the plugin to disable functionality).
Upgraded database log table to include an auto incrementing primary key (ban_id) -- automatically upgrades from tables.
Added check for enforcing CTBans if the plugin is loaded late.
1.6.2 Translation file updated. Added admin, time, reason information for !isbanned. Show !rageban results in chat to players. Added ConVar for forcing !ctban reason.
22.214.171.124 Fixed bug preventing console CT bans (thanks Kailo!)
126.96.36.199 Fixed bug with EscapeString function which caused query failures
188.8.131.52 Fixed SQL Injection vulnerability
184.108.40.206 Fixed problem in UTIL_TeamMenu()
1.6.1 Support for new SM1.4 natives, Added config file generation
1.6.0 Added support for new SM1.4 natives
1.5.0 Initial public release
1.4.4 Stable internal build