Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Commit time: 2004-08-22 23:54:33 UTC

Modified files:
     ircd/channel.c ChangeLog

Log message:

Send "XXYYY:o" instead of "XXYYY:0" for ops when oplevels are disabled.

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.442 ircu2.10/ChangeLog:1.443
--- ircu2.10/ChangeLog:1.442    Sun Aug 22 16:45:52 2004
+++ ircu2.10/ChangeLog  Sun Aug 22 16:54:22 2004
@@ -1,5 +1,10 @@
 2004-08-22  Michael Poole <[EMAIL PROTECTED]>
 
+       * ircd/channel.c (send_channel_modes): If oplevels are disabled,
+       send 'o' for chanops instead of the member's oplevel.
+
+2004-08-22  Michael Poole <[EMAIL PROTECTED]>
+
        * ircd/s_conf.c: find_conf_byip() should use irc_in_addr_cmp()
        instead of memcmp().  (Fixes IPv4 servers linking to an IPv6
        server.)
Index: ircu2.10/ircd/channel.c
diff -u ircu2.10/ircd/channel.c:1.94 ircu2.10/ircd/channel.c:1.95
--- ircu2.10/ircd/channel.c:1.94        Wed Aug 18 21:00:50 2004
+++ ircu2.10/ircd/channel.c     Sun Aug 22 16:54:22 2004
@@ -17,7 +17,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: channel.c,v 1.94 2004/08/19 04:00:50 entrope Exp $
+ * $Id: channel.c,v 1.95 2004/08/22 23:54:22 entrope Exp $
  */
 #include "config.h"
 
@@ -840,6 +840,7 @@
   int                 opped_members_index = 0;
   struct Membership** opped_members = NULL;
   int                 last_oplevel = 0;
+  int                 feat_oplevels =  feature_bool(FEAT_OPLEVELS);
 
   assert(0 != cptr);
   assert(0 != chptr); 
@@ -918,7 +919,7 @@
           * Do we have a nick with a new mode ?
           * Or are we starting a new BURST line?
           */
-         if (new_mode)
+         if (new_mode || !feat_oplevels)
          {
            /*
             * This means we are at the _first_ member that has only
@@ -936,9 +937,11 @@
              tbuf[loc++] = 'v';
            if (IsChanOp(member))       /* flag_cnt == 2 or 3 */
            {
-             /* append the absolute value of the oplevel */
-             loc += ircd_snprintf(0, tbuf + loc, sizeof(tbuf) - loc, "%u", 
member->oplevel);
-             last_oplevel = member->oplevel;
+              /* append the absolute value of the oplevel */
+              if (feat_oplevels)
+                loc += ircd_snprintf(0, tbuf + loc, sizeof(tbuf) - loc, "%u", 
last_oplevel = member->oplevel);
+              else
+                tbuf[loc++] = 'o';
            }
            tbuf[loc] = '\0';
            msgq_append(&me, mb, tbuf);
----------------------- End of diff -----------------------

Reply via email to