]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
Move various flags from flags2 to flags.
authorJilles Tjoelker <redacted>
Mon, 24 Dec 2007 19:58:55 +0000 (20:58 +0100)
committerJilles Tjoelker <redacted>
Mon, 24 Dec 2007 19:58:55 +0000 (20:58 +0100)
include/client.h
modules/m_cap.c
modules/m_pong.c
src/s_user.c

index a7e06360c7b725f96f6045e23643937be876d912..00c01e5080ee51b8d1afeb62aef0dceefeab1a7c 100644 (file)
@@ -415,8 +415,11 @@ struct exit_client_hook
 #define FLAGS_DEAD        0x0002       /* Local socket is dead--Exiting soon */
 #define FLAGS_KILLED       0x0004      /* Prevents "QUIT" from being sent for this */
 #define FLAGS_SENTUSER     0x0008      /* Client sent a USER command. */
+#define FLAGS_CLICAP       0x0010      /* In CAP negotiation, wait for CAP END */
 #define FLAGS_CLOSING      0x0020      /* set when closing to suppress errors */
+#define FLAGS_PING_COOKIE  0x0040      /* has sent ping cookie */
 #define FLAGS_GOTID        0x0080      /* successful ident lookup achieved */
+#define FLAGS_FLOODDONE    0x0100      /* flood grace period over / reported */
 #define FLAGS_NORMALEX     0x0400      /* Client exited normally */
 #define FLAGS_SENDQEX      0x0800      /* Sendq exceeded */
 #define FLAGS_SERVLINK     0x10000     /* servlink has servlink process */
@@ -457,10 +460,7 @@ struct exit_client_hook
 #define FLAGS2_EXEMPTFLOOD      0x0400000
 #define FLAGS2_NOLIMIT          0x0800000
 #define FLAGS2_IDLE_LINED       0x1000000
-#define FLAGS2_CLICAP          0x2000000
-#define FLAGS2_PING_COOKIE      0x4000000
 #define FLAGS2_IP_SPOOFING      0x8000000
-#define FLAGS2_FLOODDONE        0x10000000
 #define FLAGS2_EXEMPTSPAMBOT   0x20000000
 #define FLAGS2_EXEMPTSHIDE     0x40000000
 #define FLAGS2_EXEMPTJUPE      0x80000000
@@ -563,8 +563,8 @@ struct exit_client_hook
 /* for local users: flood grace period is over
  * for servers: mentioned in networknotice.c notice
  */
-#define IsFloodDone(x)          ((x)->flags2 & FLAGS2_FLOODDONE)
-#define SetFloodDone(x)         ((x)->flags2 |= FLAGS2_FLOODDONE)
+#define IsFloodDone(x)          ((x)->flags & FLAGS_FLOODDONE)
+#define SetFloodDone(x)         ((x)->flags |= FLAGS_FLOODDONE)
 
 /*
  * definitions for get_client_name
index 8704e4492dadea5b8737907b477b147d0235a54d..0731f1ea64daaebc246e0ddf576a462384d31e6e 100644 (file)
@@ -318,7 +318,7 @@ cap_end(struct Client *source_p, const char *arg)
        if(IsRegistered(source_p))
                return;
 
-       source_p->flags2 &= ~FLAGS2_CLICAP;
+       source_p->flags &= ~FLAGS_CLICAP;
 
        if(source_p->name[0] && source_p->user)
        {
@@ -340,7 +340,7 @@ static void
 cap_ls(struct Client *source_p, const char *arg)
 {
        if(!IsRegistered(source_p))
-               source_p->flags2 |= FLAGS2_CLICAP;
+               source_p->flags |= FLAGS_CLICAP;
 
        /* list of what we support */
        clicap_generate(source_p, "LS", 0, 0);
@@ -358,7 +358,7 @@ cap_req(struct Client *source_p, const char *arg)
        int finished = 0, negate;
 
        if(!IsRegistered(source_p))
-               source_p->flags2 |= FLAGS2_CLICAP;
+               source_p->flags |= FLAGS_CLICAP;
 
        if(EmptyString(arg))
                return;
index f1a64cf81ae7ea7cddd9047d031633282481cc35..73220b1efaada7c91d452157febc54c169ec1333 100644 (file)
@@ -112,7 +112,7 @@ mr_pong(struct Client *client_p, struct Client *source_p, int parc, const char *
                                {
                                        char buf[USERLEN + 1];
                                        strlcpy(buf, source_p->username, sizeof(buf));
-                                       source_p->flags2 |= FLAGS2_PING_COOKIE;
+                                       source_p->flags |= FLAGS_PING_COOKIE;
                                        register_local_user(client_p, source_p, buf);
                                }
                                else
index 161cacc06ce1f37ef032a9ec8f78f717c903f44f..598a6642cd479c09a4f21a981392e24cf621777e 100644 (file)
@@ -250,14 +250,14 @@ register_local_user(struct Client *client_p, struct Client *source_p, const char
                        source_p->flags |= FLAGS_PINGSENT;
                        return -1;
                }
-               if(!(source_p->flags2 & FLAGS2_PING_COOKIE))
+               if(!(source_p->flags & FLAGS_PING_COOKIE))
                {
                        return -1;
                }
        }
 
        /* hasnt finished client cap negotiation */
-       if(source_p->flags2 & FLAGS2_CLICAP)
+       if(source_p->flags & FLAGS_CLICAP)
                return -1;
 
        /* still has DNSbls to validate against */