Fix walk_lchan joins when channel key is OVERRIDE.
authorMichael Poole <mdpoole@troilus.org>
Mon, 31 Oct 2005 02:53:20 +0000 (02:53 +0000)
committerMichael Poole <mdpoole@troilus.org>
Mon, 31 Oct 2005 02:53:20 +0000 (02:53 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1535 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/m_join.c

index 4b1d04def9eac030b4d99cd1e20c75e0891cad6f..579cd21831c4a8fc8574d4212933811e9b5c5a72 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-10-30  Michael Poole <mdpoole@troilus.org>
+
+       * ircd/m_join.c (m_join): Fix check for OVERRIDE when the real
+       channel key is OVERRIDE.  (Reworked patch from a1kmm.)
+
 2005-10-30  Michael Poole <mdpoole@troilus.org>
 
        * .cvsignore: Add autom4te.cache.
index 66b1a5835e58fa0550d6ed4f601aabe728ad5352..d274e35db13d6c5f2a2656f019bf850c8658ceff 100644 (file)
@@ -210,13 +210,17 @@ int m_join(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
       if (IsLocalChannel(chptr->chname)
           && HasPriv(sptr, PRIV_WALK_LCHAN)
           && !(flags & CHFL_CHANOP)
-          && key && !strcmp(key, "OVERRIDE")
-          && strcmp(chptr->mode.key, "OVERRIDE"))
+          && key && !strcmp(key, "OVERRIDE"))
       {
         switch (err) {
         case 0:
-          send_reply(sptr, ERR_DONTCHEAT, chptr->chname);
-          continue;
+          if (strcmp(chptr->mode.key, "OVERRIDE")
+              && strcmp(chptr->mode.apass, "OVERRIDE")
+              && strcmp(chptr->mode.upass, "OVERRIDE")) {
+            send_reply(sptr, err, chptr->chname);
+            continue;
+          }
+          break;
         case ERR_INVITEONLYCHAN: err = 'i'; break;
         case ERR_CHANNELISFULL:  err = 'l'; break;
         case ERR_BANNEDFROMCHAN: err = 'b'; break;
@@ -225,8 +229,9 @@ int m_join(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
         default: err = '?'; break;
         }
         /* send accountability notice */
-        sendto_opmask_butone(0, SNO_HACK4, "OPER JOIN: %C JOIN %H "
-                             "(overriding +%c)", sptr, chptr, err);
+        if (err)
+          sendto_opmask_butone(0, SNO_HACK4, "OPER JOIN: %C JOIN %H "
+                               "(overriding +%c)", sptr, chptr, err);
         err = 0;
       }