summaryrefslogtreecommitdiff
path: root/src/fe-common
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-03-10 19:58:16 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-03-10 19:58:16 +0000
commit1855e6cc5c84ec861bf1301c09841cb2fd9ad718 (patch)
tree241f2b605758f4a52bcdcc7a34a2c831e2ae2036 /src/fe-common
parent1997b58c3acd812ffa37caa62139b43245e33434 (diff)
downloadirssi-1855e6cc5c84ec861bf1301c09841cb2fd9ad718.zip
/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
Diffstat (limited to 'src/fe-common')
-rw-r--r--src/fe-common/irc/fe-irc-server.c8
1 files changed, 7 insertions, 1 deletions
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");