1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-09 05:03:13 +02:00

Add support for ban exceptions, via /ELINE and via the config file.

Still need to fix some FIXME/TODO items and things haven't been
fully tested yet, so server sync issues or crashes are still possible.
Release notes will be updated another day as well..
This commit is contained in:
Bram Matthys
2019-09-01 20:45:47 +02:00
parent 76b1655f9b
commit 58618bf2b6
10 changed files with 532 additions and 451 deletions
+1
View File
@@ -714,6 +714,7 @@ extern MODVAR void (*broadcast_md_globalvar)(ModDataInfo *mdi, ModData *md);
extern MODVAR void (*broadcast_md_globalvar_cmd)(aClient *except, aClient *sender, char *varname, char *value);
extern MODVAR int (*tkl_ip_hash)(char *ip);
extern MODVAR int (*tkl_ip_hash_type)(int type);
extern MODVAR int (*find_tkl_exception)(int ban_type, aClient *cptr);
/* /Efuncs */
extern MODVAR aMotdFile opermotd, svsmotd, motd, botmotd, smotd, rules;
+2 -1
View File
@@ -972,7 +972,7 @@ int hooktype_remote_nickchange(aClient *cptr, aClient *sptr, char *newnick);
int hooktype_channel_create(aClient *sptr, aChannel *chptr);
int hooktype_channel_destroy(aChannel *chptr, int *should_destroy);
int hooktype_remote_chanmode(aClient *cptr, aClient *sptr, aChannel *chptr, char *modebuf, char *parabuf, time_t sendts, int samode);
int hooktype_tkl_except(aClient *cptr, aTKline *tkl);
int hooktype_tkl_except(aClient *cptr, int ban_type);
int hooktype_umode_change(aClient *sptr, long setflags, long newflags);
int hooktype_topic(aClient *cptr, aClient *sptr, aChannel *chptr, char *topic);
int hooktype_rehash_complete(void);
@@ -1245,6 +1245,7 @@ enum EfunctionType {
EFUNC_FIND_TKL_BANEXCEPTION,
EFUNC_FIND_TKL_NAMEBAN,
EFUNC_FIND_TKL_SPAMFILTER,
EFUNC_FIND_TKL_EXCEPTION,
};
/* Module flags */
+3 -6
View File
@@ -716,6 +716,9 @@ struct Server {
#define TKL_SPAMF 0x0020
#define TKL_NAME 0x0040
#define TKL_EXCEPTION 0x0080
/* these are not real tkl types, but only used for exceptions: */
#define TKL_THROTTLE 0x1000
#define TKL_BLACKLIST 0x2000
#define TKLIsServerBan(tkl) ((tkl)->type & (TKL_KILL|TKL_ZAP|TKL_SHUN))
#define TKLIsServerBanType(tpe) ((tpe) & (TKL_KILL|TKL_ZAP|TKL_SHUN))
@@ -1072,12 +1075,6 @@ struct _configflag_tld
#define CRULE_ALL 0
#define CRULE_AUTO 1
#define CONF_EXCEPT_BAN 1
#define CONF_EXCEPT_TKL 2
#define CONF_EXCEPT_THROTTLE 3
#define CONF_EXCEPT_BLACKLIST 4
struct _configitem {
ConfigItem *prev, *next;
ConfigFlag flag;