Change instances of open-coded "3" in calls to prepare_command() with PC_SILENT macro.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@137 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
@@ -35,7 +35,8 @@ enum color_attributes {
|
|||||||
REVERSE_COLOR, BOLD_COLOR, BLINK_COLOR, UNDERLINE_COLOR
|
REVERSE_COLOR, BOLD_COLOR, BLINK_COLOR, UNDERLINE_COLOR
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DONT_CARE 3
|
/* prepare_command() flags */
|
||||||
|
#define PC_SILENT 3
|
||||||
#define PC_TOPIC 2
|
#define PC_TOPIC 2
|
||||||
#define NEED_OP 1
|
#define NEED_OP 1
|
||||||
#define NO_OP 0
|
#define NO_OP 0
|
||||||
|
|||||||
@@ -406,7 +406,7 @@ int serv = from_server;
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
tmp = lookup_userlevelc("*", FromUserHost, channel, password);
|
tmp = lookup_userlevelc("*", FromUserHost, channel, password);
|
||||||
chan = prepare_command(&serv, channel, 3);
|
chan = prepare_command(&serv, channel, PC_SILENT);
|
||||||
if (chan && tmp && (tmp->flags & ADD_INVITE) && (check_channel_match(tmp->channels, channel)))
|
if (chan && tmp && (tmp->flags & ADD_INVITE) && (check_channel_match(tmp->channels, channel)))
|
||||||
{
|
{
|
||||||
if (tmp->password && !password)
|
if (tmp->password && !password)
|
||||||
@@ -512,7 +512,7 @@ int serv = from_server;
|
|||||||
if (cmd && *cmd)
|
if (cmd && *cmd)
|
||||||
password = next_arg(cmd, &cmd);
|
password = next_arg(cmd, &cmd);
|
||||||
Nick = lookup_userlevelc("*", FromUserHost, channel, password);
|
Nick = lookup_userlevelc("*", FromUserHost, channel, password);
|
||||||
chan = prepare_command(&serv, channel, 3);
|
chan = prepare_command(&serv, channel, PC_SILENT);
|
||||||
if (chan && get_cset_int_var(chan->csets, USERLIST_CSET) && Nick)
|
if (chan && get_cset_int_var(chan->csets, USERLIST_CSET) && Nick)
|
||||||
{
|
{
|
||||||
if (Nick->flags & ADD_OPS)
|
if (Nick->flags & ADD_OPS)
|
||||||
@@ -587,7 +587,7 @@ int server;
|
|||||||
password = next_arg(cmd, &cmd);
|
password = next_arg(cmd, &cmd);
|
||||||
|
|
||||||
Nick = lookup_userlevelc("*", FromUserHost, channel, password);
|
Nick = lookup_userlevelc("*", FromUserHost, channel, password);
|
||||||
chan = prepare_command(&server, channel, 3);
|
chan = prepare_command(&server, channel, PC_SILENT);
|
||||||
|
|
||||||
if (chan && get_cset_int_var(chan->csets, USERLIST_CSET) && Nick && (Nick->flags & ADD_UNBAN))
|
if (chan && get_cset_int_var(chan->csets, USERLIST_CSET) && Nick && (Nick->flags & ADD_UNBAN))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2050,7 +2050,7 @@ static NickTab sucks = { NULL };
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((chan = prepare_command(&server, NULL, 3)))
|
if ((chan = prepare_command(&server, NULL, PC_SILENT)))
|
||||||
{
|
{
|
||||||
cnick = next_nicklist(chan, NULL);
|
cnick = next_nicklist(chan, NULL);
|
||||||
/*
|
/*
|
||||||
@@ -2286,7 +2286,7 @@ int globtype = GLOB_MARK;
|
|||||||
NickList *cnick = NULL;
|
NickList *cnick = NULL;
|
||||||
ChannelList *chan = NULL;
|
ChannelList *chan = NULL;
|
||||||
int server = from_server;
|
int server = from_server;
|
||||||
chan = prepare_command(&server, NULL, 3);
|
chan = prepare_command(&server, NULL, PC_SILENT);
|
||||||
if (possible && (*possible == '#' || *possible == '&'))
|
if (possible && (*possible == '#' || *possible == '&'))
|
||||||
{
|
{
|
||||||
int len = strlen(possible);
|
int len = strlen(possible);
|
||||||
|
|||||||
@@ -527,7 +527,7 @@ BanList *b;
|
|||||||
{
|
{
|
||||||
if (!(channel = make_channel(channel)))
|
if (!(channel = make_channel(channel)))
|
||||||
return;
|
return;
|
||||||
if (!(new = prepare_command(&server, channel, 3)))
|
if (!(new = prepare_command(&server, channel, PC_SILENT)))
|
||||||
if ((channel && !(new1 = check_whowas_chan_buffer(channel, -1, 0))))
|
if ((channel && !(new1 = check_whowas_chan_buffer(channel, -1, 0))))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -631,7 +631,7 @@ put_it("%s", convert_output_format("IRCops %K[%W$[3]0%K]%w$1-", "%d %s", num
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!(new = prepare_command(&server, channel, 3)))
|
if (!(new = prepare_command(&server, channel, PC_SILENT)))
|
||||||
if ((channel && !(new1 = check_whowas_chan_buffer(channel, -1, 0))))
|
if ((channel && !(new1 = check_whowas_chan_buffer(channel, -1, 0))))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1883,7 +1883,7 @@ int got_info(char *chan, int server, int type)
|
|||||||
|
|
||||||
if ((tmp->gotinfo |= type) == what_info)
|
if ((tmp->gotinfo |= type) == what_info)
|
||||||
{
|
{
|
||||||
if (prepare_command(&tmp->server, chan, 3))
|
if (prepare_command(&tmp->server, chan, PC_SILENT))
|
||||||
show_channel_sync(tmp, chan);
|
show_channel_sync(tmp, chan);
|
||||||
remove_from_join_list(chan, tmp->server);
|
remove_from_join_list(chan, tmp->server);
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@@ -1481,7 +1481,7 @@ NickList *nick;
|
|||||||
int serv = window->server;
|
int serv = window->server;
|
||||||
if (window->server != -1 && window->wset->status_users_format)
|
if (window->server != -1 && window->wset->status_users_format)
|
||||||
{
|
{
|
||||||
if ((chan = prepare_command(&serv, NULL, 3)))
|
if ((chan = prepare_command(&serv, NULL, PC_SILENT)))
|
||||||
{
|
{
|
||||||
int ops = 0, nonops = 0, voice = 0, ircop = 0, friends = 0;
|
int ops = 0, nonops = 0, voice = 0, ircop = 0, friends = 0;
|
||||||
char buff[40], buff1[40], buff2[40], buff3[40], buff4[40];
|
char buff[40], buff1[40], buff2[40], buff3[40], buff4[40];
|
||||||
@@ -1540,7 +1540,7 @@ int serv = window->server;
|
|||||||
static char my_buffer[3] = "\0";
|
static char my_buffer[3] = "\0";
|
||||||
if (window->server != -1)
|
if (window->server != -1)
|
||||||
{
|
{
|
||||||
if ((chan = prepare_command(&serv, NULL, 3)))
|
if ((chan = prepare_command(&serv, NULL, PC_SILENT)))
|
||||||
{
|
{
|
||||||
my_buffer[0] = chan->csets->set_userlist ? 'U':'u';
|
my_buffer[0] = chan->csets->set_userlist ? 'U':'u';
|
||||||
return my_buffer;
|
return my_buffer;
|
||||||
@@ -1556,7 +1556,7 @@ int serv = window->server;
|
|||||||
static char my_buffer[3] = "\0";
|
static char my_buffer[3] = "\0";
|
||||||
if (window->server != -1)
|
if (window->server != -1)
|
||||||
{
|
{
|
||||||
if ((chan = prepare_command(&serv, NULL, 3)))
|
if ((chan = prepare_command(&serv, NULL, PC_SILENT)))
|
||||||
{
|
{
|
||||||
my_buffer[0] = chan->csets->set_shitlist ? 'S':'s';
|
my_buffer[0] = chan->csets->set_shitlist ? 'S':'s';
|
||||||
return my_buffer;
|
return my_buffer;
|
||||||
@@ -1572,7 +1572,7 @@ int serv = window->server;
|
|||||||
static char my_buffer[3] = "\0";
|
static char my_buffer[3] = "\0";
|
||||||
if (window->server != -1)
|
if (window->server != -1)
|
||||||
{
|
{
|
||||||
if ((chan = prepare_command(&serv, NULL, 3)))
|
if ((chan = prepare_command(&serv, NULL, PC_SILENT)))
|
||||||
{
|
{
|
||||||
my_buffer[0] = chan->csets->set_hacking ? 'H':'h';
|
my_buffer[0] = chan->csets->set_hacking ? 'H':'h';
|
||||||
return my_buffer;
|
return my_buffer;
|
||||||
@@ -1588,7 +1588,7 @@ int serv = window->server;
|
|||||||
static char my_buffer[3] = "\0";
|
static char my_buffer[3] = "\0";
|
||||||
if (window->server != -1)
|
if (window->server != -1)
|
||||||
{
|
{
|
||||||
if ((chan = prepare_command(&serv, NULL, 3)))
|
if ((chan = prepare_command(&serv, NULL, PC_SILENT)))
|
||||||
{
|
{
|
||||||
my_buffer[0] = chan->csets->set_aop ? 'A':'a';
|
my_buffer[0] = chan->csets->set_aop ? 'A':'a';
|
||||||
return my_buffer;
|
return my_buffer;
|
||||||
@@ -1604,7 +1604,7 @@ int serv = window->server;
|
|||||||
static char my_buffer[3] = "\0";
|
static char my_buffer[3] = "\0";
|
||||||
if (window->server != -1)
|
if (window->server != -1)
|
||||||
{
|
{
|
||||||
if ((chan = prepare_command(&serv, NULL, 3)))
|
if ((chan = prepare_command(&serv, NULL, PC_SILENT)))
|
||||||
{
|
{
|
||||||
my_buffer[0] = chan->csets->bitch_mode ? 'B':'b';
|
my_buffer[0] = chan->csets->bitch_mode ? 'B':'b';
|
||||||
return my_buffer;
|
return my_buffer;
|
||||||
|
|||||||
@@ -1017,7 +1017,7 @@ char *p = (char *) arg; /* original args unmodified so we can free them */
|
|||||||
channel = next_arg(args, &args);
|
channel = next_arg(args, &args);
|
||||||
if ((serv_num = next_arg(args, &args)))
|
if ((serv_num = next_arg(args, &args)))
|
||||||
this_server = my_atol(serv_num);
|
this_server = my_atol(serv_num);
|
||||||
if ((chan = prepare_command(&server, channel, 3)))
|
if ((chan = prepare_command(&server, channel, PC_SILENT)))
|
||||||
my_send_to_server(this_server, "KICK %s %s :\002%s\002 Kick/ban me will ya", channel, from, _VERSION_);
|
my_send_to_server(this_server, "KICK %s %s :\002%s\002 Kick/ban me will ya", channel, from, _VERSION_);
|
||||||
new_free(&protected);
|
new_free(&protected);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user