summaryrefslogtreecommitdiff
path: root/modules/commands/cs_set_founder.cpp
diff options
context:
space:
mode:
authorlethality <lethality@anope.org>2012-06-22 21:26:33 +0100
committerlethality <lethality@anope.org>2012-06-22 21:26:33 +0100
commitd8a99d619f7ae301ecf188dc460b1f5c7cb791ac (patch)
treeb327ce05b9b5cb598fbc829e48041d465bc2d579 /modules/commands/cs_set_founder.cpp
parentba53c7eb03add30acefbbc95bbd8b4b825b465b0 (diff)
parent2dec8e767a70def4b9b04a96ae4f75e4d1013038 (diff)
Merge branch '1.9' of ssh://anope.git.sf.net/gitroot/anope/anope into 1.9
Diffstat (limited to 'modules/commands/cs_set_founder.cpp')
-rw-r--r--modules/commands/cs_set_founder.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/commands/cs_set_founder.cpp b/modules/commands/cs_set_founder.cpp
index 5f2990196..037ec62ff 100644
--- a/modules/commands/cs_set_founder.cpp
+++ b/modules/commands/cs_set_founder.cpp
@@ -24,7 +24,6 @@ class CommandCSSetFounder : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
{
- User *u = source.u;
ChannelInfo *ci = cs_findchan(params[0]);
if (ci == NULL)
{
@@ -32,13 +31,13 @@ class CommandCSSetFounder : public Command
return;
}
- if (source.permission.empty() && !ci->AccessFor(u).HasPriv("SET"))
+ if (source.permission.empty() && !source.AccessFor(ci).HasPriv("SET"))
{
source.Reply(ACCESS_DENIED);
return;
}
- if (source.permission.empty() && (ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !ci->AccessFor(u).HasPriv("FOUNDER")))
+ if (source.permission.empty() && (ci->HasFlag(CI_SECUREFOUNDER) ? !source.IsFounder(ci) : !source.AccessFor(ci).HasPriv("FOUNDER")))
{
source.Reply(ACCESS_DENIED);
return;
@@ -52,13 +51,13 @@ class CommandCSSetFounder : public Command
}
NickCore *nc = na->nc;
- if (Config->CSMaxReg && nc->channelcount >= Config->CSMaxReg && !u->HasPriv("chanserv/no-register-limit"))
+ if (Config->CSMaxReg && nc->channelcount >= Config->CSMaxReg && !source.HasPriv("chanserv/no-register-limit"))
{
source.Reply(_("\002%s\002 has too many channels registered."), na->nick.c_str());
return;
}
- Log(!source.permission.empty() ? LOG_ADMIN : LOG_COMMAND, u, this, ci) << "to change the founder from " << (ci->GetFounder() ? ci->GetFounder()->display : "(none)") << " to " << nc->display;
+ Log(!source.permission.empty() ? LOG_ADMIN : LOG_COMMAND, source, this, ci) << "to change the founder from " << (ci->GetFounder() ? ci->GetFounder()->display : "(none)") << " to " << nc->display;
ci->SetFounder(nc);