X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/d4b2529a61fb48ebcd54bc0fcc6f400f97bfe251..04e5ed6c57154114cca330767e3bfb1006b46ee9:/include/client.h diff --git a/include/client.h b/include/client.h index f00cfad4..d3ff6a57 100644 --- a/include/client.h +++ b/include/client.h @@ -79,6 +79,9 @@ struct User char *away; /* pointer to away message */ int refcnt; /* Number of times this block is referenced */ + char *opername; /* name of operator{} block being used or tried (challenge) */ + struct PrivilegeSet *privset; + char suser[NICKLEN+1]; }; @@ -225,7 +228,6 @@ struct LocalUser */ char *passwd; char *auth_user; - char *opername; /* name of operator{} block being used or tried (challenge) */ char *challenge; char *fullcaps; char *cipher_string; @@ -282,8 +284,6 @@ struct LocalUser uint16_t cork_count; /* used for corking/uncorking connections */ struct ev_entry *event; /* used for associated events */ - struct PrivilegeSet *privset; /* privset... */ - char sasl_agent[IDLEN]; unsigned char sasl_out; unsigned char sasl_complete; @@ -439,6 +439,7 @@ struct ListClient #define LFLAGS_FLUSH 0x00000002 #define LFLAGS_CORK 0x00000004 #define LFLAGS_SCTP 0x00000008 +#define LFLAGS_INSECURE 0x00000010 /* for marking SSL clients as insecure before registration */ /* umodes, settable flags */ /* lots of this moved to snomask -- jilles */ @@ -451,7 +452,6 @@ struct ListClient #define UMODE_SERVICE 0x0040 #define UMODE_DEAF 0x0080 #define UMODE_NOFORWARD 0x0100 /* don't forward */ -#define UMODE_REGONLYMSG 0x0200 /* only allow logged in users to msg */ /* user information flags, only settable by remote mode or local oper */ #define UMODE_OPER 0x1000 /* Operator */ @@ -513,6 +513,10 @@ struct ListClient #define SetSCTP(x) ((x)->localClient->localflags |= LFLAGS_SCTP) #define ClearSCTP(x) ((x)->localClient->localflags &= ~LFLAGS_SCTP) +#define IsInsecure(x) ((x)->localClient->localflags & LFLAGS_INSECURE) +#define SetInsecure(x) ((x)->localClient->localflags |= LFLAGS_INSECURE) +#define ClearInsecure(x) ((x)->localClient->localflags &= ~LFLAGS_INSECURE) + /* oper flags */ #define MyOper(x) (MyConnect(x) && IsOper(x)) @@ -538,7 +542,6 @@ struct ListClient #define IsService(x) ((x)->umodes & UMODE_SERVICE) #define IsDeaf(x) ((x)->umodes & UMODE_DEAF) #define IsNoForward(x) ((x)->umodes & UMODE_NOFORWARD) -#define IsSetRegOnlyMsg(x) ((x)->umodes & UMODE_REGONLYMSG) #define SetGotId(x) ((x)->flags |= FLAGS_GOTID) #define IsGotId(x) (((x)->flags & FLAGS_GOTID) != 0) @@ -578,9 +581,15 @@ struct ListClient #define SHOW_IP 1 #define MASK_IP 2 +enum +{ + D_LINED, + K_LINED +}; + extern void check_banned_lines(void); -extern void check_klines_event(void *unused); extern void check_klines(void); +extern void check_one_kline(struct ConfItem *kline); extern void check_dlines(void); extern void check_xlines(void); extern void resv_nick_fnc(const char *mask, const char *reason, int temp_time); @@ -592,6 +601,7 @@ extern void init_client(void); extern struct Client *make_client(struct Client *from); extern void free_pre_client(struct Client *client); +extern void notify_banned_client(struct Client *, struct ConfItem *, int ban); extern int exit_client(struct Client *, struct Client *, struct Client *, const char *); extern void error_exit_client(struct Client *, int);