[FilterScript] Simple Temporary Ban - MySQL Event Scheduler
#1

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.
Reply
#2

Nice One. Good Job REP+
Reply
#3

Nice one!
Reply
#4

Simple but you need to update MySQL plugin..
I think you using outdated MySQL version, mysql_query has been removed long time ago.
Reply
#5

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.
Reply
#6

I thought they've removed mysql_query from the plugin, only supports threaded queries..
Reply
#7

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)