diff --git a/src/core/channels-setup.c b/src/core/channels-setup.c index 6867568d..b56ffb6e 100644 --- a/src/core/channels-setup.c +++ b/src/core/channels-setup.c @@ -50,6 +50,8 @@ static CHANNEL_SETUP_REC *channel_setup_read(CONFIG_NODE *node) rec->autojoin = config_node_get_bool(node, "autojoin", FALSE); rec->name = g_strdup(channel); rec->chatnet = g_strdup(config_node_get_str(node, "chatnet", NULL)); + if (rec->chatnet == NULL) /* FIXME: remove this in time... */ + rec->chatnet = g_strdup(config_node_get_str(node, "ircnet", NULL)); rec->password = (password == NULL || *password == '\0') ? NULL : g_strdup(password); rec->botmasks = (botmasks == NULL || *botmasks == '\0') ? NULL : g_strdup(botmasks); rec->autosendcmd = (autosendcmd == NULL || *autosendcmd == '\0') ? NULL : g_strdup(autosendcmd); @@ -106,7 +108,7 @@ static void channels_setup_destroy_rec(CHANNEL_SETUP_REC *channel) signal_emit("channel setup destroyed", 1, channel); g_free(channel->name); - g_free(channel->chatnet); + g_free_not_null(channel->chatnet); g_free_not_null(channel->password); g_free_not_null(channel->botmasks); g_free_not_null(channel->autosendcmd); diff --git a/src/core/servers-setup.c b/src/core/servers-setup.c index 980c7f2e..3faf76b6 100644 --- a/src/core/servers-setup.c +++ b/src/core/servers-setup.c @@ -313,6 +313,8 @@ static SERVER_SETUP_REC *server_setup_read(CONFIG_NODE *node) rec = NULL; chatnet = config_node_get_str(node, "chatnet", NULL); + if (chatnet == NULL) /* FIXME: remove this in time... */ + chatnet = config_node_get_str(node, "ircnet", NULL); signal_emit("server setup read", 3, &rec, node, chatnet == NULL ? NULL : chatnet_find(chatnet)); if (rec == NULL) {