Be more conservative when handling empty keys.
[ircu2.10.12-pk.git] / ircd / m_join.c
index 39194b0641285bd37b1a779373afea927673a895..ad412956a64285c8e3aeb61e62511994fb336b09 100644 (file)
@@ -131,6 +131,10 @@ int m_join(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
         && (keys = strchr(key = keys, ',')))
       *keys++ = '\0';
 
+    /* Empty keys are the same as no keys. */
+    if (!key[0])
+      key = 0;
+
     clean_channelname(name);
     if (!IsChannelName(name))
     {