View Single Post
Author Message
sfPlayer
Senior Member
Join Date: Dec 2007
Location: Germany
Old 02-11-2008 , 20:03   SUM - global admins, bans and antifake
Reply With Quote #1

SUM is a lightweight and efficient solution for managing global admins and bans ingame. It furthermore provides a system against nick faking by storing nicknames and displaying the 3 most often used ones when a player connects.

The global admin system supports Mani's Admin Plugin including basic admin flag translation from SourceMod admin levels.


Requirements
Optional: SUM uses a MySQL 5 (or later) database reachable by all gameservers for global features, if you are using SQLite you are restricted to local functionality only.
Optional: Mani Admin Plugin 1.2s


Installation
All
  • Copy the compiled plugin file to addons/sourcemod/plugins
  • Change the map after setting the database up
  • If sum_stats reports "Database online" the setup was successful
MySQL automated
  • sum_setup mysql <host> <database> <user> <password> [<port>]
SQLite
  • sum_setup sqlite
MySQL manual (if the SUM DB-user doesn't have CREATE TABLE privileges)
  • Run the contents of sum.sql.txt in your favourite MySQL client after selecting a database. If you use PHPMyAdmin just copy the content into the SQL window/tab and submit it.
  • Add an entry to addons/sourcemod/configs/databases.cfg called sumdb including the required settings for connecting to your MySQL server.

Update
If you update from an older version to version 1.4.0 you have to run the content of sum_update_130_140.sql.txt in your sum MySQL database.


Usage
Banning/Unbanning
SUM's global ban feature triggers on the well know sm_ban, sm_addban and sm_unban commands including the functions available in the admin menu. Bans/Unbans created by other plugins using BanClient() etc. are also included if they satisfy the requirements for creating a forward. All bans longer than 10 minutes will be converted to global bans.
sum_banlog [<name|#userid|steamid|unknown>] [<target|creator>=target] lists previous bans.

Admins
sum_admins lists all players with global admin permissions. (limited to 100)
sum_setadmin <steamid> <permissions|none|light|default|full|root> sets the global admin permissions for a player, the permission none will remove them.
none = no admin
light = 4079 (no unban, cheats, rcon, root, custom flags)
default = 12287 (no rcon, root, custom flags)
full = 16383 (no root, custom flags)
root = 32767 (all permissions)
Permission levels can be changed in the source file before compiling it.
example: sum_setadmin STEAM_0:0:1234 full (gives STEAM_0:0:1234 full global admin permissions)
example: sum_setadmin STEAM_0:0:1234 none (removes global admin permissions for STEAM_0:0:1234)

Other stuff
sum_stats lists the number of users and names in the database.


Changelog
Version 1.5.0
- added sum_setup
- made all database queries SQLite compatible
- updated plugin information to match this thread
Version 1.4.1
- fixed permanent bans (thx to 35Lazy)
Version 1.4.0
- fixed race condition in mani detection
- display how often somebody has been banned when he joins (if >0)
- added sum_banlog
Version 1.3.0
- sum_admins is compatible with rcon (->HLSW&co)
- check if Mani's Admin Plugin is present
Version 1.2.2

- fixed a rarely used message
Version 1.2.1
- quoted reason to prevent a SQL injection
Version 1.2.0
- initial public release
Attached Files
File Type: txt sum.sql.txt (895 Bytes, 1152 views)
File Type: txt sum_update_130_140.sql.txt (92 Bytes, 879 views)
File Type: sp Get Plugin or Get Source (sum.sp - 3181 views - 27.6 KB)

Last edited by sfPlayer; 02-25-2008 at 00:42.
sfPlayer is offline