X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/c6ad9b0c5f59c953b2dce701133d6a177510d8b4..04e5ed6c57154114cca330767e3bfb1006b46ee9:/ircd/newconf.c diff --git a/ircd/newconf.c b/ircd/newconf.c index c9b0a56a..5d9bdf8f 100644 --- a/ircd/newconf.c +++ b/ircd/newconf.c @@ -246,7 +246,7 @@ conf_set_serverinfo_vhost(void *data) { struct rb_sockaddr_storage addr; - if(rb_inet_pton_sock(data, (struct sockaddr *)&addr) <= 0 || GET_SS_FAMILY(&addr) != AF_INET) + if(rb_inet_pton_sock(data, &addr) <= 0 || GET_SS_FAMILY(&addr) != AF_INET) { conf_report_error("Invalid IPv4 address for server vhost (%s)", (char *) data); return; @@ -261,7 +261,7 @@ conf_set_serverinfo_vhost6(void *data) struct rb_sockaddr_storage addr; - if(rb_inet_pton_sock(data, (struct sockaddr *)&addr) <= 0 || GET_SS_FAMILY(&addr) != AF_INET6) + if(rb_inet_pton_sock(data, &addr) <= 0 || GET_SS_FAMILY(&addr) != AF_INET6) { conf_report_error("Invalid IPv6 address for server vhost (%s)", (char *) data); return; @@ -321,7 +321,6 @@ static struct mode_table umode_table[] = { {"invisible", UMODE_INVISIBLE }, {"locops", UMODE_LOCOPS }, {"noforward", UMODE_NOFORWARD }, - {"regonlymsg", UMODE_REGONLYMSG}, {"servnotice", UMODE_SERVNOTICE}, {"wallop", UMODE_WALLOP }, {"operwall", UMODE_OPERWALL }, @@ -353,6 +352,7 @@ static struct mode_table auth_table[] = { {"need_sasl", CONF_FLAGS_NEED_SASL }, {"extend_chans", CONF_FLAGS_EXTEND_CHANS }, {"allow_sctp", CONF_FLAGS_ALLOW_SCTP }, + {"kline_spoof_ip", CONF_FLAGS_KLINE_SPOOF }, {NULL, 0} }; @@ -361,6 +361,7 @@ static struct mode_table connect_table[] = { { "compressed", SERVER_COMPRESSED }, { "encrypted", SERVER_ENCRYPTED }, { "topicburst", SERVER_TB }, + { "sctp", SERVER_SCTP }, { "ssl", SERVER_SSL }, { "no-export", SERVER_NO_EXPORT }, { NULL, 0 }, @@ -882,12 +883,6 @@ conf_set_listen_port_both(void *data, int ssl, int sctp) } if(listener_address[0] == NULL) { - if (!ssl) - { - conf_report_warning("listener 'ANY/%d': support for plaintext listeners may be removed in a future release per RFCs 7194 & 7258. " - "It is suggested that users be migrated to SSL/TLS connections.", args->v.number); - } - if (sctp) { conf_report_error("listener::sctp_port has no addresses -- ignoring."); } else { @@ -903,12 +898,6 @@ conf_set_listen_port_both(void *data, int ssl, int sctp) else family = AF_INET; - if (!ssl) - { - conf_report_warning("listener '%s/%d': support for plaintext listeners may be removed in a future release per RFCs 7194 & 7258. " - "It is suggested that users be migrated to SSL/TLS connections.", listener_address, args->v.number); - } - if (sctp) { #ifdef HAVE_LIBSCTP add_sctp_listener(args->v.number, listener_address[0], listener_address[1], ssl, yy_wsock); @@ -1368,7 +1357,7 @@ conf_set_connect_host(void *data) { struct rb_sockaddr_storage addr; - if(rb_inet_pton_sock(data, (struct sockaddr *)&addr) <= 0) + if(rb_inet_pton_sock(data, &addr) <= 0) { rb_free(yy_server->connect_host); yy_server->connect_host = rb_strdup(data); @@ -1394,7 +1383,7 @@ conf_set_connect_vhost(void *data) { struct rb_sockaddr_storage addr; - if(rb_inet_pton_sock(data, (struct sockaddr *)&addr) <= 0) + if(rb_inet_pton_sock(data, &addr) <= 0) { rb_free(yy_server->bind_host); yy_server->bind_host = rb_strdup(data); @@ -1627,15 +1616,6 @@ conf_set_general_hide_error_messages(void *data) conf_report_error("Invalid setting '%s' for general::hide_error_messages.", val); } -static void -conf_set_general_kline_delay(void *data) -{ - ConfigFileEntry.kline_delay = *(unsigned int *) data; - - /* THIS MUST BE HERE to stop us being unable to check klines */ - kline_queued = false; -} - static void conf_set_general_stats_k_oper_only(void *data) { @@ -2211,7 +2191,7 @@ conf_set_opm_listen_address_both(void *data, bool ipv6) const char *confstr = (ipv6 ? "opm::listen_ipv6" : "opm::listen_ipv4"); char *ip = data; - if(!rb_inet_pton_sock(ip, (struct sockaddr *)&addr)) + if(!rb_inet_pton_sock(ip, &addr)) { conf_report_error("%s is an invalid address: %s", confstr, ip); return; @@ -2743,7 +2723,6 @@ static struct ConfEntry conf_general_table[] = { "compression_level", CF_INT, conf_set_general_compression_level, 0, NULL }, { "havent_read_conf", CF_YESNO, conf_set_general_havent_read_conf, 0, NULL }, { "hide_error_messages",CF_STRING, conf_set_general_hide_error_messages,0, NULL }, - { "kline_delay", CF_TIME, conf_set_general_kline_delay, 0, NULL }, { "stats_k_oper_only", CF_STRING, conf_set_general_stats_k_oper_only, 0, NULL }, { "stats_i_oper_only", CF_STRING, conf_set_general_stats_i_oper_only, 0, NULL }, { "default_umodes", CF_QSTRING, conf_set_general_default_umodes, 0, NULL }, @@ -2768,6 +2747,7 @@ static struct ConfEntry conf_general_table[] = { "client_exit", CF_YESNO, NULL, 0, &ConfigFileEntry.client_exit }, { "collision_fnc", CF_YESNO, NULL, 0, &ConfigFileEntry.collision_fnc }, { "resv_fnc", CF_YESNO, NULL, 0, &ConfigFileEntry.resv_fnc }, + { "post_registration_delay", CF_TIME, NULL, 0, &ConfigFileEntry.post_registration_delay }, { "connect_timeout", CF_TIME, NULL, 0, &ConfigFileEntry.connect_timeout }, { "default_floodcount", CF_INT, NULL, 0, &ConfigFileEntry.default_floodcount }, { "default_ident_timeout", CF_INT, NULL, 0, &ConfigFileEntry.default_ident_timeout }, @@ -2778,6 +2758,7 @@ static struct ConfEntry conf_general_table[] = { "hide_spoof_ips", CF_YESNO, NULL, 0, &ConfigFileEntry.hide_spoof_ips }, { "dline_with_reason", CF_YESNO, NULL, 0, &ConfigFileEntry.dline_with_reason }, { "kline_with_reason", CF_YESNO, NULL, 0, &ConfigFileEntry.kline_with_reason }, + { "hide_tkdline_duration", CF_YESNO, NULL, 0, &ConfigFileEntry.hide_tkdline_duration }, { "map_oper_only", CF_YESNO, NULL, 0, &ConfigFileEntry.map_oper_only }, { "max_accept", CF_INT, NULL, 0, &ConfigFileEntry.max_accept }, { "max_monitor", CF_INT, NULL, 0, &ConfigFileEntry.max_monitor }, @@ -2818,7 +2799,9 @@ static struct ConfEntry conf_general_table[] = { "max_ratelimit_tokens", CF_INT, NULL, 0, &ConfigFileEntry.max_ratelimit_tokens }, { "away_interval", CF_INT, NULL, 0, &ConfigFileEntry.away_interval }, { "hide_opers_in_whois", CF_YESNO, NULL, 0, &ConfigFileEntry.hide_opers_in_whois }, + { "hide_opers", CF_YESNO, NULL, 0, &ConfigFileEntry.hide_opers }, { "certfp_method", CF_STRING, conf_set_general_certfp_method, 0, NULL }, + { "drain_reason", CF_QSTRING, NULL, BUFSIZE, &ConfigFileEntry.drain_reason }, { "\0", 0, NULL, 0, NULL } }; @@ -2847,6 +2830,7 @@ static struct ConfEntry conf_channel_table[] = { "autochanmodes", CF_QSTRING, conf_set_channel_autochanmodes, 0, NULL }, { "displayed_usercount", CF_INT, NULL, 0, &ConfigChannel.displayed_usercount }, { "strip_topic_colors", CF_YESNO, NULL, 0, &ConfigChannel.strip_topic_colors }, + { "opmod_send_statusmsg", CF_YESNO, NULL, 0, &ConfigChannel.opmod_send_statusmsg }, { "\0", 0, NULL, 0, NULL } };