Be more conservative when handling empty keys.
authorMichael Poole <mdpoole@troilus.org>
Mon, 12 Sep 2005 15:47:31 +0000 (15:47 +0000)
committerMichael Poole <mdpoole@troilus.org>
Mon, 12 Sep 2005 15:47:31 +0000 (15:47 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1479 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/m_join.c

index 11c1d561da176c123f2dfb2b7a2dd4b80bcf7b86..f25f86bb931a7de78586489ea3b27c58c8c1b4aa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-09-12  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/m_join.c (m_join): If we find an empty key, null out the
+       key pointer.
+
 2005-09-11  Michael Poole <mdpoole@troilus.org>
 
        * RELEASE.NOTES: Mention the side benefits of this change.
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))
     {