From c89a718fa16432bab838ccc3a799efc6a18dbb02 Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Tue, 30 Aug 2011 14:50:42 +0000 Subject: [PATCH] Change the channel mode flags from const ints in names.c to #define macros in names.h. git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@134 13b04d17-f746-0410-82c6-800466cd88b0 --- include/names.h | 15 +++++++++++++++ source/commands.c | 1 - source/commands2.c | 2 -- source/names.c | 17 ----------------- source/status.c | 1 - 5 files changed, 15 insertions(+), 21 deletions(-) diff --git a/include/names.h b/include/names.h index 18b47b1..61196f1 100644 --- a/include/names.h +++ b/include/names.h @@ -26,6 +26,21 @@ #define GOTWHO 0x08 #define GOTEXEMPT 0x10 +/* Channel mode flags */ +#define MODE_ANONYMOUS (1U << 0) /* av2.9 */ +#define MODE_C (1U << 1) /* erf/TS4 */ +#define MODE_INVITE (1U << 2) /* RFC */ +#define MODE_KEY (1U << 3) /* RFC */ +#define MODE_LIMIT (1U << 4) /* RFC */ +#define MODE_MODERATED (1U << 5) /* RFC */ +#define MODE_MSGS (1U << 6) /* RFC */ +#define MODE_PRIVATE (1U << 7) /* RFC */ +#define MODE_REGISTERED (1U << 8) /* Dalnet */ +#define MODE_SECRET (1U << 9) /* RFC */ +#define MODE_TOPIC (1U << 10) /* RFC */ +#define MODE_Z (1U << 11) /* erf/TS4 */ +#define MODE_RESTRICTED (1U << 12) /* Dalnet */ + void add_to_join_list (char *, int, int); void remove_from_join_list (char *, int); char *get_chan_from_join_list (int); diff --git a/source/commands.c b/source/commands.c index 309641f..5f71132 100644 --- a/source/commands.c +++ b/source/commands.c @@ -3534,7 +3534,6 @@ char *str = NULL; BUILT_IN_COMMAND(e_topic) { -extern int MODE_TOPIC; char *arg = NULL; char *arg2; ChannelList *chan; diff --git a/source/commands2.c b/source/commands2.c index 6175e21..6417b32 100644 --- a/source/commands2.c +++ b/source/commands2.c @@ -100,8 +100,6 @@ extern char attach_ttyname[]; char *org_nick = NULL; static int delay_gain_nick (void *, char *); -extern int MODE_TOPIC, MODE_MODERATED, MODE_ANONYMOUS, MODE_INVITE, - MODE_MSGS, MODE_SECRET, MODE_PRIVATE, MODE_KEY, MODE_LIMIT; BUILT_IN_COMMAND(nwhois) { diff --git a/source/names.c b/source/names.c index d0e0f92..a5f3c71 100644 --- a/source/names.c +++ b/source/names.c @@ -59,23 +59,6 @@ static void apply_channel_modes (char *, char *, ChannelList *); static char mode_str[] = "aciklmnprstzR"; char new_channel_format[BIG_BUFFER_SIZE]; - -const int MODE_ANONYMOUS = 1 << 0; /* av2.9 */ -const int MODE_C = 1 << 1; /* erf/TS4 */ -const int MODE_INVITE = 1 << 2; /* RFC */ -const int MODE_KEY = 1 << 3; /* RFC */ -const int MODE_LIMIT = 1 << 4; /* RFC */ -const int MODE_MODERATED = 1 << 5; /* RFC */ -const int MODE_MSGS = 1 << 6; /* RFC */ -const int MODE_PRIVATE = 1 << 7; /* RFC */ -const int MODE_REGISTERED = 1 << 8; /* Dalnet */ -const int MODE_SECRET = 1 << 9; /* RFC */ -const int MODE_TOPIC = 1 << 10; /* RFC */ -const int MODE_Z = 1 << 11; /* erf/TS4 */ -const int MODE_RESTRICTED = 1 << 12; /* Dalnet */ - - - static struct modelist { char *chan; diff --git a/source/status.c b/source/status.c index d306aaa..6962741 100644 --- a/source/status.c +++ b/source/status.c @@ -1178,7 +1178,6 @@ static char my_buffer[IRCD_BUFFER_SIZE + 1]; if (window->current_channel/* && chan_is_connected(s, window->server)*/) { -extern const int MODE_PRIVATE, MODE_SECRET; int num; if (get_int_var(HIDE_PRIVATE_CHANNELS_VAR) && is_channel_mode(window->current_channel,