From 99b29df17cc89eaa10a7eb6ad6b8328a19445501 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 19 Dec 2000 17:47:33 +0000 Subject: put back ircnet -> chatnet backwards compatibility, this time modify the config file to use chatnet so after .98 we could remove this git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1016 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/channels-setup.c | 7 +++++++ src/core/servers-setup.c | 7 +++++++ 2 files changed, 14 insertions(+) (limited to 'src') diff --git a/src/core/channels-setup.c b/src/core/channels-setup.c index 4cef0e0c..8733b3ed 100644 --- a/src/core/channels-setup.c +++ b/src/core/channels-setup.c @@ -50,6 +50,13 @@ 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 after .98... */ { + rec->chatnet = g_strdup(config_node_get_str(node, "ircnet", NULL)); + if (rec->chatnet != NULL) { + iconfig_node_set_str(node, "chatnet", rec->chatnet); + iconfig_node_set_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); diff --git a/src/core/servers-setup.c b/src/core/servers-setup.c index 59883694..7545762d 100644 --- a/src/core/servers-setup.c +++ b/src/core/servers-setup.c @@ -314,6 +314,13 @@ 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 after .98... */ { + chatnet = config_node_get_str(node, "ircnet", NULL); + if (chatnet != NULL) { + iconfig_node_set_str(node, "chatnet", chatnet); + iconfig_node_set_str(node, "ircnet", NULL); + } + } signal_emit("server setup read", 3, &rec, node, chatnet == NULL ? NULL : chatnet_find(chatnet)); if (rec == NULL) { -- cgit v1.2.3