In signoff assure that channel key is present before sending it.
[silc.git] / apps / silcd / server_util.c
index 93f2d5bd4687cb29bf7144c295953e469e5ab070..92b7bd783f27f0e65fb44e7233cf5b3825ffda48 100644 (file)
@@ -358,7 +358,7 @@ bool silc_server_remove_clients_by_server(SilcServer server,
     }
 
     /* Do not send the channel key if private channel key mode is set */
-    if (channel->mode & SILC_CHANNEL_MODE_PRIVKEY)
+    if (channel->mode & SILC_CHANNEL_MODE_PRIVKEY || !channel->channel_key)
       continue;
 
     silc_server_send_channel_key(server, NULL, channel,