1
0
mirror of https://github.com/irssi/irssi.git synced 2024-06-23 06:35:36 +00:00
This commit is contained in:
baytuch 2024-04-10 18:04:10 -04:00 committed by GitHub
commit f3f80771f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -80,10 +80,11 @@ static char *server_create_address_tag(const char *address)
start = end = NULL; start = end = NULL;
} else if (g_ascii_strncasecmp(address, "irc", 3) == 0 || } else if (g_ascii_strncasecmp(address, "irc", 3) == 0 ||
g_ascii_strncasecmp(address, "chat", 4) == 0) { g_ascii_strncasecmp(address, "chat", 4) == 0) {
/* irc-2.cs.hut.fi -> hut, chat.bt.net -> bt */ /* irc.it-hobby.km.ua -> it-hobby, chat.bt.net -> bt */
end = strrchr(address, '.'); int offset = 3;
start = end-1; if (g_ascii_strncasecmp(address, "chat", 4) == 0) offset++;
while (start > address && *start != '.') start--; end = strchr(address + offset + 1, '.');
start = address + offset;
} else { } else {
/* efnet.cs.hut.fi -> efnet */ /* efnet.cs.hut.fi -> efnet */
end = strchr(address, '.'); end = strchr(address, '.');