ULX Global Ban
A Global Ban System designed to be used only with ULX & ULib Garry’s Mod servers.
This is my first public release. The code should be well documented!
Created out of necessity.
Created by NigNog (Bcool) and Adobe Ninja.
This addon literally does not require any editing of ULX / ULib, just place into your addons folder and set up the configuration file!
Uses MySQLOO, and requires a MySQL database.
Server Identification: When your server starts, it checks to see whether or not the IP:Port configuration is already there. If it is it will set the servers ID, if not it’ll create it and assign the server a new ID.
Bans: This addon overwrites the exists ULib function to add a ban, and inserts it into the MySQL Database.
Authentication: When the server Auths a player, the point where the SteamID is retrived and the normal ban status is checked, this addon checks the MySQL server to see if the user has been banned.
Information: When a user has been banned, their SteamID, Current Name, Reason, ServerID of the server which they where banned on, Admin(Banner) SteamID and Current admin name are all saved in the MySQL Database.
Each time your server is started, the hostname is automagicly updated in the MySQL database.
Really the addon converts the data ULib receives into a MySQL database and back again, extremely useful for multiple servers. With easy of access in mind. Since all the bans show on the XGUI menus, no touching the database is needed apart from setup!
Nothing - Suggestions welcome!
[1.1 Beta] [CHG] Replaced old error messages with new ones that will tell you what's going the f*ck on.. [1.0 Beta] [ADD] A beta conversion system for old ULX Bans, (Each ban needs all the standard information so it will convert properly!) [CHG] Moved over the Auth Code Section to the new CheckPassword hook. Which makes the refresh timer to be required at all times! [REM] Removed GateKeeper code. [REM] Some unused code. [0.6 Beta] [FIX] Fixed SQL Injection! [0.51 Beta] [FIX] My Stupid Errors [0.5 Beta] [ADD] Ban removal. [ADD] Ban Modification. [ADD] Ban listing in the xgui menus. [ADD] Ban sync, your bans defaulty sync with the MySQL DB every 30 seconds. [ADD] Config file with a small amount of configs for extra control. [ADD] Limited GateKeeper functionality. (Doesn't really work yet). [FIX] Permanently Banned users could still get through. [CHG] SQL Table Structure to incorporate all ULX ban details. [Release 0.1 Beta]
Place the addon (ULX_GlobalBanModule), in your servers addons folder.
Inside the ULX_GlobalBanModule folder there will be ULX_GlobalBans.sql, insert/upload the SQL file into your MySQL database.
Again, inside the ULX_GlobalBanModule folder, under lua\globalban edit the file gb_config.lua to your needs.
If it errors on startup /changemap on the file gb_banmanagement.lua Line 130, don’t worry it’s just Gmod’s addon loading screwing around with it.
Most of the errors people are have been encountering have been on their of the own fault. If you do get an error, please post a full server log (PasteBin or Similar) along with the specific error!
*Check the addon’s configs are setup correctly!
*Check you’ve actually installed MySQLOO correctly!!!
*Check MySQL isn’t being blocked by the firewall, or the webhost!
*Check the MySQL user permissions if not using root!
This addon removes all current ULX bans! Be sure to back them up! (I HAVE A CONVERTER NOW!! Read above!)
Feel free to request features / post constructive criticism, or help out with the code!
Special thanks to Q4-Bi. for his personal re-release of the website source code that he put his time into.
Another special thanks to TheCodingBeast for releasing an more modern theme, which is now included into the GitHub Repository. Also with creating a simple video tutorial on how to install the addon!
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License