Make sure the created favchannel instances have a NULL key when the session's key is empty
This commit is contained in:
parent
2ff8e74061
commit
fd1b276aab
@ -1105,7 +1105,15 @@ check_autojoin_channels (server *serv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sess_channels = servlist_favchan_listadd (sess_channels, sess->waitchannel, sess->channelkey);
|
/* for easier checks, ensure that favchannel->key is just NULL when session->channelkey is empty i.e. '' */
|
||||||
|
if (strlen (sess->channelkey))
|
||||||
|
{
|
||||||
|
sess_channels = servlist_favchan_listadd (sess_channels, sess->waitchannel, sess->channelkey);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sess_channels = servlist_favchan_listadd (sess_channels, sess->waitchannel, NULL);
|
||||||
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -194,7 +194,7 @@ irc_join_list (server *serv, GSList *favorites)
|
|||||||
|
|
||||||
g_string_append (chanlist, fav->name);
|
g_string_append (chanlist, fav->name);
|
||||||
|
|
||||||
if (fav->key && strlen (fav->key)) /* strlen() is required since key can be '' for session->channelkey */
|
if (fav->key) /* strlen() is required since key can be '' for session->channelkey */
|
||||||
{
|
{
|
||||||
g_string_append (keylist, fav->key);
|
g_string_append (keylist, fav->key);
|
||||||
send_keys = 1;
|
send_keys = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user