]> jfr.im git - solanum.git/blobdiff - include/client.h
Trying to fix packet.c
[solanum.git] / include / client.h
index 94256ade42979f4d660216f36e6fbd9c5c016796..11b71f465c6fd9f3d45a8f2d96c48894c2647aa6 100644 (file)
@@ -287,9 +287,9 @@ struct LocalUser
        unsigned long random_ping;
        auth_request_t  *auth_request;
 
-       /* target change stuff */\r
-       void *targets[10];              /* targets were aware of */\r
-       rb_uint8_t targinfo[2]; /* cyclic array, no in use */\r
+       /* target change stuff */
+       uint32_t targets[10];           /* targets were aware of (fnv32(use_id(target_p))) */
+       unsigned int targinfo[2];       /* cyclic array, no in use */
        time_t target_last;             /* last time we cleared a slot */
 
        list_client_t *safelist_data;
@@ -297,7 +297,9 @@ struct LocalUser
        char *mangledhost; /* non-NULL if host mangling module loaded and
                              applicable to this client */
 
-       struct rb_sockaddr_storage *lip;        /* alloc before auth/freed after auth */
+       struct rb_sockaddr_storage *lip;        /* alloc before auth/freed after auth */\r
+       struct _ssl_ctl *ssl_ctl;               /* which ssl daemon we're associate with */
+       rb_uint32_t localflags;
 };
 
 struct PreClient
@@ -463,6 +465,10 @@ struct exit_client_hook
 #define FLAGS2_EXEMPTSHIDE     0x40000000
 #define FLAGS2_EXEMPTJUPE      0x80000000
 
+/* flags for local clients, this needs stuff moved from above to here at some point */\r
+#define LFLAGS_SSL             0x00000001\r
+#define LFLAGS_FLUSH           0x00000002
+
 #define DEFAULT_OPER_UMODES (UMODE_SERVNOTICE | UMODE_OPERWALL | \
                              UMODE_WALLOP | UMODE_LOCOPS)
 #define DEFAULT_OPER_SNOMASK SNO_GENERAL
@@ -505,6 +511,16 @@ struct exit_client_hook
 #define ClearDynSpoof(x)       ((x)->flags &= ~FLAGS_DYNSPOOF)
 #define IsExUnknown(x)         ((x)->flags & FLAGS_EXUNKNOWN)
 #define SetExUnknown(x)                ((x)->flags |= FLAGS_EXUNKNOWN)
+\r
+/* local flags */\r
+\r
+#define IsSSL(x)               ((x)->localClient->localflags & LFLAGS_SSL)\r
+#define SetSSL(x)              ((x)->localClient->localflags |= LFLAGS_SSL)\r
+#define ClearSSL(x)            ((x)->localClient->localflags &= ~LFLAGS_SSL)\r
+\r
+#define IsFlush(x)             ((x)->localClient->localflags & LFLAGS_FLUSH)\r
+#define SetFlush(x)            ((x)->localClient->localflags |= LFLAGS_FLUSH)\r
+#define ClearFlush(x)          ((x)->localClient->localflags &= ~LFLAGS_FLUSH)
 
 /* oper flags */
 #define MyOper(x)               (MyConnect(x) && IsOper(x))
@@ -611,6 +627,7 @@ extern void close_connection(struct Client *);
 extern void init_uid(void);
 extern char *generate_uid(void);
 
+void flood_endgrace(struct Client *);
 void allocate_away(struct Client *);\r
 void free_away(struct Client *);