Jump to page content
English English   Polish Polish   Dutch Dutch   Russian Russian   German German   Hungarian Hungarian   Norwegian Norwegian   Swedish Swedish   Finnish Finnish   Romanian Romanian   Spanish Spanish   Portuguese Portuguese   Latvian Latvian  
Homepage
Home
Register
Login

Resources
Forum
Wiki
Servers

rssbans (sqlbans)

Category:script
Author(s):arranTuna
Downloads:2077
Rate:You need to be logged in to vote
Rating:3.5 (23 Votes)
Description:
SQLban system is more flexible for servers allowing you to have a ban system exactly how you want. It uses SQL rather than the inbuilt XML ban system. Please bear in mind this resource is still in development and may lack every feature a ban system could have.

http://wiki.multitheftauto.com/wiki/Resource:Sqlbans

ACL Access Required:
function.getClientIP (The resource uses getPlayerIP though)
function.getPlayerSerial
function.kickPlayer
function.removeBan (Only if you want to clear XML bans after conversion)

Exports:
addBanSQL(string banvalue, string/element banisher, string reason, int duration) - true or false
getBansSQL() - table [index] = {banval, banisher, reason, duration}
getBanDetailsSQL(string banvalue) - ban value, banisher, reason, duration
banPlayerSQL(element player, bool serial, bool ip, string/element banisher, string reason, integer duration) - true or false
removeBanSQL(value, unbanisher) - true or false

/cxmltsql (to add all xml bans to sql db)
/cxmltsql delete (add all xml bans to sql db then clear xml file but requires resource to have access to "function.removeBan") Temporary XML bans can't be added so just let them expire.
To use the above commands you will require access to "command.ban" in the ACL.

To do list:
Support IPv6 bans later on
Support IP wildcard bans
Add some commands for banining/unbaning/etc
Add in more options to make it more flexible
Make it perfect
...

(more)

Download latest version | Report

Version history

Version Publish Date Changes
1.2.0 2012-04-04 14:06:56 Download
1.1.3 2011-03-23 02:29:58 Fixed the ban messages when a player tries to connect but is denied. For some reason they stopped working but tostring() seems to fix it, but surely if the string was invalid then it would have given a debug error? Well for some reason there was none and the tostrings seem to have fixed it and they must have been string or number in the first place because it works perfectly now. Weird. Download
1.1.2 2011-03-02 00:43:14 Changed all ipairs to pairs to fix the things I broke in the last version. Download
1.1.1 2011-02-27 20:52:22 Further fixed bans not working. Download
1.1.0 2011-02-23 01:27:22 Added a command to convert all your XML (permanent only) bans into SQL bans. You require access to "command.ban" in ACL.

/cxmltsql (to add all xml bans to sql db)
/cxmltsql delete (add all xml bans to sql db then clear xml file but requires resource to have access to "function.removeBan")

Temporary XML bans can't be added so just let them expire.
Download
1.0.2 2011-02-20 22:28:22 Added some string.gsubs to remove ' and \ in player names and ban reasons to prevent SQL errors. Download
1.0.1 2011-02-17 22:34:26 Made removeBanSQL actually work as sometimes it didn't. Download
1.0.0 2011-02-01 19:09:51 First public release Download