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_ban.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_ban.cpp')
-rw-r--r-- | modules/commands/cs_ban.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/commands/cs_ban.cpp b/modules/commands/cs_ban.cpp index 2da17bb98..c39f7f392 100644 --- a/modules/commands/cs_ban.cpp +++ b/modules/commands/cs_ban.cpp @@ -90,13 +90,13 @@ class CommandCSBan : public Command if (!c) source.Reply(CHAN_X_NOT_IN_USE, chan.c_str()); - else if (!u_access.HasPriv("BAN")) + else if (!u_access.HasPriv("BAN") && !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); /* * Dont ban/kick the user on channels where he is excepted @@ -110,8 +110,8 @@ class CommandCSBan : public Command { Anope::string mask = ci->GetIdealBan(u2); - // XXX need a way to detect if someone is overriding - Log(LOG_COMMAND, source, this, ci) << "for " << mask; + bool override = !u_access.HasPriv("BAN") || (u != u2 && ci->HasExt("PEACE") && u2_access >= u_access); + Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "for " << mask; if (!c->HasMode("BAN", mask)) { |