#include "chmode.h"
#include "hook.h"
#include "s_assert.h"
-#include "authd.h"
+#include "authproc.h"
struct config_server_hide ConfigServerHide;
extern int yyparse(void); /* defined in y.tab.c */
-extern char linebuf[];
-
-#ifndef INADDR_NONE
-#define INADDR_NONE ((unsigned int) 0xffffffff)
-#endif
+extern char yy_linebuf[16384]; /* defined in ircd_lexer.l */
static rb_bh *confitem_heap = NULL;
bool
rehash(bool sig)
{
+ hook_data_rehash hdata = { sig };
+
if(sig)
- {
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"Got signal SIGHUP, reloading ircd conf. file");
- }
rehash_authd();
+
/* don't close listeners until we know we can go ahead with the rehash */
read_conf_files(false);
rb_strlcpy(me.info, "unknown", sizeof(me.info));
open_logfiles();
+
+ call_hook(h_rehash, &hdata);
return false;
}
ServerInfo.description = NULL;
ServerInfo.network_name = NULL;
- memset(&ServerInfo.ip, 0, sizeof(ServerInfo.ip));
- ServerInfo.specific_ipv4_vhost = 0;
+ memset(&ServerInfo.bind4, 0, sizeof(ServerInfo.bind4));
+ SET_SS_FAMILY(&ServerInfo.bind4, AF_UNSPEC);
#ifdef RB_IPV6
- memset(&ServerInfo.ip6, 0, sizeof(ServerInfo.ip6));
- ServerInfo.specific_ipv6_vhost = 0;
+ memset(&ServerInfo.bind6, 0, sizeof(ServerInfo.bind6));
+ SET_SS_FAMILY(&ServerInfo.bind6, AF_UNSPEC);
#endif
AdminInfo.name = NULL;
ServerInfo.default_max_clients = MAXCONNECTIONS;
ConfigFileEntry.nicklen = NICKLEN;
- ConfigFileEntry.certfp_method = RB_SSL_CERTFP_METH_SHA1;
+ ConfigFileEntry.certfp_method = RB_SSL_CERTFP_METH_CERT_SHA1;
ConfigFileEntry.hide_opers_in_whois = 0;
if (!alias_dict)
- alias_dict = rb_dictionary_create("alias", strcasecmp);
+ alias_dict = rb_dictionary_create("alias", rb_strcasecmp);
}
/*
ircd_ssl_ok = false;
} else {
ircd_ssl_ok = true;
- send_new_ssl_certs(ServerInfo.ssl_cert, ServerInfo.ssl_private_key, ServerInfo.ssl_dh_params, ServerInfo.ssl_cipher_list);
+ ssld_update_config();
}
if(ServerInfo.ssld_count > get_ssld_count())
{
int start = ServerInfo.ssld_count - get_ssld_count();
/* start up additional ssld if needed */
- start_ssldaemon(start, ServerInfo.ssl_cert, ServerInfo.ssl_private_key, ServerInfo.ssl_dh_params, ServerInfo.ssl_cipher_list);
+ start_ssldaemon(start);
}
if(ServerInfo.wsockd_count > get_wsockd_count())
{
- int start = ServerInfo.wsockd_count - get_ssld_count();
+ int start = ServerInfo.wsockd_count - get_wsockd_count();
start_wsockd(start);
}
{
char newlinebuf[BUFSIZE];
- strip_tabs(newlinebuf, linebuf, strlen(linebuf));
+ strip_tabs(newlinebuf, yy_linebuf, strlen(yy_linebuf));
ierror("\"%s\", line %d: %s at '%s'", conffilebuf, lineno + 1, msg, newlinebuf);
sendto_realops_snomask(SNO_GENERAL, L_ALL, "\"%s\", line %d: %s at '%s'",