Revision: 1915
          
http://undernet-ircu.svn.sourceforge.net/undernet-ircu/?rev=1915&view=rev
Author:   entrope
Date:     2009-07-06 01:27:24 +0000 (Mon, 06 Jul 2009)

Log Message:
-----------
Fix SF bug #2596914 (/mode +v nick:level gives oplevel).

Modified Paths:
--------------
    ircu2/branches/u2_10_12_branch/ChangeLog
    ircu2/branches/u2_10_12_branch/ircd/channel.c

Modified: ircu2/branches/u2_10_12_branch/ChangeLog
===================================================================
--- ircu2/branches/u2_10_12_branch/ChangeLog    2009-07-05 03:00:52 UTC (rev 
1914)
+++ ircu2/branches/u2_10_12_branch/ChangeLog    2009-07-06 01:27:24 UTC (rev 
1915)
@@ -1,3 +1,8 @@
+2009-07-05  Michael Poole <[email protected]>
+
+       * ircd/channel.c (mode_parse_client): Ignore anything after a
+       colon when the mode is CHFL_VOICE or the mode is being removed.
+
 2009-07-04  Michael Poole <[email protected]>
 
        * ircd/s_auth.c (find_conf_client): New function.

Modified: ircu2/branches/u2_10_12_branch/ircd/channel.c
===================================================================
--- ircu2/branches/u2_10_12_branch/ircd/channel.c       2009-07-05 03:00:52 UTC 
(rev 1914)
+++ ircu2/branches/u2_10_12_branch/ircd/channel.c       2009-07-06 01:27:24 UTC 
(rev 1915)
@@ -2989,17 +2989,19 @@
     if (colon != NULL) {
       *colon++ = '\0';
       req_oplevel = atoi(colon);
-      if (!(state->flags & MODE_PARSE_FORCE)
+      if (*flag_p == CHFL_VOICE || state->dir == MODE_DEL) {
+        /* Ignore the colon and its argument. */
+      } else if (!(state->flags & MODE_PARSE_FORCE)
           && state->member
           && (req_oplevel < OpLevel(state->member)
               || (req_oplevel == OpLevel(state->member)
                   && OpLevel(state->member) < MAXOPLEVEL)
-              || req_oplevel > MAXOPLEVEL))
+              || req_oplevel > MAXOPLEVEL)) {
         send_reply(state->sptr, ERR_NOTLOWEROPLEVEL,
                    t_str, state->chptr->chname,
                    OpLevel(state->member), req_oplevel, "op",
                    OpLevel(state->member) == req_oplevel ? "the same" : "a 
higher");
-      else if (req_oplevel <= MAXOPLEVEL)
+      } else if (req_oplevel <= MAXOPLEVEL)
         oplevel = req_oplevel;
     }
     /* find client we're manipulating */


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to