More bool conversions

This commit is contained in:
Elizabeth Myers 2016-03-09 02:00:40 -06:00
parent 05b77c613f
commit f66f0baa67
7 changed files with 21 additions and 23 deletions

View file

@ -69,7 +69,7 @@ extern int cold_start;
extern int dorehash; extern int dorehash;
extern int dorehashbans; extern int dorehashbans;
extern int doremotd; extern int doremotd;
extern int kline_queued; extern bool kline_queued;
extern int server_state_foreground; extern int server_state_foreground;
extern int opers_see_all_users; /* sno_farconnect.so loaded, operspy without extern int opers_see_all_users; /* sno_farconnect.so loaded, operspy without
accountability, etc */ accountability, etc */

View file

@ -475,7 +475,7 @@ check_banned_lines(void)
void void
check_klines_event(void *unused) check_klines_event(void *unused)
{ {
kline_queued = 0; kline_queued = false;
check_klines(); check_klines();
} }

View file

@ -102,7 +102,7 @@ char **myargv;
int dorehash = 0; int dorehash = 0;
int dorehashbans = 0; int dorehashbans = 0;
int doremotd = 0; int doremotd = 0;
int kline_queued = 0; bool kline_queued = false;
int server_state_foreground = 0; int server_state_foreground = 0;
int opers_see_all_users = 0; int opers_see_all_users = 0;
int ssl_ok = 0; int ssl_ok = 0;

View file

@ -1553,7 +1553,7 @@ conf_set_general_kline_delay(void *data)
ConfigFileEntry.kline_delay = *(unsigned int *) data; ConfigFileEntry.kline_delay = *(unsigned int *) data;
/* THIS MUST BE HERE to stop us being unable to check klines */ /* THIS MUST BE HERE to stop us being unable to check klines */
kline_queued = 0; kline_queued = false;
} }
static void static void

View file

