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_akick.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'modules/commands/cs_akick.cpp') diff --git a/modules/commands/cs_akick.cpp b/modules/commands/cs_akick.cpp index dea6446ba..b388620fc 100644 --- a/modules/commands/cs_akick.cpp +++ b/modules/commands/cs_akick.cpp @@ -83,9 +83,13 @@ class CommandCSAKick : public Command } } + bool override = !source.AccessFor(ci).HasPriv("AKICK"); + /* Opers overriding get to bypass PEACE */ + if (override) + ; /* Check whether target nick has equal/higher access * or whether the mask matches a user with higher/equal access - Viper */ - if (ci->HasExt("PEACE") && nc) + else if (ci->HasExt("PEACE") && nc) { AccessGroup nc_access = ci->AccessFor(nc), u_access = source.AccessFor(ci); if (nc == ci->GetFounder() || nc_access >= u_access) @@ -152,7 +156,6 @@ class CommandCSAKick : public Command else akick = ci->AddAkick(source.GetNick(), mask, reason); - bool override = !source.AccessFor(ci).HasPriv("AKICK"); Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to add " << mask << (reason == "" ? "" : ": ") << reason; FOREACH_MOD(I_OnAkickAdd, OnAkickAdd(source, ci, akick)); -- cgit