View Single Post
Author Message
ratawar
BANNED
Join Date: Dec 2017
Location: GB
Old 09-17-2020 , 10:55   [ANY] CallAdmin Block v2.3 (03/07/2022)
Reply With Quote #1

[ANY] CallAdmin Block

About

This is a module for CallAdmin written by dordnung and Impact, that facilitates blocking people from using CallAdmin.


Source

The source code can be found here.

Commands

sm_calladmin_block_add <user | STEAM_0:X:XXXXX> <time> [alias]
sm_cb_add <user | STEAM_0:X:XXXXX> <time> [alias]

sm_calladmin_block_remove <user | STEAM_0:X:XXXXX>
sm_cb_remove <user | STEAM_0:X:XXXXX>

sm_calladmin_block_list
sm_cb_list

Usage

Banning users
  • To ban a user, you must specify 2 arguments in the add command: a Steam ID or an in-game target, and the ban time.
    • Ban time is in minutes, send 0 to indicate a permanent ban
  • The third argument is an optional alias to keep track of who you've banned.
    • If you ban an in-game target without specifying an alias, his name will be automatically added as alias
    • If you ban a Steam ID without a target, it will be added to the ban list alias-less.
    • Alias is one word only!
  • If you attempt to ban a user who was already banned, his ban time and alias will be overwritten with what you specified!

Code:
sm_cb_add STEAM_0:1:109770789 30 somealias
Code:
sm_cb_add ampere 60
Unbanning users
  • To unban a user, you can either use the specific command built for that, or open the banlist and do it from there.
    • The command takes only one argument: either a valid Steam ID, or an in-game user.

Code:
sm_cb_remove STEAM_0:1:109770789
Code:
sm_cb_remove ampere
Viewing the ban list
  • The plugin features a powerful menu capable of showing all the bans in the database, as well as accessing each individual ban's details.
    • As you enter a ban's details panel, you have the option to unban that player right away.

Code:
sm_cb_list
Installation

Drag all contents of the zip file inside your <game>/addons/sourcemod/ folder and restart your server.

The plugin uses as database connection name "calladmin_block", so in your <game>/addons/sourcemod/configs/databases.cfg you need to add your database details like so:

Code:
"calladmin_block"
{
	"driver" 			        "mysql"
	"host" 				"your-host-here"
	"database" 			"db-name-here"
	"user" 				"username-here"
	"pass" 				"pw-here"
	"port" 				"3306" // (most likely)
}
Changelog
  • v1.0 (September 17, 2020)
    • Initial release
  • v1.1 (September 17, 2020)
    • Patched memory leaks
  • v2.0 (September 27, 2020)
    • Ditched Files for MySQL user ban storage
    • Added support for temporal and permanent bans
    • Added support for issuing bans with a reference custom alias
  • v2.1 (September 30, 2020)
    • Extra GetAuthId checks
    • Removed redundancies
    • Edited queries to override ban time issue as well on duplicate ban
    • Added some extra returns and deletes to prevent memory leaks
  • v2.3 (March 7, 2022)
    • Added extra database validations (thanks Addie)
    • Added new command aliases (!cb_add, !cb_remove, !cb_list)

TO-DO
  • Add support for SQLite
Attached Files
File Type: zip calladmin-block-v2.3.zip (24.9 KB, 169 views)

Last edited by ratawar; 03-07-2022 at 21:25.
ratawar is offline
Send a message via ICQ to ratawar Send a message via AIM to ratawar Send a message via Yahoo to ratawar Send a message via Skype™ to ratawar