]> jfr.im git - irc/quakenet/snircd.git/blobdiff - ircd/m_join.c
fixed autochanmodes code so it works for channel modes +CN
[irc/quakenet/snircd.git] / ircd / m_join.c
index 1d75c65933e50db61daf3317d52ca6990de1fb5d..832141e6e250ef51c00eb1b759ccd66d9c2a7fa5 100644 (file)
@@ -150,9 +150,9 @@ int m_join(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
     }
 
     /* BADCHANed channel */
-    if ((gline = gline_find(name, GLINE_BADCHAN | GLINE_EXACT)) &&
+    if ((gline = gline_find(name, GLINE_BADCHAN)) &&
        GlineIsActive(gline) && !IsAnOper(sptr)) {
-      send_reply(sptr, ERR_BANNEDFROMCHAN, name);
+      send_reply(sptr, ERR_BADCHANNAME, name, gline->gl_reason);
       continue;
     }
 
@@ -205,6 +205,14 @@ int m_join(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
       else if (*chptr->mode.key && (!key || strcmp(key, chptr->mode.key)))
         err = ERR_BADCHANNELKEY;
 
+      /*
+       * ASUKA_X:
+       * Allow XtraOpers to join all channels.
+       * --Bigfoot
+       */
+      if (IsXtraOp(sptr))
+        err = 0;
+      
       /* An oper with WALK_LCHAN privilege can join a local channel
        * he otherwise could not join by using "OVERRIDE" as the key.
        * This will generate a HACK(4) notice, but fails if the oper