From 1855e6cc5c84ec861bf1301c09841cb2fd9ad718 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 10 Mar 2002 19:58:16 +0000 Subject: /SERVER ADD -ircnet should add the network to config with the same case as in /IRCNET list. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2568 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/irc/fe-irc-server.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/fe-common') diff --git a/src/fe-common/irc/fe-irc-server.c b/src/fe-common/irc/fe-irc-server.c index 221c7943..4afd96ee 100644 --- a/src/fe-common/irc/fe-irc-server.c +++ b/src/fe-common/irc/fe-irc-server.c @@ -27,6 +27,7 @@ #include "servers-setup.h" #include "levels.h" +#include "irc-chatnets.h" #include "irc-servers.h" #include "servers-reconnect.h" #include "irc-servers-setup.h" @@ -40,12 +41,17 @@ static void sig_server_add_fill(IRC_SERVER_SETUP_REC *rec, GHashTable *optlist) { + IRC_CHATNET_REC *ircnet; char *value; value = g_hash_table_lookup(optlist, "ircnet"); if (value != NULL) { g_free_and_null(rec->chatnet); - if (*value != '\0') rec->chatnet = g_strdup(value); + if (*value != '\0') { + ircnet = ircnet_find(value); + rec->chatnet = ircnet != NULL ? ircnet->name : + g_strdup(value); + } } value = g_hash_table_lookup(optlist, "cmdspeed"); -- cgit v1.2.3