1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-15 04:28:09 -04:00

Do not assume any default value for statusmsg.

If the server didn't send it then just skip the check, the old value it
defaulted to was possibly overlapping with the CHANTYPES leading to an
incorrect behaviour. Fixes #435.
This commit is contained in:
LemonBoy 2016-03-17 22:27:05 +01:00
parent 795b7de808
commit f6c2805b91

View File

@ -81,12 +81,12 @@ static int ischannel_func(SERVER_REC *server, const char *data)
chantypes = g_hash_table_lookup(irc_server->isupport, "chantypes"); chantypes = g_hash_table_lookup(irc_server->isupport, "chantypes");
if (chantypes == NULL) if (chantypes == NULL)
chantypes = "#&!+"; /* normal, local, secure, modeless */ chantypes = "#&!+"; /* normal, local, secure, modeless */
statusmsg = g_hash_table_lookup(irc_server->isupport, "statusmsg");
if (statusmsg == NULL)
statusmsg = "@+";
statusmsg = g_hash_table_lookup(irc_server->isupport, "statusmsg");
if (statusmsg != NULL) {
while (strchr(statusmsg, *data) != NULL) while (strchr(statusmsg, *data) != NULL)
data++; data++;
}
return strchr(chantypes, *data) != NULL; return strchr(chantypes, *data) != NULL;
} }