- Minor doc updates regarding snomasks reported by Stoebi ().

- Fixed two OperOverride kick bugs:
  - If ircop is +h and victim is +h it would deny it, reported by Special ()
  - Ircops (all except netadmin) had trouble kicking +q people, if the ircop isn't
    op'ed he can kick them, but if he has +o he can't. Reported by Michi ().
  If you use mixed unreal versions you can get desynch problems if you use those
  fixed things (like kick a +h if you are +h) because older servers will still block
  the kick. You will receive a 'You cannot kick channel' message from every older
  server so you'll at least be notified ;p.
This commit is contained in:
Bram Matthys 2003-10-31 19:08:47 +00:00
parent 5a32b8dc7e
commit 79bc20a994
3 changed files with 41 additions and 19 deletions

13
Changes
View file

@ -2514,6 +2514,7 @@ seen. gmtime warning still there
Suggested by brentos. Note that we won't support /quit, or any other command, just this.
- Module coders: Moved call to HOOKTYPE_LOCAL_JOIN down to where the JOIN, NAMES, etc
are already sent... this seems to make more sense since we have a prejoin hook now.
- Moved it a bit too far (outside the loop), should be fixed now.
- Fixed bug where color quits were stripped when they shouldn't be >:).
- Added 'action' field to ban version { } which can be: kill: kills the user (default),
tempshun: shun the specific connection only, kline/zline/gline/gzline/shun: place
@ -2525,6 +2526,12 @@ seen. gmtime warning still there
- Added hook HOOKTYPE_CHANNEL_CREATE (cptr(user creating channel), chptr
(channel that has gotten created)
- Added hook HOOKTYPE_CHANNEL_DESTROY (chptr (channel getting destroyed))
- Fixed bug where unregistered quits would in extreme cases crash the server
- Moved it a bit too far (outside the loop), should be fixed now.
- Minor doc updates regarding snomasks reported by Stoebi (#0001324).
- Fixed two OperOverride kick bugs:
- If ircop is +h and victim is +h it would deny it, reported by Special (#0001308)
- Ircops (all except netadmin) had trouble kicking +q people, if the ircop isn't
op'ed he can kick them, but if he has +o he can't. Reported by Michi (#0001012).
If you use mixed unreal versions you can get desynch problems if you use those
fixed things (like kick a +h if you are +h) because older servers will still block
the kick. You will receive a 'You cannot kick channel' message from every older
server so you'll at least be notified ;p.

View file

@ -223,13 +223,15 @@ Windows:<br>
c - local connects<br>
F - far connects (except from U-lined servers)<br>
f - flood notices<br>
k - kill notices<br>
k - kill notices [*]<br>
e - 'eyes' notices<br>
j - 'junk' notices<br>
v - vhost notices<br>
G - gline/shun notices<br>
n - nick change notices<br>
q - deny nick (Q:line) rejection notices<br>
s - receives server notices [*]<br>
[*: this snomask is also allowed to non-ircops]<br>
</p>
<p>You can control which snomasks you automatically get (set::snomask-on-connect) and which you get
on oper (set::snomask-on-oper, set::oper::snomask)</p></div>
@ -2190,10 +2192,6 @@ set {
<td><div align="center">d</div></td>
<td>Makes it so you can not receive channel PRIVMSGs</td>
</tr>
<tr>
<td><div align="center">k</div></td>
<td>Can see all the /kill commands executed</td>
</tr>
<tr>
<td><div align="center">N</div></td>
<td>Network Administrator (Set in Oper Block)</td>

View file

@ -3992,8 +3992,15 @@ CMD_FUNC(m_kick)
goto attack;
if (IsServer(sptr))
goto attack;
/* Note for coders regarding oper override:
* always let a remote kick (=from a user on another server) trough or
* else we will get desynched. In short this means all the denying should
* always contain a && MyClient(sptr) [or sptr!=cptr] and at the end
* a remote kick should always be allowed (pass trough). -- Syzop
*/
if ((chptr->mode.mode & MODE_NOKICKS)
&& !IsULine(sptr))
&& MyClient(sptr))
{
sendto_one(sptr,
":%s %s %s :*** You cannot kick people on %s",
@ -4002,11 +4009,14 @@ CMD_FUNC(m_kick)
continue;
}
/* we are neither +o nor +h, OR..
* we are +h but victim is +o, OR...
* we are +h and victim is +h
*/
if (IsOper(sptr))
if ((!is_chan_op(sptr, chptr)
&& !is_halfop(sptr, chptr))
|| (is_halfop(sptr, chptr)
&& is_chan_op(who, chptr)))
if ((!is_chan_op(sptr, chptr) && !is_halfop(sptr, chptr)) ||
(is_halfop(sptr, chptr) && is_chan_op(who, chptr)) ||
(is_halfop(sptr, chptr) && is_halfop(who, chptr)))
{
sendto_snomask(SNO_EYES,
"*** OperOverride -- %s (%s@%s) KICK %s %s (%s)",
@ -4014,10 +4024,12 @@ CMD_FUNC(m_kick)
chptr->chname, who->name, comment);
goto attack;
} /* is_chan_op */
/* victim is +a or +q, we are not +q */
if ((is_chanprot(who, chptr)
|| is_chanowner(who, chptr)
|| IsServices(who)) && !is_chanowner(sptr, chptr)) {
if (IsNetAdmin(sptr))
if (IsOper(sptr)) /* (and f*ck local ops) */
{ /* IRCop kicking owner/prot */
sendto_snomask(SNO_EYES,
"*** OperOverride -- %s (%s@%s) KICK %s %s (%s)",
@ -4025,8 +4037,7 @@ CMD_FUNC(m_kick)
chptr->chname, who->name, comment);
goto attack;
}
else if (!IsULine(sptr)
&& who != sptr)
else if (!IsULine(sptr) && (who != sptr) && MyClient(sptr))
{
sendto_one(sptr,
":%s %s %s :*** You cannot kick %s from %s because %s is channel admin",
@ -4036,19 +4047,23 @@ CMD_FUNC(m_kick)
continue;
} /* chanprot/chanowner */
}
/* victim is +o, we are +h [operoverride is already taken care of 2 blocks above] */
if (is_chan_op(who, chptr)
&& is_halfop(sptr, chptr)
&& !is_chan_op(sptr, chptr)
&& !IsULine(sptr))
&& !IsULine(sptr) && MyClient(sptr))
{
sendto_one(sptr,
":%s %s %s :*** You cannot kick channel operators on %s if you only are halfop",
me.name, IsWebTV(sptr) ? "PRIVMSG" : "NOTICE", sptr->name, chptr->chname);
goto deny;
}
/* victim is +h, we are +h [operoverride is already taken care of 3 blocks above] */
if (is_halfop(who, chptr)
&& is_halfop(sptr,chptr)
&& !is_chan_op(sptr, chptr))
&& !is_chan_op(sptr, chptr) && MyClient(sptr))
{
sendto_one(sptr,
":%s %s %s :*** You cannot kick channel halfops on %s if you only are halfop",
@ -4056,7 +4071,8 @@ CMD_FUNC(m_kick)
goto deny;
} /* halfop */
if (IsKix(who) && !IsULine(sptr))
/* applies to everyone (well except remote/ulines :p) */
if (IsKix(who) && !IsULine(sptr) && MyClient(sptr))
{
if (!IsNetAdmin(sptr))
{
@ -4073,6 +4089,7 @@ CMD_FUNC(m_kick)
}
}
/* allowed (either coz access granted or a remote kick), so attack! */
goto attack;
deny: