summaryrefslogtreecommitdiff
path: root/modules/commands/cs_clone.cpp
diff options
context:
space:
mode:
authorRobby- <robby@chat.be>2013-09-13 04:59:19 +0200
committerAdam <Adam@anope.org>2013-09-27 17:21:20 -0400
commit7545763cd41675ddd37e5b066969da305f1fb68a (patch)
tree878d9054238cb59aed9a152e6321864bac7219bd /modules/commands/cs_clone.cpp
parent1818b19ebaa6584cb97455e1a91e51ecfebd4dfc (diff)
Added missing override capabilities and log calls to some ChanServ commands
Diffstat (limited to 'modules/commands/cs_clone.cpp')
-rw-r--r--modules/commands/cs_clone.cpp19
1 files changed, 10 insertions, 9 deletions
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