diff options
author | Adam <Adam@anope.org> | 2013-03-13 09:44:43 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-03-13 09:45:15 -0500 |
commit | 1d16629a6da2f1d5b65557028e75abc7de51cad5 (patch) | |
tree | d356ef0186eee4bf54f849bca09f4b98071d6266 /modules/commands/cs_kick.cpp | |
parent | 72aa27ede5f265fe976f8e9935239aed9930ff3a (diff) |
Allow opers to override chanserv kick/ban, botserv say/act, and akick's peace setting
Diffstat (limited to 'modules/commands/cs_kick.cpp')
-rw-r--r-- | modules/commands/cs_kick.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/commands/cs_kick.cpp b/modules/commands/cs_kick.cpp index 062c8f04d..03beaf0a8 100644 --- a/modules/commands/cs_kick.cpp +++ b/modules/commands/cs_kick.cpp @@ -50,12 +50,12 @@ class CommandCSKick : public Command AccessGroup u_access = source.AccessFor(ci); - if (!u_access.HasPriv("KICK")) + if (!u_access.HasPriv("KICK") && !source.HasPriv("chanserv/kick")) source.Reply(ACCESS_DENIED); else if (u2) { AccessGroup u2_access = ci->AccessFor(u2); - if (u != u2 && ci->HasExt("PEACE") && u2_access >= u_access) + if (u != u2 && ci->HasExt("PEACE") && u2_access >= u_access && !source.HasPriv("chanserv/kick")) source.Reply(ACCESS_DENIED); else if (u2->IsProtected()) source.Reply(ACCESS_DENIED); @@ -63,8 +63,8 @@ class CommandCSKick : public Command source.Reply(NICK_X_NOT_ON_CHAN, u2->nick.c_str(), c->name.c_str()); else { - // XXX - Log(LOG_COMMAND, source, this, ci) << "for " << u2->nick; + bool override = !u_access.HasPriv("KICK") || (u != u2 && ci->HasExt("PEACE") && u2_access >= u_access); + Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "for " << u2->nick; if (ci->HasExt("SIGNKICK") || (ci->HasExt("SIGNKICK_LEVEL") && !u_access.HasPriv("SIGNKICK"))) c->Kick(ci->WhoSends(), u2, "%s (%s)", reason.c_str(), source.GetNick().c_str()); |