Send "XXYYY:o" instead of "XXYYY:0" for ops when oplevels are disabled.
authorMichael Poole <mdpoole@troilus.org>
Sun, 22 Aug 2004 23:54:22 +0000 (23:54 +0000)
committerMichael Poole <mdpoole@troilus.org>
Sun, 22 Aug 2004 23:54:22 +0000 (23:54 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1098 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/channel.c

index 3043932b095adc61d16995e45ca0b4fabf197377..f76382c76233ff0162579d83850af9df66945e7f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-08-22  Michael Poole <mdpoole@troilus.org>
+
+       * 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 <mdpoole@troilus.org>
 
        * ircd/s_conf.c: find_conf_byip() should use irc_in_addr_cmp()
index 885e787a00a6d37d763aff060d7b5a276917bf42..3f4f67dd0f2cf12042bbbc0814c1b9fd3f5e5d3a 100644 (file)
@@ -840,6 +840,7 @@ void send_channel_modes(struct Client *cptr, struct Channel *chptr)
   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 @@ void send_channel_modes(struct Client *cptr, struct Channel *chptr)
           * 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 @@ void send_channel_modes(struct Client *cptr, struct Channel *chptr)
              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);