From: Michael Poole Date: Sun, 22 Aug 2004 23:54:22 +0000 (+0000) Subject: Send "XXYYY:o" instead of "XXYYY:0" for ops when oplevels are disabled. X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=commitdiff_plain;h=274bb05ca61d5c311a8b820e7d80f90d7b55005d Send "XXYYY:o" instead of "XXYYY:0" for ops when oplevels are disabled. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1098 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- diff --git a/ChangeLog b/ChangeLog index 3043932..f76382c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-08-22 Michael Poole + + * 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 * ircd/s_conf.c: find_conf_byip() should use irc_in_addr_cmp() diff --git a/ircd/channel.c b/ircd/channel.c index 885e787..3f4f67d 100644 --- a/ircd/channel.c +++ b/ircd/channel.c @@ -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);