From 1d16629a6da2f1d5b65557028e75abc7de51cad5 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 13 Mar 2013 09:44:43 -0500 Subject: Allow opers to override chanserv kick/ban, botserv say/act, and akick's peace setting --- modules/commands/cs_ban.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/commands/cs_ban.cpp') 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)) { -- cgit