]> jfr.im git - solanum.git/blobdiff - include/client.h
Branch merge
[solanum.git] / include / client.h
index 508b9db25cd034aa3e1b0b3677125ef87da29154..e145aa5476e7f6bb0d7b1f1c624e4223afe94fad 100644 (file)
@@ -53,6 +53,11 @@ struct Blacklist;
 
 #define IDLEN          10
 
+#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
  */
@@ -161,6 +166,7 @@ struct Client
        struct PreClient *preClient;
 
        time_t large_ctcp_sent; /* ctcp to large group sent, relax flood checks */
+       char *certfp; /* client certificate fingerprint */
 };
 
 struct LocalUser
@@ -254,8 +260,12 @@ struct LocalUser
        struct AuthRequest *auth_request;
 
        /* 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 */
+       /* 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;
@@ -433,6 +443,7 @@ struct ListClient
 
 #define CLICAP_MULTI_PREFIX    0x0001
 #define CLICAP_SASL            0x0002
+#define CLICAP_ACCOUNT_HOSTMASK        0x0004
 
 /*
  * flags macros.