ULX Global Ban

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!

INFO

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.

FEATURES

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!

PLANED/TODO

Nothing - Suggestions welcome!

CHANGELOG



[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]


INSTALLATION

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.

NOTES

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.
Version 1.2
Download: http://www.mediafire.com/?jw9pcxdh76replx

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!

http://i.creativecommons.org/l/by-nc-sa/3.0/88x31.png
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License

Wow nice job, this should come in handy.

Geee thanks buddy, ***You should probably work on some sort of donator system for the public or atleast give a certain someone it :wink: :wink: :wink: :wink:


(Cool kid only joke^)

Installed and works good so far :slight_smile: Hated the website tho =P Did some personal edits, i show you the page soon.

It was really just an example to show how it’s done, the PSD files are included anyway. Glad to hear!

Maybe you should 1.Hire a lua coder and stop trying to get this coder to do free stuff for you and 2.Stop writing like this.

Well as i said i would get a sleak awesome webpage done, and here it is. Its all auto-matic with mysql and shiz.

http://ban-hammer.net/ban/

Thanks for this nick, It was really helpful

[editline]20th December 2012[/editline]

Amazing work there

–SNIP-

Fixed :smiley:

try to make support for assmod and exesto

Addon broke on the last update of garrysmod :frowning:

I’ll see what I can do, but ULX seems to be the most popular admin mod around, I rather iron out all the bugs / issues with it first.

Should be fix now V0.51. (GitHub)

Hey guys just realesed version 1.2 of the skin, old PHP versions were have trouble with the require statement. I’ve added support for both, one is just commeted, this is located above the DB config; also this is working with version 0.6.

Download: http://www.mediafire.com/?jw9pcxdh76replx

Exesto can’t support itself :v:

I’m getting this error when any joins the server(aka a bot), and sometimes it doesn’t give me this error and ends up actually making the server in the server table.



ulx_globalbanmodule/lua/globalban/gb_serverheartbeat.lua:40: attempt to concatenate global 'GB_SERVERID' (a nil value)


Though when I try to ban someone, it gives more errors.



[ULX GB] - Database Connection Restarted


it actually breaks the server, like a little windows screen pops up saying “srcds.exe has stopped working” but before it does fully crash, it says in console



[ULX GB] (BanStatus) - Error: [Query:1ACCA850]


Please fix this, this looks like a real good addon.

Did you upload the SQL file to your MySQL database? If so re-download the addon from github.

Sorry for a late reply!

Everybody that tries to use this gets this error, I modified the SQL file a little and still got the error no matter what.

I can’t seem to replicate the error, I’m using the latest GitHub version of my addon and the latest ULX & ULIB.

I had to remove the plugin my self for the error above was happening.

I’m getting a server crash about 1 minute after joining, No visual error at the moment?
Any Idea?