From 7545763cd41675ddd37e5b066969da305f1fb68a Mon Sep 17 00:00:00 2001 From: Robby- Date: Fri, 13 Sep 2013 04:59:19 +0200 Subject: Added missing override capabilities and log calls to some ChanServ commands --- modules/commands/cs_clone.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'modules/commands/cs_clone.cpp') diff --git a/modules/commands/cs_clone.cpp b/modules/commands/cs_clone.cpp index c0d33c742..40ef67b53 100644 --- a/modules/commands/cs_clone.cpp +++ b/modules/commands/cs_clone.cpp @@ -35,18 +35,14 @@ public: User *u = source.GetUser(); ChannelInfo *ci = ChannelInfo::Find(params[0]); + bool override = false; + if (ci == NULL) { source.Reply(CHAN_X_NOT_REGISTERED, params[0].c_str()); return; } - if (!source.AccessFor(ci).HasPriv("SET")) - { - source.Reply(ACCESS_DENIED); - return; - } - ChannelInfo *target_ci = ChannelInfo::Find(target); if (!target_ci) { @@ -55,8 +51,13 @@ public: } if (!source.IsFounder(ci) || !source.IsFounder(target_ci)) { - source.Reply(ACCESS_DENIED); - return; + if (!source.HasPriv("chanserv/administration")) + { + source.Reply(ACCESS_DENIED); + return; + } + else + override = true; } if (what.equals_ci("ALL")) @@ -151,7 +152,7 @@ public: return; } - Log(LOG_COMMAND, source, this, ci) << "to clone " << (what.empty() ? "everything from it" : what) << " to " << target_ci->name; + Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to clone " << (what.empty() ? "everything from it" : what) << " to " << target_ci->name; } bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override -- cgit