1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05: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");
if (chantypes == NULL)
chantypes = "#&!+"; /* normal, local, secure, modeless */
statusmsg = g_hash_table_lookup(irc_server->isupport, "statusmsg");
if (statusmsg == NULL)
statusmsg = "@+";
while (strchr(statusmsg, *data) != NULL)
data++;
statusmsg = g_hash_table_lookup(irc_server->isupport, "statusmsg");
if (statusmsg != NULL) {
while (strchr(statusmsg, *data) != NULL)
data++;
}
return strchr(chantypes, *data) != NULL;
}