Whoops, missed a case here. Fix.
[ircu2.10.12-pk.git] / ircd / m_join.c
index 70bec20f017e4a40e03a79c87de1ce24749fdb3a..f00872a28389cc923f9a51235952a51aa6aca03c 100644 (file)
@@ -259,7 +259,7 @@ int m_join(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
         err = ERR_NEEDREGGEDNICK;
       else if (find_ban(sptr, chptr->banlist))
         err = ERR_BANNEDFROMCHAN;
-      else if (*chptr->mode.key && strcmp(chptr->mode.key, key))
+      else if (*chptr->mode.key && (BadPtr(key) || strcmp(chptr->mode.key, key)))
         err = ERR_BADCHANNELKEY;
 
       /* An oper with WALK_LCHAN privilege can join a local channel