Merge cbbc41f1abf95309f6388e11132c963ac252d644 into a5441f62b95f8ff07631961800ecf569f5390b9d

This commit is contained in:
Alexander Gladun 2025-04-14 15:57:31 +02:00 committed by GitHub
commit 4ed9707b29
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -78,6 +78,10 @@ static char *server_create_address_tag(const char *address)
/* try to generate a reasonable server tag */
if (strchr(address, '.') == NULL) {
start = end = NULL;
} else if (g_ascii_strncasecmp(address, "irc.", 4) == 0) {
/* irc.it-hobby.km.ua -> it-hobby, irc.karbo-labs.pp.ua -> karbo-labs */
end = strchr(address + 3 + 1, '.');
start = address + 3;
} else if (g_ascii_strncasecmp(address, "irc", 3) == 0 ||
g_ascii_strncasecmp(address, "chat", 4) == 0) {
/* irc-2.cs.hut.fi -> hut, chat.bt.net -> bt */