diff options
-rw-r--r-- | src/core/servers-setup.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/servers-setup.c b/src/core/servers-setup.c index 92f977b8..795baefa 100644 --- a/src/core/servers-setup.c +++ b/src/core/servers-setup.c @@ -288,15 +288,21 @@ server_create_conn(int chat_type, const char *dest, int port, const char *nick) { SERVER_CONNECT_REC *rec; + CHATNET_REC *chatrec; g_return_val_if_fail(dest != NULL, NULL); - if (chatnet_find(dest) != NULL) { - rec = create_chatnet_conn(dest, port, password, nick); + chatrec = chatnet_find(dest); + if (chatrec != NULL) { + rec = create_chatnet_conn(chatrec->name, port, password, nick); if (rec != NULL) return rec; } + chatrec = chatnet_find(chatnet); + if (chatrec != NULL) + chatnet = chatrec->name; + return create_addr_conn(chat_type, dest, port, chatnet, password, nick); } |