Revision: 1935
          
http://undernet-ircu.svn.sourceforge.net/undernet-ircu/?rev=1935&view=rev
Author:   entrope
Date:     2010-01-07 02:39:48 +0000 (Thu, 07 Jan 2010)

Log Message:
-----------
Fix oplevel handling in bursts, fixing SF bugs #2596869 and #2597518.

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

Modified: ircu2/branches/u2_10_12_branch/ChangeLog
===================================================================
--- ircu2/branches/u2_10_12_branch/ChangeLog    2010-01-04 17:15:13 UTC (rev 
1934)
+++ ircu2/branches/u2_10_12_branch/ChangeLog    2010-01-07 02:39:48 UTC (rev 
1935)
@@ -1,3 +1,9 @@
+2010-01-06  Michael Poole <[email protected]>
+
+       * ircd/m_burst.c (ms_burst): Gracefully handle the case where a
+       server sends us a too-large oplevel.  Forward oplevels whenever
+       they are in use, not just when the channel is +A.
+
 2010-01-04  Kevin L. Mitchell  <[email protected]>
 
        * ircd/m_xquery.c (ms_xquery): Resolving my patches with

Modified: ircu2/branches/u2_10_12_branch/ircd/m_burst.c
===================================================================
--- ircu2/branches/u2_10_12_branch/ircd/m_burst.c       2010-01-04 17:15:13 UTC 
(rev 1934)
+++ ircu2/branches/u2_10_12_branch/ircd/m_burst.c       2010-01-07 02:39:48 UTC 
(rev 1935)
@@ -509,6 +509,11 @@
                  } while (IsDigit(*ptr));
                  --ptr;
                  oplevel += level_increment;
+                  if (oplevel > MAXOPLEVEL) {
+                    protocol_violation(sptr, "Invalid cumulative oplevel %u 
during burst", oplevel);
+                    oplevel = MAXOPLEVEL;
+                    break;
+                  }
                }
                else { /* I don't recognize that flag */
                  protocol_violation(sptr, "Invalid flag '%c' in nick part of 
burst", *ptr);
@@ -537,7 +542,7 @@
              nickstr[nickpos++] = 'v';
            if (current_mode & CHFL_CHANOP)
             {
-              if (chptr->mode.apass[0])
+              if (oplevel != MAXOPLEVEL)
                nickpos += ircd_snprintf(0, nickstr + nickpos, sizeof(nickstr) 
- nickpos, "%u", oplevel);
               else
                 nickstr[nickpos++] = 'o';


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