Allow servers with the same server and port to be part of multiple networks. This should make life much easier for znc users. Thanks to Tykling, Bazerka and znx.

git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5125 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Alexander Færøy 2010-03-21 20:06:10 +00:00 committed by ahf
commit e37be456cd
5 changed files with 29 additions and 26 deletions

View file

@ -346,10 +346,13 @@ static void autoconnect_servers(void)
if (rec->autoconnect &&
(rec->chatnet == NULL ||
gslist_find_icase_string(chatnets, rec->chatnet) == NULL)) {
if (rec->chatnet != NULL)
if (rec->chatnet != NULL) {
chatnets = g_slist_append(chatnets, rec->chatnet);
str = g_strdup_printf("-network %s %s %d", rec->chatnet, rec->address, rec->port);
} else {
str = g_strdup_printf("%s %d", rec->address, rec->port);
}
str = g_strdup_printf("%s %d", rec->address, rec->port);
signal_emit("command connect", 1, str);
g_free(str);
}