From 0bcb16873eb2fb1c289743e7f48bb065b1c5a13f Mon Sep 17 00:00:00 2001 From: pk910 Date: Tue, 28 Jun 2011 22:33:38 +0200 Subject: [PATCH] bugfixes for the last commits --- ircd/channel.c | 6 +++--- ircd/m_names.c | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ircd/channel.c b/ircd/channel.c index c839fa2..33cfb82 100644 --- a/ircd/channel.c +++ b/ircd/channel.c @@ -3516,8 +3516,8 @@ mode_process_clients(struct ParseState *state) state->cli_change[i].client, state->cli_change[i].oplevel); - if(MyUser(state->sptr) && (state->chptr->mode.mode & MODE_AUDITORIUM) && (state->cli_change[i].flag & MODE_CHANOP)) { - do_names(state->sptr, state->chptr, NAMES_ALL|NAMES_EON|((member->status & MODE_CHANOP) ? 0 : NAMES_OPS)); + if(MyUser(member->user) && (member->channel->mode.mode & MODE_AUDITORIUM) && (state->cli_change[i].flag & MODE_CHANOP)) { + do_names(member->user, member->channel, NAMES_ALL|NAMES_EON|((member->status & MODE_CHANOP) ? 0 : NAMES_OPS)); } } /* for (i = 0; state->cli_change[i].flags; i++) */ } @@ -3948,7 +3948,7 @@ joinbuf_join(struct JoinBuf *jbuf, struct Channel *chan, unsigned int flags) } } - if((chan->mode.mode & MODE_DELJOINS) && !(flags & CHFL_VOICED_OR_OPPED)) { + if((chan->mode.mode & MODE_AUDITORIUM) && !(flags & CHFL_VOICED_OR_OPPED)) { //we have to send this JOIN event to ops only... sendcmdto_channel_butserv_butone(jbuf->jb_source, CMD_JOIN, chan, NULL, SKIP_NONOPS, "%H", chan); if(MyUser(jbuf->jb_source)) diff --git a/ircd/m_names.c b/ircd/m_names.c index 13950fc..eda8285 100644 --- a/ircd/m_names.c +++ b/ircd/m_names.c @@ -252,10 +252,9 @@ int m_names(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) if (!ShowChannel(sptr, ch2ptr)) continue; /* Don't show secret chans. */ else if ((member = find_channel_member(sptr, ch2ptr))) { - - do_names(sptr, ch2ptr, showingdelayed|NAMES_ALL|((chptr->mode.mode & MODE_AUDITORIUM) && !(member->status & MODE_CHANOP) ? NAMES_OPS : 0)); /* Full list if we're in this chan. */ + do_names(sptr, ch2ptr, showingdelayed|NAMES_ALL|((ch2ptr->mode.mode & MODE_AUDITORIUM) && !(member->status & MODE_CHANOP) ? NAMES_OPS : 0)); /* Full list if we're in this chan. */ } else - do_names(sptr, ch2ptr, showingdelayed|NAMES_VIS|((chptr->mode.mode & MODE_AUDITORIUM) ? NAMES_OPS : 0)); + do_names(sptr, ch2ptr, showingdelayed|NAMES_VIS|((ch2ptr->mode.mode & MODE_AUDITORIUM) ? NAMES_OPS : 0)); } /* List all remaining users on channel '*' */ -- 2.20.1