From 456e5b3d641ed7bb69fbe3aec4873f89e9eee668 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sat, 5 Dec 2009 20:48:02 +0100 Subject: [PATCH] Fix crashes when there are no alias blocks in the conf. --- src/newconf.c | 3 --- src/s_conf.c | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/newconf.c b/src/newconf.c index 2d0b63dd9..12893dd0d 100644 --- a/src/newconf.c +++ b/src/newconf.c @@ -1722,9 +1722,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; diff --git a/src/s_conf.c b/src/s_conf.c index 7acb57343..47d803465 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -834,6 +834,9 @@ set_default_conf(void) ConfigFileEntry.throttle_duration = 60; ServerInfo.default_max_clients = MAXCONNECTIONS; + + if (!alias_dict) + alias_dict = irc_dictionary_create(strcasecmp); } #undef YES