1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-03 11:03:12 +02:00

Halfop priv bug + Oo version flags + LEAST_IDLE

This commit is contained in:
luke
2002-08-20 18:47:37 +00:00
parent 8601eaadc1
commit 6fb290e077
4 changed files with 58 additions and 21 deletions
+15
View File
@@ -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
===================================
+4 -2
View File
@@ -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
+33 -16
View File
@@ -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;
+6 -3
View File
@@ -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