X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/8ac75529832a07c76478f08552034f8f3380309b..1ebe6ffc92cae7ed80ac5b8dd6edfd330229ae43:/src/newconf.c diff --git a/src/newconf.c b/src/newconf.c index 84144e6..e6a549a 100644 --- a/src/newconf.c +++ b/src/newconf.c @@ -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;