· 7 years ago · Feb 03, 2019, 10:26 AM
1
2drop table if exists opcode_protection;
3create table if not exists opcode_protection
4(
5 `opcode` int unsigned not null comment 'Opcode to protect, see Opcodes.h',
6 `threshold` int unsigned not null comment 'Sets the maximum count one protected packet per Interval can be processed per session.',
7 `interval` int unsigned not null comment 'Interval for threshold, in milliseconds.',
8 `penalty` tinyint unsigned not null comment 'What should happen if the threshold per interval is passed. 0 - Skip, 1 - Kick',
9 `comment` varchar(255) not null default '',
10
11 PRIMARY KEY opcode (opcode)
12) engine=InnoDB;
13
14insert into opcode_protection values
15(0x062, 3, 1000, 0, "/who - 3 per second"),
16(0x205, 1, 2000, 1, "ticket create - 1 per 2 seconds"),
17(0x207, 1, 2000, 1, "ticket update - 1 per 2 seconds"),
18(0x238, 1, 1000, 1, "send mail - 1 per second"),
19(0x23A, 3, 1000, 0, "get mail list - 3 per second");