+2005-10-30 Michael Poole <mdpoole@troilus.org>
+
+ * 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 <mdpoole@troilus.org>
* .cvsignore: Add autom4te.cache.
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;
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;
}