mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-29 16:06:37 +02:00
- internal: Modified TKL system (getting ready for anti-spam system):
Instead of 1 big list of *lines, it's now an array to easily distinct between types. Also made tk->usermask static (USERLEN+2) instead of dynamic. These changes should give enough speed improvement to make the new anti-spam/anti-ads feature fast enough.
This commit is contained in:
+7
-2
@@ -729,8 +729,11 @@ struct Server {
|
||||
|
||||
struct t_kline {
|
||||
aTKline *prev, *next;
|
||||
int type;
|
||||
char *usermask, *hostmask, *reason, *setby;
|
||||
int type;
|
||||
unsigned short subtype; /* these 2 are only used.. */
|
||||
unsigned short action; /* ..for anti-spam TKL's */
|
||||
char usermask[USERLEN+2]; /* room for '*' and a nul byte [usually 10+2=12] */
|
||||
char *hostmask, *reason, *setby;
|
||||
TS expire_at, set_at;
|
||||
};
|
||||
|
||||
@@ -1624,6 +1627,8 @@ int throttle_can_connect(struct IN_ADDR *in);
|
||||
#define BANCHK_MSG 1 /* checking if a ban forbids the person from sending messages */
|
||||
#define BANCHK_NICK 2 /* checking if a ban forbids the person from changing his/her nick */
|
||||
|
||||
#define TKLISTLEN 26
|
||||
|
||||
#endif /* __struct_include__ */
|
||||
|
||||
#include "dynconf.h"
|
||||
|
||||
Reference in New Issue
Block a user