diff options
author | Berke Viktor <bviktor@hexchat.org> | 2013-05-16 00:04:58 +0200 |
---|---|---|
committer | Berke Viktor <bviktor@hexchat.org> | 2013-05-16 00:04:58 +0200 |
commit | fd1b276aabcf7a7e4269ca6ae72e04411212f35c (patch) | |
tree | b30e7cff31b4d82026b17240e2e100ab781d5220 /src/common/inbound.c | |
parent | 2ff8e74061875617d45fdc9a40a733aac1214abd (diff) |
Make sure the created favchannel instances have a NULL key when the session's key is empty
Diffstat (limited to 'src/common/inbound.c')
-rw-r--r-- | src/common/inbound.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/common/inbound.c b/src/common/inbound.c index 2f33199a..07539a63 100644 --- a/src/common/inbound.c +++ b/src/common/inbound.c @@ -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++; } } |