]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/newconf.c
Add resv oper priv, enabled by default for compatibility.
[irc/rqf/shadowircd.git] / src / newconf.c
index 84144e6a269f022c057879bf1e3b60c07852bf31..e6a549a3e616e086506955148d11a91cbfdd351a 100644 (file)
@@ -85,7 +85,7 @@ add_top_conf(const char *name, int (*sfunc) (struct TopConf *),
 
        tc = MyMalloc(sizeof(struct TopConf));
 
-       DupString(tc->tc_name, name);
+       tc->tc_name = name;
        tc->tc_sfunc = sfunc;
        tc->tc_efunc = efunc;
        tc->tc_entries = items;
@@ -153,7 +153,6 @@ remove_top_conf(char *name)
                return -1;
 
        dlinkDestroy(ptr, &conf_items);
-       MyFree(tc->tc_name);
        MyFree(tc);
 
        return 0;
@@ -322,6 +321,7 @@ static struct mode_table flag_table[] = {
        {"admin",               OPER_ADMIN              },
        {"hidden_admin",        OPER_HADMIN             },
        {"xline",               OPER_XLINE              },
+       {"resv",                OPER_RESV               },
        {"operwall",            OPER_OPERWALL           },
        {"oper_spy",            OPER_SPY                },
        {"hidden_oper",         OPER_INVIS              },
@@ -466,7 +466,7 @@ conf_begin_oper(struct TopConf *tc)
        }
 
        yy_oper = make_oper_conf();
-       yy_oper->flags |= OPER_ENCRYPTED|OPER_OPERWALL|OPER_REMOTEBAN;
+       yy_oper->flags |= OPER_ENCRYPTED|OPER_RESV|OPER_OPERWALL|OPER_REMOTEBAN;
 
        return 0;
 }
@@ -537,7 +537,7 @@ conf_end_oper(struct TopConf *tc)
                        yy_tmpoper->rsa_pubkey =
                                (RSA *) PEM_read_bio_RSA_PUBKEY(file, NULL, 0, NULL);
 
-                       BIO_set_close(file, BIO_CLOSE);
+                       (void)BIO_set_close(file, BIO_CLOSE);
                        BIO_free(file);
 
                        if(yy_tmpoper->rsa_pubkey == NULL)
@@ -1619,7 +1619,7 @@ conf_end_alias(struct TopConf *tc)
        }
 
        if (!alias_dict)
-               alias_dict = irc_dictionary_create(alias_dict);
+               alias_dict = irc_dictionary_create(strcasecmp);
 
        irc_dictionary_add(alias_dict, yy_alias->name, yy_alias);
 
@@ -1849,7 +1849,7 @@ add_conf_item(const char *topconf, const char *name, int type, void (*func) (voi
 
        cf = MyMalloc(sizeof(struct ConfEntry));
 
-       DupString(cf->cf_name, name);
+       cf->cf_name = name;
        cf->cf_type = type;
        cf->cf_func = func;
        cf->cf_arg = NULL;