More bool conversions

This commit is contained in:
Elizabeth Myers 2016-03-09 02:19:31 -06:00
parent f408f36452
commit 503727d1ee
8 changed files with 24 additions and 24 deletions

View File

@ -38,7 +38,7 @@ _modinit(void)
snomask_modes['F'] = find_snomask_slot();
/* show the fact that we are showing user information in /version */
opers_see_all_users = 1;
opers_see_all_users = true;
return 0;
}

View File

@ -28,7 +28,7 @@ static int
_modinit(void)
{
/* show the fact that we are showing user information in /version */
opers_see_all_users = 1;
opers_see_all_users = true;
return 0;
}

View File

@ -69,9 +69,9 @@ extern bool dorehash;
extern bool dorehashbans;
extern bool doremotd;
extern bool kline_queued;
extern int server_state_foreground;
extern int opers_see_all_users; /* sno_farconnect.so loaded, operspy without
accountability, etc */
extern bool server_state_foreground;
extern bool opers_see_all_users; /* sno_farconnect.so loaded, operspy without
accountability, etc */
extern struct Client me;
extern rb_dlink_list global_client_list;
@ -99,8 +99,8 @@ extern int testing_conf;
extern struct ev_entry *check_splitmode_ev;
extern int ssl_ok;
extern int zlib_ok;
extern bool ssl_ok;
extern bool zlib_ok;
extern int maxconnections;
void ircd_shutdown(const char *reason);

View File

@ -103,10 +103,10 @@ bool dorehash = false;
bool dorehashbans = false;
bool doremotd = false;
bool kline_queued = false;
int server_state_foreground = 0;
int opers_see_all_users = 0;
int ssl_ok = 0;
int zlib_ok = 1;
bool server_state_foreground = false;
bool opers_see_all_users = false;
bool ssl_ok = false;
bool zlib_ok = true;
int testing_conf = 0;
time_t startup_time;
@ -605,7 +605,7 @@ charybdis_main(int argc, char *argv[])
setup_signals();
if (testing_conf)
server_state_foreground = 1;
server_state_foreground = true;
/* Make sure fd 0, 1 and 2 are in use -- jilles */
do
@ -713,10 +713,10 @@ charybdis_main(int argc, char *argv[])
if(!rb_setup_ssl_server(ServerInfo.ssl_cert, ServerInfo.ssl_private_key, ServerInfo.ssl_dh_params, ServerInfo.ssl_cipher_list))
{
ilog(L_MAIN, "WARNING: Unable to setup SSL.");
ssl_ok = 0;
ssl_ok = false;
}
else
ssl_ok = 1;
ssl_ok = true;
}
if (testing_conf)

View File

@ -295,7 +295,7 @@ load_one_module(const char *path, int origin, int coremodule)
struct stat statbuf;
if (server_state_foreground == 1)
if (server_state_foreground)
inotice("loading module %s ...", path);
if(coremodule != 0)

View File

@ -868,9 +868,9 @@ validate_conf(void)
if(!rb_setup_ssl_server(ServerInfo.ssl_cert, ServerInfo.ssl_private_key, ServerInfo.ssl_dh_params, ServerInfo.ssl_cipher_list))
{
ilog(L_MAIN, "WARNING: Unable to setup SSL.");
ssl_ok = 0;
ssl_ok = false;
} else {
ssl_ok = 1;
ssl_ok = true;
send_new_ssl_certs(ServerInfo.ssl_cert, ServerInfo.ssl_private_key, ServerInfo.ssl_dh_params, ServerInfo.ssl_cipher_list);
}

View File

@ -489,7 +489,7 @@ ssl_process_cmd_recv(ssl_ctl_t * ctl)
switch (*ctl_buf->buf)
{
case 'N':
ssl_ok = 0; /* ssld says it can't do ssl/tls */
ssl_ok = false; /* ssld says it can't do ssl/tls */
break;
case 'D':
ssl_process_dead_fd(ctl, ctl_buf);
@ -504,13 +504,13 @@ ssl_process_cmd_recv(ssl_ctl_t * ctl)
ssl_process_zipstats(ctl, ctl_buf);
break;
case 'I':
ssl_ok = 0;
ssl_ok = false;
ilog(L_MAIN, "%s", cannot_setup_ssl);
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s", cannot_setup_ssl);
break;
case 'U':
zlib_ok = 0;
ssl_ok = 0;
ssl_ok = false;
ilog(L_MAIN, "%s", no_ssl_or_zlib);
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s", no_ssl_or_zlib);
ssl_killall();
@ -722,7 +722,7 @@ send_new_ssl_certs(const char *ssl_cert, const char *ssl_private_key, const char
rb_dlink_node *ptr;
if(ssl_cert == NULL || ssl_private_key == NULL || ssl_dh_params == NULL)
{
ssl_ok = 0;
ssl_ok = false;
return;
}
RB_DLINK_FOREACH(ptr, ssl_daemons.head)

View File

@ -151,12 +151,12 @@ static void conn_plain_read_cb(rb_fde_t *fd, void *data);
static void conn_plain_read_shutdown_cb(rb_fde_t *fd, void *data);
static void mod_cmd_write_queue(mod_ctl_t * ctl, const void *data, size_t len);
static const char *remote_closed = "Remote host closed the connection";
static int ssl_ok;
static bool ssl_ok;
static int certfp_method = RB_SSL_CERTFP_METH_SHA1;
#ifdef HAVE_LIBZ
static int zlib_ok = 1;
static bool zlib_ok = true;
#else
static int zlib_ok = 0;
static bool zlib_ok = false;
#endif