]> jfr.im git - solanum.git/blobdiff - include/client.h
doc: Change missed chadybdis name to solanum (#111)
[solanum.git] / include / client.h
index 894d82fd7e288b3ef15d03b9f4f9d7369710f860..5a86061c61a401f117788e3655cdcecc1cdefb60 100644 (file)
@@ -429,6 +429,7 @@ struct ListClient
 #define FLAGS_EXEMPTSPAMBOT    0x02000000
 #define FLAGS_EXEMPTSHIDE      0x04000000
 #define FLAGS_EXEMPTJUPE       0x08000000
+#define FLAGS_IDENTIFIED       0x10000000      /* owns their current nick */
 
 
 /* flags for local clients, this needs stuff moved from above to here at some point */
@@ -436,7 +437,9 @@ 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 */
+#define LFLAGS_SECURE          0x00000010      /* for marking SSL clients as secure before registration */
+/* LFLAGS_FAKE: client may not have the usually expected machinery plugged in; don't assert on it. For tests only. */
+#define LFLAGS_FAKE            0x00000020
 
 /* umodes, settable flags */
 /* lots of this moved to snomask -- jilles */
@@ -452,7 +455,7 @@ struct ListClient
 /* user information flags, only settable by remote mode or local oper */
 #define UMODE_OPER         0x1000      /* Operator */
 #define UMODE_ADMIN        0x2000      /* Admin on server */
-#define UMODE_SSLCLIENT    0x4000      /* using SSL */
+#define UMODE_SECURE       0x4000      /* has a secure connection */
 
 #define DEFAULT_OPER_UMODES (UMODE_SERVNOTICE | UMODE_OPERWALL | \
                              UMODE_WALLOP | UMODE_LOCOPS)
@@ -494,6 +497,9 @@ struct ListClient
 #define IsTGExcessive(x)       ((x)->flags & FLAGS_TGEXCESSIVE)
 #define SetTGExcessive(x)      ((x)->flags |= FLAGS_TGEXCESSIVE)
 #define ClearTGExcessive(x)    ((x)->flags &= ~FLAGS_TGEXCESSIVE)
+#define IsIdentified(x)                ((x)->flags & FLAGS_IDENTIFIED)
+#define SetIdentified(x)       ((x)->flags |= FLAGS_IDENTIFIED)
+#define ClearIdentified(x)     ((x)->flags &= ~FLAGS_IDENTIFIED)
 
 /* local flags */
 
@@ -509,9 +515,9 @@ 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)
+#define IsSecure(x)            ((x)->localClient->localflags & LFLAGS_SECURE)
+#define SetSecure(x)           ((x)->localClient->localflags |= LFLAGS_SECURE)
+#define ClearSecure(x)         ((x)->localClient->localflags &= ~LFLAGS_SECURE)
 
 /* oper flags */
 #define MyOper(x)               (MyConnect(x) && IsOper(x))
@@ -523,18 +529,17 @@ struct ListClient
 #define IsInvisible(x)          ((x)->umodes & UMODE_INVISIBLE)
 #define SetInvisible(x)         ((x)->umodes |= UMODE_INVISIBLE)
 #define ClearInvisible(x)       ((x)->umodes &= ~UMODE_INVISIBLE)
-#define IsSSLClient(x)         ((x)->umodes & UMODE_SSLCLIENT)
-#define SetSSLClient(x)                ((x)->umodes |= UMODE_SSLCLIENT)
-#define ClearSSLClient(x)      ((x)->umodes &= ~UMODE_SSLCLIENT)
+#define IsSecureClient(x)       ((x)->umodes & UMODE_SECURE)
 #define SendWallops(x)          ((x)->umodes & UMODE_WALLOP)
 #define SendLocops(x)           ((x)->umodes & UMODE_LOCOPS)
 #define SendServNotice(x)       ((x)->umodes & UMODE_SERVNOTICE)
 #define SendOperwall(x)         ((x)->umodes & UMODE_OPERWALL)
-#define IsService(x)           ((x)->umodes & UMODE_SERVICE)
-#define IsDeaf(x)              ((x)->umodes & UMODE_DEAF)
-#define IsNoForward(x)         ((x)->umodes & UMODE_NOFORWARD)
+#define IsService(x)            ((x)->umodes & UMODE_SERVICE)
+#define IsDeaf(x)               ((x)->umodes & UMODE_DEAF)
+#define IsNoForward(x)          ((x)->umodes & UMODE_NOFORWARD)
 
 #define SetGotId(x)             ((x)->flags |= FLAGS_GOTID)
+#define ClearGotId(x)           ((x)->flags &= ~FLAGS_GOTID)
 #define IsGotId(x)              (((x)->flags & FLAGS_GOTID) != 0)
 
 #define IsExemptKline(x)        ((x)->flags & FLAGS_EXEMPTKLINE)