From: Michael Poole Date: Mon, 31 Oct 2005 02:53:20 +0000 (+0000) Subject: Fix walk_lchan joins when channel key is OVERRIDE. X-Git-Url: http://git.pk910.de/?a=commitdiff_plain;h=b0cb97e9754a805ea2109852ba88ebc7e98d7fe2;p=ircu2.10.12-pk.git Fix walk_lchan joins when channel key is OVERRIDE. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1535 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- diff --git a/ChangeLog b/ChangeLog index 4b1d04d..579cd21 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-10-30 Michael Poole + + * ircd/m_join.c (m_join): Fix check for OVERRIDE when the real + channel key is OVERRIDE. (Reworked patch from a1kmm.) + 2005-10-30 Michael Poole * .cvsignore: Add autom4te.cache. diff --git a/ircd/m_join.c b/ircd/m_join.c index 66b1a58..d274e35 100644 --- a/ircd/m_join.c +++ b/ircd/m_join.c @@ -210,13 +210,17 @@ int m_join(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) if (IsLocalChannel(chptr->chname) && HasPriv(sptr, PRIV_WALK_LCHAN) && !(flags & CHFL_CHANOP) - && key && !strcmp(key, "OVERRIDE") - && strcmp(chptr->mode.key, "OVERRIDE")) + && key && !strcmp(key, "OVERRIDE")) { switch (err) { case 0: - send_reply(sptr, ERR_DONTCHEAT, chptr->chname); - continue; + if (strcmp(chptr->mode.key, "OVERRIDE") + && strcmp(chptr->mode.apass, "OVERRIDE") + && strcmp(chptr->mode.upass, "OVERRIDE")) { + send_reply(sptr, err, chptr->chname); + continue; + } + break; case ERR_INVITEONLYCHAN: err = 'i'; break; case ERR_CHANNELISFULL: err = 'l'; break; case ERR_BANNEDFROMCHAN: err = 'b'; break; @@ -225,8 +229,9 @@ int m_join(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) default: err = '?'; break; } /* send accountability notice */ - sendto_opmask_butone(0, SNO_HACK4, "OPER JOIN: %C JOIN %H " - "(overriding +%c)", sptr, chptr, err); + if (err) + sendto_opmask_butone(0, SNO_HACK4, "OPER JOIN: %C JOIN %H " + "(overriding +%c)", sptr, chptr, err); err = 0; }