Simple Temporary Ban - MySQL Event Scheduler -
Lczy - 14.11.2015
Simple Temporary Ban
Today, i saw this
thread and i decided to make an FS using event scheduler.
Requirement
Before using this filterscript, you must enable the event_scheduler by editing my.ini (Win) or my.cnf (Linux) or by a simple query :
Код:
SET GLOBAL `event_scheduler`= ON
What is the difference between another ban system?
- This FS is using event_scheduler, temporary banned players will be automatically unbanned by the MySQL server.
- You can easily ban a player with a certain time [Day/Hour/Minute/Week/Second/Year/Month]
Syntax :
Код:
/ban <id> <time> [Day/Hour/Minute/Week/Second/Year/Month] <reason>
How to use?
- You just need to redefine these MySQL information with yours.
Код:
#define MYSQL_HOST "HOST" // e.g (localhost)
#define MYSQL_USER ""
#define MYSQL_PASSWORD ""
#define MYSQL_DATABASE ""
Code :
pastebin.com
Note : I just learn MySQL plugin, if you found any bugs, please let me know to improve my knowledge about this plugin.
Re: Simple Temporary Ban - MySQL Event Scheduler -
HydraHumza - 14.11.2015
Nice One. Good Job REP+
Re: Simple Temporary Ban - MySQL Event Scheduler -
Karan007 - 14.11.2015
Nice one!
Re: Simple Temporary Ban - MySQL Event Scheduler -
iKarim - 14.11.2015
Simple but you need to update MySQL plugin..
I think you using outdated MySQL version, mysql_query has been removed long time ago.
Re: Simple Temporary Ban - MySQL Event Scheduler -
Lczy - 14.11.2015
Quote:
Originally Posted by PawnHunter
Simple but you need to update MySQL plugin..
I think you using outdated MySQL version, mysql_query has been removed long time ago.
|
No, i used R39-3, i think its not too outdated.
Re: Simple Temporary Ban - MySQL Event Scheduler -
iKarim - 14.11.2015
I thought they've removed mysql_query from the plugin, only supports threaded queries..
Re: Simple Temporary Ban - MySQL Event Scheduler -
SecretBoss - 14.11.2015
Quote:
Originally Posted by PawnHunter
I thought they've removed mysql_query from the plugin, only supports threaded queries..
|
No it's still there but you can also use threaded queries if you want to