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