X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/d29b1834c36ec874e67374244eb9c12772397f8f..ccfc9b567df2e2b6926f328fdbc6cf74970e2987:/include/client.h?ds=inline diff --git a/include/client.h b/include/client.h index 22b7662..dbd6910 100644 --- a/include/client.h +++ b/include/client.h @@ -53,7 +53,10 @@ struct Blacklist; #define IDLEN 10 -#define TGCHANGE_NUM 10 /* how many targets we keep track of */ +#define TGCHANGE_NUM 10 /* how many targets we keep track of */ +#define TGCHANGE_REPLY 5 /* how many reply targets */ +#define TGCHANGE_INITIAL 10 /* initial free targets (normal) */ +#define TGCHANGE_INITIAL_LOW 4 /* initial free targets (possible spambot) */ /* * pre declare structs @@ -257,8 +260,12 @@ struct LocalUser struct AuthRequest *auth_request; /* target change stuff */ - uint32_t targets[TGCHANGE_NUM]; /* targets were aware of (fnv32(use_id(target_p))) */ - unsigned int targinfo[2]; /* cyclic array, no in use */ + /* targets we're aware of (fnv32(use_id(target_p))): + * 0..TGCHANGE_NUM-1 regular slots + * TGCHANGE_NUM..TGCHANGE_NUM+TGCHANGE_REPLY-1 reply slots + */ + uint32_t targets[TGCHANGE_NUM + TGCHANGE_REPLY]; + unsigned int targets_free; /* free targets */ time_t target_last; /* last time we cleared a slot */ struct ListClient *safelist_data; @@ -414,6 +421,7 @@ struct ListClient #define UMODE_DEAF 0x0080 #define UMODE_NOFORWARD 0x0100 /* don't forward */ #define UMODE_REGONLYMSG 0x0200 /* only allow logged in users to msg */ +#define UMODE_NOCTCP 0x0400 /* block CTCPs except for ACTION */ /* user information flags, only settable by remote mode or local oper */ #define UMODE_OPER 0x1000 /* Operator */ @@ -507,6 +515,7 @@ struct ListClient #define IsDeaf(x) ((x)->umodes & UMODE_DEAF) #define IsNoForward(x) ((x)->umodes & UMODE_NOFORWARD) #define IsSetRegOnlyMsg(x) ((x)->umodes & UMODE_REGONLYMSG) +#define IsSetNoCTCP(x) ((x)->umodes & UMODE_NOCTCP) #define SetGotId(x) ((x)->flags |= FLAGS_GOTID) #define IsGotId(x) (((x)->flags & FLAGS_GOTID) != 0)