]> jfr.im git - solanum.git/blobdiff - include/client.h
Merge pull request #260 from FauxFaux/yesno-1
[solanum.git] / include / client.h
index 43d3dfe765dcdb51e66e89d1236cecca86ab7084..89c4cf8a4ac73a4c3ceef82b057b682456dc8786 100644 (file)
@@ -43,7 +43,6 @@ struct Blacklist;
 #define HOSTIPLEN      53      /* sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255.ipv6") */
 #define PASSWDLEN      128
 #define CIPHERKEYLEN   64      /* 512bit */
-#define CLIENT_BUFSIZE 512     /* must be at least 512 bytes */
 
 #define IDLEN          10
 
@@ -127,7 +126,7 @@ struct Client
        unsigned long serial;   /* used to enforce 1 send per nick */
 
        /* client->name is the unique name for a client nick or host */
-       char name[HOSTLEN + 1];
+       char name[NAMELEN + 1];
 
        /*
         * client->username is the username from ident or the USER message,
@@ -254,7 +253,7 @@ struct LocalUser
         */
        int sent_parsed;        /* how many messages we've parsed in this second */
        time_t last_knock;      /* time of last knock */
-       unsigned long random_ping;
+       uint32_t random_ping;
 
        /* target change stuff */
        /* targets we're aware of (fnv32(use_id(target_p))):
@@ -294,6 +293,9 @@ struct LocalUser
        time_t sasl_next_retry;
 };
 
+#define AUTHC_F_DEFERRED 0x01
+#define AUTHC_F_COMPLETE 0x02
+
 struct AuthClient
 {
        uint32_t cid;   /* authd id */
@@ -302,6 +304,7 @@ struct AuthClient
        char cause;     /* rejection cause */
        char *data;     /* reason data */
        char *reason;   /* reason we were rejected */
+       int flags;
 };
 
 struct PreClient
@@ -433,6 +436,7 @@ struct ListClient
 #define LFLAGS_SSL             0x00000001
 #define LFLAGS_FLUSH           0x00000002
 #define LFLAGS_CORK            0x00000004
+#define LFLAGS_SCTP            0x00000008
 
 /* umodes, settable flags */
 /* lots of this moved to snomask -- jilles */
@@ -503,6 +507,10 @@ struct ListClient
 #define SetFlush(x)            ((x)->localClient->localflags |= LFLAGS_FLUSH)
 #define ClearFlush(x)          ((x)->localClient->localflags &= ~LFLAGS_FLUSH)
 
+#define IsSCTP(x)              ((x)->localClient->localflags & LFLAGS_SCTP)
+#define SetSCTP(x)             ((x)->localClient->localflags |= LFLAGS_SCTP)
+#define ClearSCTP(x)           ((x)->localClient->localflags &= ~LFLAGS_SCTP)
+
 /* oper flags */
 #define MyOper(x)               (MyConnect(x) && IsOper(x))
 
@@ -581,7 +589,6 @@ extern int is_remote_connect(struct Client *);
 extern void init_client(void);
 extern struct Client *make_client(struct Client *from);
 extern void free_pre_client(struct Client *client);
-extern void free_client(struct Client *client);
 
 extern int exit_client(struct Client *, struct Client *, struct Client *, const char *);