]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/newconf.c
target change: Overwrite the least recently used target with a new one.
[irc/rqf/shadowircd.git] / src / newconf.c
index 19d6317c4630e2cd8fe86fe460870a51904f9442..3cf15c6d5ba035e6f2de6048dcffb70362425700 100644 (file)
@@ -892,7 +892,7 @@ conf_begin_auth(struct TopConf *tc)
 static int
 conf_end_auth(struct TopConf *tc)
 {
-       struct ConfItem *yy_tmp;
+       struct ConfItem *yy_tmp, *found_conf;
        rb_dlink_node *ptr;
        rb_dlink_node *next_ptr;
 
@@ -910,9 +910,11 @@ conf_end_auth(struct TopConf *tc)
        collapse(yy_aconf->user);
        collapse(yy_aconf->host);
        conf_add_class_to_conf(yy_aconf);
-       if (find_exact_conf_by_address("*", CONF_CLIENT, "*"))
+       if ((found_conf = find_exact_conf_by_address("*", CONF_CLIENT, "*")) && found_conf->spasswd == NULL)
                conf_report_error("Ignoring redundant auth block (after *@*)");
-       else if (find_exact_conf_by_address(yy_aconf->host, CONF_CLIENT, yy_aconf->user))
+       else if ((found_conf = find_exact_conf_by_address(yy_aconf->host, CONF_CLIENT, yy_aconf->user)) &&
+                       (!found_conf->spasswd || (yy_aconf->spasswd &&
+                           0 == irccmp(found_conf->spasswd, yy_aconf->spasswd))))
                conf_report_error("Ignoring duplicate auth block for %s@%s",
                                yy_aconf->user, yy_aconf->host);
        else
@@ -1722,9 +1724,6 @@ conf_end_alias(struct TopConf *tc)
                return -1;
        }
 
-       if (!alias_dict)
-               alias_dict = irc_dictionary_create(strcasecmp);
-
        irc_dictionary_add(alias_dict, yy_alias->name, yy_alias);
 
        return 0;
@@ -1790,8 +1789,6 @@ conf_report_error(const char *fmt, ...)
 
        ierror("\"%s\", line %d: %s", current_file, lineno + 1, msg);
        sendto_realops_snomask(SNO_GENERAL, L_ALL, "\"%s\", line %d: %s", current_file, lineno + 1, msg);
-       if (remote_rehash_oper_p)
-               sendto_one_notice(remote_rehash_oper_p, ":*** Notice -- \"%s\", line %d: %s", current_file, lineno + 1, msg);
 }
 
 int
@@ -2192,6 +2189,7 @@ static struct ConfEntry conf_channel_table[] =
        { "use_invex",          CF_YESNO, NULL, 0, &ConfigChannel.use_invex             },
        { "use_knock",          CF_YESNO, NULL, 0, &ConfigChannel.use_knock             },
        { "use_forward",        CF_YESNO, NULL, 0, &ConfigChannel.use_forward           },
+       { "resv_forcepart",     CF_YESNO, NULL, 0, &ConfigChannel.resv_forcepart        },
        { "\0",                 0,        NULL, 0, NULL }
 };