@ -106,7 +106,7 @@ mo_kline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
struct ConfItem *aconf; struct ConfItem *aconf;
int tkline_time = 0; int tkline_time = 0;
int loc = 1; int loc = 1;
int propagated = ConfigFileEntry.use_propagated_bans; bool propagated = ConfigFileEntry.use_propagated_bans;
if(!IsOperK(source_p)) if(!IsOperK(source_p))
{ {
@ -157,7 +157,7 @@ mo_kline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
return; return;
/* Set as local-only. */ /* Set as local-only. */
propagated = 0; propagated = false;
} }
/* if we have cluster servers, send it to them.. */ /* if we have cluster servers, send it to them.. */
else if(!propagated && rb_dlink_list_length(&cluster_conf_list) > 0) else if(!propagated && rb_dlink_list_length(&cluster_conf_list) > 0)
@ -218,11 +218,11 @@ mo_kline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
if(ConfigFileEntry.kline_delay) if(ConfigFileEntry.kline_delay)
{ {
if(kline_queued == 0) if(!kline_queued)
{ {
rb_event_addonce("check_klines", check_klines_event, NULL, rb_event_addonce("check_klines", check_klines_event, NULL,
ConfigFileEntry.kline_delay); ConfigFileEntry.kline_delay);
kline_queued = 1; kline_queued = true;
} }
} }
else else
@ -328,11 +328,11 @@ handle_remote_kline(struct Client *source_p, int tkline_time,
if(ConfigFileEntry.kline_delay) if(ConfigFileEntry.kline_delay)
{ {
if(kline_queued == 0) if(!kline_queued)
{ {
rb_event_addonce("check_klines", check_klines_event, NULL, rb_event_addonce("check_klines", check_klines_event, NULL,
ConfigFileEntry.kline_delay); ConfigFileEntry.kline_delay);
kline_queued = 1; kline_queued = true;
} }
} }
else else
@ -353,7 +353,7 @@ mo_unkline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sour
char splat[] = "*"; char splat[] = "*";
char *h = LOCAL_COPY(parv[1]); char *h = LOCAL_COPY(parv[1]);
struct ConfItem *aconf; struct ConfItem *aconf;
int propagated = 1; bool propagated = true;
if(!IsOperUnkline(source_p)) if(!IsOperUnkline(source_p))
{ {
@ -406,7 +406,7 @@ mo_unkline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sour
if(match(parv[3], me.name) == 0) if(match(parv[3], me.name) == 0)
return; return;
propagated = 0; propagated = false;
} }
aconf = find_exact_conf_by_address(host, CONF_KILL, user); aconf = find_exact_conf_by_address(host, CONF_KILL, user);

View file

@ -107,8 +107,6 @@ m_names(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_
sendto_one(source_p, form_str(RPL_ENDOFNAMES), sendto_one(source_p, form_str(RPL_ENDOFNAMES),
me.name, source_p->name, "*"); me.name, source_p->name, "*");
} }
return;
} }
/* /*

View file

@ -66,7 +66,7 @@ static void me_unxline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct
static bool valid_xline(struct Client *, const char *, const char *); static bool valid_xline(struct Client *, const char *, const char *);
static void apply_xline(struct Client *client_p, const char *name, static void apply_xline(struct Client *client_p, const char *name,
const char *reason, int temp_time, int propagated); const char *reason, int temp_time, bool propagated);
static void propagate_xline(struct Client *source_p, const char *target, static void propagate_xline(struct Client *source_p, const char *target,
int temp_time, const char *name, const char *type, const char *reason); int temp_time, const char *name, const char *type, const char *reason);
static void cluster_xline(struct Client *source_p, int temp_time, static void cluster_xline(struct Client *source_p, int temp_time,
@ -76,7 +76,7 @@ static void handle_remote_xline(struct Client *source_p, int temp_time,
const char *name, const char *reason); const char *name, const char *reason);
static void handle_remote_unxline(struct Client *source_p, const char *name); static void handle_remote_unxline(struct Client *source_p, const char *name);
static void remove_xline(struct Client *source_p, const char *name, static void remove_xline(struct Client *source_p, const char *name,
int propagated); bool propagated);
struct Message xline_msgtab = { struct Message xline_msgtab = {
"XLINE", 0, 0, 0, 0, "XLINE", 0, 0, 0, 0,
@ -107,7 +107,7 @@ mo_xline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
const char *target_server = NULL; const char *target_server = NULL;
int temp_time; int temp_time;
int loc = 1; int loc = 1;
int propagated = ConfigFileEntry.use_propagated_bans; bool propagated = ConfigFileEntry.use_propagated_bans;
if(!IsOperXline(source_p)) if(!IsOperXline(source_p))
{ {
@ -155,7 +155,7 @@ mo_xline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
return; return;
/* Set as local-only. */ /* Set as local-only. */
propagated = 0; propagated = false;
} }
else if(!propagated && rb_dlink_list_length(&cluster_conf_list) > 0) else if(!propagated && rb_dlink_list_length(&cluster_conf_list) > 0)
cluster_xline(source_p, temp_time, name, reason); cluster_xline(source_p, temp_time, name, reason);
@ -232,7 +232,7 @@ handle_remote_xline(struct Client *source_p, int temp_time, const char *name, co
return; return;
} }
apply_xline(source_p, name, reason, temp_time, 0); apply_xline(source_p, name, reason, temp_time, false);
} }
/* valid_xline() /* valid_xline()
@ -264,7 +264,7 @@ valid_xline(struct Client *source_p, const char *gecos, const char *reason)
} }
void void
apply_xline(struct Client *source_p, const char *name, const char *reason, int temp_time, int propagated) apply_xline(struct Client *source_p, const char *name, const char *reason, int temp_time, bool propagated)
{ {
struct ConfItem *aconf; struct ConfItem *aconf;
@ -385,7 +385,7 @@ cluster_xline(struct Client *source_p, int temp_time, const char *name, const ch
static void static void
mo_unxline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) mo_unxline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{ {
int propagated = 1; bool propagated = true;
if(!IsOperXline(source_p)) if(!IsOperXline(source_p))
{ {
@ -407,7 +407,7 @@ mo_unxline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sour
if(match(parv[3], me.name) == 0) if(match(parv[3], me.name) == 0)
return; return;
propagated = 0; propagated = false;
} }
/* cluster{} moved to remove_xline */ /* cluster{} moved to remove_xline */
@ -452,7 +452,7 @@ handle_remote_unxline(struct Client *source_p, const char *name)
source_p->servptr->name, SHARED_UNXLINE)) source_p->servptr->name, SHARED_UNXLINE))
return; return;
remove_xline(source_p, name, 0); remove_xline(source_p, name, false);
} }
static void static void