diff --git a/Changes b/Changes index f7a5b65db..8171e658b 100644 --- a/Changes +++ b/Changes @@ -639,3 +639,18 @@ Fixed userhost displaying * all the time Fixed broken m_invite, thanks to codemastr --Luke =================================== + +Fixed halfop kick priv bug thanks to JK +--Luke +=================================== + +Added Oo flags in version response if +OPEROVERRIDE is enabled, and OPEROVERRIDE_VERIFY +enabled. +--Luke +=================================== + +Removed LEAST_IDLE, served no useful purpose +really. +--Luke +=================================== diff --git a/include/config.h b/include/config.h index 41d40816c..a285755c4 100644 --- a/include/config.h +++ b/include/config.h @@ -130,7 +130,11 @@ * channels, preventing them from "accidentally" joining random * channels */ +#ifndef NO_OPEROVERRIDE +#define OPEROVERRIDE_VERIFY 1 +#else #undef OPEROVERRIDE_VERIFY +#endif /* * Disable /sethost, /setident, /chgname, /chghost, /chgident @@ -615,8 +619,6 @@ extern void debug(); # endif #endif -# undef LEAST_IDLE - #if defined(mips) || defined(PCS) #undef SYSV #endif diff --git a/src/channel.c b/src/channel.c index 09243e297..44d7e0ef5 100644 --- a/src/channel.c +++ b/src/channel.c @@ -3436,6 +3436,18 @@ int m_kick(cptr, sptr, parc, parv) me.name, sptr->name, chptr->chname); goto deny; } + + /* I pondered adding && !is_chan_op(who,chptr) in with is_half_op, but that's redundant + * since the previous check would already have sent you to deny. + */ + if (is_half_op(who,chptr) && is_halfop(sptr,chptr) + && !is_chan_op(sptr,chptr)) + { + sendto_one(sptr, + ":%s NOTICE %s :*** You cannot kick halfops on %s if you are only a halfop", + me.name, sptr->name, chptr->chname); + goto deny; + } /* Protected users, Owners, and Services can't get nailed unless they're nailing themselves * However, owners CAN nail protected users, as they're higher. @@ -3829,37 +3841,42 @@ int m_invite(cptr, sptr, parc, parv) if (over) { if (is_banned(acptr, sptr, chptr)) { - sendto_umode(UMODE_EYES, - "*** OperOverride -- %s (%s@%s) invited him/herself into %s (overriding +b).", - sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname); + sendto_umode(UMODE_EYES, + "*** OperOverride -- %s (%s@%s) invited him/herself into %s (overriding +b).", + sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname); } else if (chptr->mode.mode & MODE_INVITEONLY) { - sendto_umode(UMODE_EYES, - "*** OperOverride -- %s (%s@%s) invited him/herself into %s (overriding +i).", - sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname); + sendto_umode(UMODE_EYES, + "*** OperOverride -- %s (%s@%s) invited him/herself into %s (overriding +i).", + sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname); } else if (chptr->mode.limit) { - sendto_umode(UMODE_EYES, - "*** OperOverride -- %s (%s@%s) invited him/herself into %s (overriding +l).", - sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname); + sendto_umode(UMODE_EYES, + "*** OperOverride -- %s (%s@%s) invited him/herself into %s (overriding +l).", + sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname); } else if (chptr->mode.mode & MODE_RGSTRONLY) { - sendto_umode(UMODE_EYES, - "*** OperOverride -- %s (%s@%s) invited him/herself into %s (overriding +R).", - sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname); + sendto_umode(UMODE_EYES, + "*** OperOverride -- %s (%s@%s) invited him/herself into %s (overriding +R).", + sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname); } else if (*chptr->mode.key) { - sendto_umode(UMODE_EYES, - "*** OperOverride -- %s (%s@%s) invited him/herself into %s (overriding +k).", - sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname); + sendto_umode(UMODE_EYES, + "*** OperOverride -- %s (%s@%s) invited him/herself into %s (overriding +k).", + sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname); } #ifdef OPEROVERRIDE_VERIFY else if (chptr->mode.mode & MODE_SECRET || chptr->mode.mode & MODE_PRIVATE) - over = -1; + { + sendto_umode(UMODE_EYES, + "*** OperOverride -- %s (%s@%s) invited him/herself into %s (potentially overriding +s or +p).", + sptr->name, sptr->user->username, sptr->user->realhost, chptr->chname); + over = -1; + } #endif else return 0; diff --git a/src/s_debug.c b/src/s_debug.c index 84c8f2076..cbf1a03bc 100644 --- a/src/s_debug.c +++ b/src/s_debug.c @@ -54,9 +54,6 @@ char serveropts[] = { #ifndef NO_DEFAULT_INVISIBLE 'I', #endif -#ifdef LEAST_IDLE - 'L', -#endif #ifdef CRYPT_OPER_PASSWORD 'p', #endif @@ -87,6 +84,12 @@ char serveropts[] = { #ifdef ENABLE_INVISOPER 'R', #endif +#ifndef NO_OPEROVERRIDE + 'O', +#endif +#ifdef OPEROVERRIDE_VERIFY + 'o', +#endif #ifdef NO_IDENT_CHECKING 'K', #endif