summary refs log tree commit diff stats
path: root/src/common/proto-irc.c
diff options
context:
space:
mode:
authorBerke Viktor <bviktor@hexchat.org>2013-05-15 11:43:38 +0200
committerBerke Viktor <bviktor@hexchat.org>2013-05-15 11:43:38 +0200
commit8cf025f18d85c079a8e95140cdc5abc8b6fc9c04 (patch)
tree68cd74f675a885f4ec8448a7e0389b86a99dddee /src/common/proto-irc.c
parent81990ce53b90aa3351ef5981ce2a74c54a1f85f5 (diff)
Fix autojoins for sessions
Diffstat (limited to 'src/common/proto-irc.c')
-rw-r--r--src/common/proto-irc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c
index 8beb83f2..792927db 100644
--- a/src/common/proto-irc.c
+++ b/src/common/proto-irc.c
@@ -185,13 +185,13 @@ irc_join_list (server *serv, GSList *favorites)
 
 		g_string_append (chanlist, fav->name);
 
-		if (fav->key)
+		if (fav->key && strlen (fav->key))					/* strlen() is required since key can be '' for session->channelkey */
 		{
 			g_string_append (keylist, fav->key);
 		}
 		else
 		{
-			g_string_append_c (keylist, 'x');				/* 'x' filler for keyless channels */
+			g_string_append_c (keylist, 'x');				/* 'x' filler for keyless channels so that our JOIN command is always well-formatted */
 		}
 
 		first_item = 0;