[release](Shiny banner goes here)
SourceBans In Lua version 1.531 (Last Update: 25th December 2012)
I’ve been working for a while on getting an implementation of SourceBans going in GLua, so that the benefit of a nice global banning system can be had without the large downside of having to install MetaMod:Source and SourceMod.
The result is Sourcebans.lua!
This is two things in one:
Firstly, it is a complete replacement that a server owner can put in instead of the SourceMod version, and it will continue as normal.
Secondly, it is a tool developers can use to create in-game admin mods that completely integrate with SourceBans, allowing you to view bans in-game and use useful menus instead of the concommands.
For instance, Overv has done this with Evolve, which is now SourceBans compatible.
For Server Owners
- Uninstall or disable Metamod by moving metamod.vdf from garrysmod/addons/ to garrysmod/addons/metamod/.
- Install MySQLOO. Get it [Here].
Place libmySQL.dll orangebox/ and gmsv_mysqloo.dll in orangebox/garrysmod/lua/includes/modules/
- Install SourceBans.lua. Get it [Here].
Download the file and place it in garrysmod/lua/includes/modules/ next to gmsv_mysqlloo.dll.
- Install the setup file. Get it [Here].
Download the file and place it in garrysmod/lua/autorun/server/ and then fill out all the details with your own.
- Start your server.
Everything should work as normal.
I have used the handy LuaDoc system to provide full documentation for the module.
You can find it [Here].
Please report back if you use this or have any trouble.
The people who made SourceBans in the first place.
The people on my server for being unwilling test pilots
Overv for lots of testing and being the first adopter.
1.531 Tiny change to make the source GM13 compatible (no more | operator!) 1.53 sm_rehash now goes through all online players and makes sure their group is up to date. 1.521 Fixed a hang if an admin had no srv_flags and no srv_group 1.52 Added various sm_#say commands at a request, and added a SBANS_NO_COMMANDS global variable to disable all admin commands (for pure lua usage) 1.51 Made it work again 1.5 Made it support gatekeeper 1.41 Fixed yet another 'stop loading admins' glitch 1.4 Added GetAdmins(), made it work a bit more. 1.317 Added even more error prevention when an admin doesn't have a server group but is assigned to the server 1.316 Added error prevention when an admin doesn't have a server group but is assigned to the server 1.315 Made sure callback was always actually a function even when not passed one, fixed a typo. 1.31 Added some error checks, removed some sloppy assumptions and fixed queued ban checks not working. 1.3 Pimped up the concommands and made them report more details 1.22 Added dogroups to the config to disable automatic usergroup setting 1.21 Made it so that the player is only kicked if their user object is available 1.2 Made CheckForBan() and BanPlayerBySteamIDAndIP() accessable 1.12 Made the concommands check that the right amount of arguments had been passed. 1.11 Fixed a typo that stopped the fix working 1.1 Fixed the module freezing the server by pinging the database 10 times a second