]> jfr.im git - solanum.git/blobdiff - ircd/s_conf.c
Rework oper hiding
[solanum.git] / ircd / s_conf.c
index 87589332800664158d1dd0a13aa2bb6ef2ee3927..dbed64d02c85717c01e524ac9a9f8b5f6946a7be 100644 (file)
@@ -256,7 +256,7 @@ check_client(struct Client *client_p, struct Client *source_p, const char *usern
        case NOT_AUTHORISED:
                {
                        int port = -1;
-                       port = ntohs(GET_SS_PORT(&source_p->localClient->listener->addr));
+                       port = ntohs(GET_SS_PORT(&source_p->localClient->listener->addr[0]));
 
                        ServerStats.is_ref++;
                        /* jdc - lists server name & port connections are on */
@@ -679,10 +679,8 @@ set_default_conf(void)
 
        memset(&ServerInfo.bind4, 0, sizeof(ServerInfo.bind4));
        SET_SS_FAMILY(&ServerInfo.bind4, AF_UNSPEC);
-#ifdef RB_IPV6
        memset(&ServerInfo.bind6, 0, sizeof(ServerInfo.bind6));
        SET_SS_FAMILY(&ServerInfo.bind6, AF_UNSPEC);
-#endif
 
        AdminInfo.name = NULL;
        AdminInfo.email = NULL;
@@ -709,7 +707,6 @@ set_default_conf(void)
        ConfigFileEntry.client_exit = true;
        ConfigFileEntry.dline_with_reason = true;
        ConfigFileEntry.kline_with_reason = true;
-       ConfigFileEntry.kline_delay = 0;
        ConfigFileEntry.warn_no_nline = true;
        ConfigFileEntry.non_redundant_klines = true;
        ConfigFileEntry.stats_e_disabled = false;
@@ -812,6 +809,7 @@ set_default_conf(void)
        ConfigFileEntry.nicklen = NICKLEN;
        ConfigFileEntry.certfp_method = RB_SSL_CERTFP_METH_CERT_SHA1;
        ConfigFileEntry.hide_opers_in_whois = 0;
+       ConfigFileEntry.hide_opers = 0;
 
        if (!alias_dict)
                alias_dict = rb_dictionary_create("alias", rb_strcasecmp);
@@ -1263,7 +1261,7 @@ char *
 get_oper_name(struct Client *client_p)
 {
        /* +5 for !,@,{,} and null */
-       static char buffer[NICKLEN + USERLEN + HOSTLEN + HOSTLEN + 5];
+       static char buffer[NAMELEN + USERLEN + HOSTLEN + HOSTLEN + 5];
 
        if(MyOper(client_p))
        {