1
0
mirror of https://github.com/anope/anope.git synced 2026-07-05 07:33:13 +02:00

Added missing override capabilities and log calls to some ChanServ commands

This commit is contained in:
Robby-
2013-09-13 04:59:19 +02:00
committed by Adam
parent 1818b19eba
commit 7545763cd4
6 changed files with 57 additions and 25 deletions
+10 -9
View File
@@ -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