summaryrefslogtreecommitdiff
path: root/src/core/chat-commands.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-03-08 00:24:27 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-03-08 00:24:27 +0000
commit57493acd39f63c20407c098730936a582fd47c51 (patch)
tree8ef5f2f309a6797d7b434384878542ccba6ddc34 /src/core/chat-commands.c
parentf4fe749489f3e8ca97d1aa5f988d14c1bcae3d99 (diff)
downloadirssi-57493acd39f63c20407c098730936a582fd47c51.zip
/CONNECT -ircnet didn't load ircnet specific settings correctly
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1363 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/chat-commands.c')
-rw-r--r--src/core/chat-commands.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/core/chat-commands.c b/src/core/chat-commands.c
index eece8dde..e14aa6b0 100644
--- a/src/core/chat-commands.c
+++ b/src/core/chat-commands.c
@@ -63,8 +63,10 @@ static SERVER_CONNECT_REC *get_server_connect(const char *data, int *plus_addr)
proto = chat_protocol_find_net(optlist);
/* connect to server */
- conn = server_create_conn(proto != NULL ? proto->id : -1,
- addr, atoi(portstr), password, nick);
+ chatnet = proto == NULL ? NULL :
+ g_hash_table_lookup(optlist, proto->chatnet);
+ conn = server_create_conn(proto != NULL ? proto->id : -1, addr,
+ atoi(portstr), chatnet, password, nick);
if (proto == NULL)
proto = chat_protocol_find_id(conn->chat_type);
@@ -81,12 +83,6 @@ static SERVER_CONNECT_REC *get_server_connect(const char *data, int *plus_addr)
else if (g_hash_table_lookup(optlist, "4") != NULL)
conn->family = AF_INET;
- chatnet = g_hash_table_lookup(optlist, proto->chatnet);
- if (chatnet != NULL) {
- g_free_not_null(conn->chatnet);
- conn->chatnet = g_strdup(chatnet);
- }
-
host = g_hash_table_lookup(optlist, "host");
if (host != NULL && *host != '\0') {
IPADDR ip4, ip6;