From 095328a742e1ff2b1536a1c6c6721a374d5b332e Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Mon, 24 Dec 2007 20:58:55 +0100 Subject: [PATCH] Move various flags from flags2 to flags. --- include/client.h | 10 +++++----- modules/m_cap.c | 6 +++--- modules/m_pong.c | 2 +- src/s_user.c | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/client.h b/include/client.h index a7e06360..00c01e50 100644 --- a/include/client.h +++ b/include/client.h @@ -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 diff --git a/modules/m_cap.c b/modules/m_cap.c index 8704e449..0731f1ea 100644 --- a/modules/m_cap.c +++ b/modules/m_cap.c @@ -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; diff --git a/modules/m_pong.c b/modules/m_pong.c index f1a64cf8..73220b1e 100644 --- a/modules/m_pong.c +++ b/modules/m_pong.c @@ -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 diff --git a/src/s_user.c b/src/s_user.c index 161cacc0..598a6642 100644 --- a/src/s_user.c +++ b/src/s_user.c @@ -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 */