mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 07:54:05 +01:00
More bool conversions
This commit is contained in:
parent
f408f36452
commit
503727d1ee
8 changed files with 24 additions and 24 deletions
|
@ -38,7 +38,7 @@ _modinit(void)
|
||||||
snomask_modes['F'] = find_snomask_slot();
|
snomask_modes['F'] = find_snomask_slot();
|
||||||
|
|
||||||
/* show the fact that we are showing user information in /version */
|
/* show the fact that we are showing user information in /version */
|
||||||
opers_see_all_users = 1;
|
opers_see_all_users = true;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ static int
|
||||||
_modinit(void)
|
_modinit(void)
|
||||||
{
|
{
|
||||||
/* show the fact that we are showing user information in /version */
|
/* show the fact that we are showing user information in /version */
|
||||||
opers_see_all_users = 1;
|
opers_see_all_users = true;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,8 +69,8 @@ extern bool dorehash;
|
||||||
extern bool dorehashbans;
|
extern bool dorehashbans;
|
||||||
extern bool doremotd;
|
extern bool doremotd;
|
||||||
extern bool kline_queued;
|
extern bool kline_queued;
|
||||||
extern int server_state_foreground;
|
extern bool server_state_foreground;
|
||||||
extern int opers_see_all_users; /* sno_farconnect.so loaded, operspy without
|
extern bool opers_see_all_users; /* sno_farconnect.so loaded, operspy without
|
||||||
accountability, etc */
|
accountability, etc */
|
||||||
|
|
||||||
extern struct Client me;
|
extern struct Client me;
|
||||||
|
@ -99,8 +99,8 @@ extern int testing_conf;
|
||||||
|
|
||||||
extern struct ev_entry *check_splitmode_ev;
|
extern struct ev_entry *check_splitmode_ev;
|
||||||
|
|
||||||
extern int ssl_ok;
|
extern bool ssl_ok;
|
||||||
extern int zlib_ok;
|
extern bool zlib_ok;
|
||||||
extern int maxconnections;
|
extern int maxconnections;
|
||||||
|
|
||||||
void ircd_shutdown(const char *reason);
|
void ircd_shutdown(const char *reason);
|
||||||
|
|
14
ircd/ircd.c
14
ircd/ircd.c
|
@ -103,10 +103,10 @@ bool dorehash = false;
|
||||||
bool dorehashbans = false;
|
bool dorehashbans = false;
|
||||||
bool doremotd = false;
|
bool doremotd = false;
|
||||||
bool kline_queued = false;
|
bool kline_queued = false;
|
||||||
int server_state_foreground = 0;
|
bool server_state_foreground = false;
|
||||||
int opers_see_all_users = 0;
|
bool opers_see_all_users = false;
|
||||||
int ssl_ok = 0;
|
bool ssl_ok = false;
|
||||||
int zlib_ok = 1;
|
bool zlib_ok = true;
|
||||||
|
|
||||||
int testing_conf = 0;
|
int testing_conf = 0;
|
||||||
time_t startup_time;
|
time_t startup_time;
|
||||||
|
@ -605,7 +605,7 @@ charybdis_main(int argc, char *argv[])
|
||||||
setup_signals();
|
setup_signals();
|
||||||
|
|
||||||
if (testing_conf)
|
if (testing_conf)
|
||||||
server_state_foreground = 1;
|
server_state_foreground = true;
|
||||||
|
|
||||||
/* Make sure fd 0, 1 and 2 are in use -- jilles */
|
/* Make sure fd 0, 1 and 2 are in use -- jilles */
|
||||||
do
|
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))
|
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.");
|
ilog(L_MAIN, "WARNING: Unable to setup SSL.");
|
||||||
ssl_ok = 0;
|
ssl_ok = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ssl_ok = 1;
|
ssl_ok = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (testing_conf)
|
if (testing_conf)
|
||||||
|
|
|
@ -295,7 +295,7 @@ load_one_module(const char *path, int origin, int coremodule)
|
||||||
|
|
||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
|
|
||||||
if (server_state_foreground == 1)
|
if (server_state_foreground)
|
||||||
inotice("loading module %s ...", path);
|
inotice("loading module %s ...", path);
|
||||||
|
|
||||||
if(coremodule != 0)
|
if(coremodule != 0)
|
||||||
|
|
|
@ -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))
|
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.");
|
ilog(L_MAIN, "WARNING: Unable to setup SSL.");
|
||||||
ssl_ok = 0;
|
ssl_ok = false;
|
||||||
} else {
|
} 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);
|
send_new_ssl_certs(ServerInfo.ssl_cert, ServerInfo.ssl_private_key, ServerInfo.ssl_dh_params, ServerInfo.ssl_cipher_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -489,7 +489,7 @@ ssl_process_cmd_recv(ssl_ctl_t * ctl)
|
||||||
switch (*ctl_buf->buf)
|
switch (*ctl_buf->buf)
|
||||||
{
|
{
|
||||||
case 'N':
|
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;
|
break;
|
||||||
case 'D':
|
case 'D':
|
||||||
ssl_process_dead_fd(ctl, ctl_buf);
|
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);
|
ssl_process_zipstats(ctl, ctl_buf);
|
||||||
break;
|
break;
|
||||||
case 'I':
|
case 'I':
|
||||||
ssl_ok = 0;
|
ssl_ok = false;
|
||||||
ilog(L_MAIN, "%s", cannot_setup_ssl);
|
ilog(L_MAIN, "%s", cannot_setup_ssl);
|
||||||
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s", cannot_setup_ssl);
|
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s", cannot_setup_ssl);
|
||||||
break;
|
break;
|
||||||
case 'U':
|
case 'U':
|
||||||
zlib_ok = 0;
|
zlib_ok = 0;
|
||||||
ssl_ok = 0;
|
ssl_ok = false;
|
||||||
ilog(L_MAIN, "%s", no_ssl_or_zlib);
|
ilog(L_MAIN, "%s", no_ssl_or_zlib);
|
||||||
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s", no_ssl_or_zlib);
|
sendto_realops_snomask(SNO_GENERAL, L_ALL, "%s", no_ssl_or_zlib);
|
||||||
ssl_killall();
|
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;
|
rb_dlink_node *ptr;
|
||||||
if(ssl_cert == NULL || ssl_private_key == NULL || ssl_dh_params == NULL)
|
if(ssl_cert == NULL || ssl_private_key == NULL || ssl_dh_params == NULL)
|
||||||
{
|
{
|
||||||
ssl_ok = 0;
|
ssl_ok = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
RB_DLINK_FOREACH(ptr, ssl_daemons.head)
|
RB_DLINK_FOREACH(ptr, ssl_daemons.head)
|
||||||
|
|
|
@ -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 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 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 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;
|
static int certfp_method = RB_SSL_CERTFP_METH_SHA1;
|
||||||
#ifdef HAVE_LIBZ
|
#ifdef HAVE_LIBZ
|
||||||
static int zlib_ok = 1;
|
static bool zlib_ok = true;
|
||||||
#else
|
#else
|
||||||
static int zlib_ok = 0;
|
static bool zlib_ok = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue