summaryrefslogtreecommitdiff
path: root/modules/commands/cs_drop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands/cs_drop.cpp')
-rw-r--r--modules/commands/cs_drop.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/modules/commands/cs_drop.cpp b/modules/commands/cs_drop.cpp
index fb9da23b8..cf8c5040e 100644
--- a/modules/commands/cs_drop.cpp
+++ b/modules/commands/cs_drop.cpp
@@ -26,8 +26,6 @@ class CommandCSDrop : public Command
{
const Anope::string &chan = params[0];
- User *u = source.u;
-
if (readonly)
{
source.Reply(_("Sorry, channel de-registration is temporarily disabled.")); // XXX: READ_ONLY_MODE?
@@ -41,20 +39,20 @@ class CommandCSDrop : public Command
return;
}
- if (ci->HasFlag(CI_SUSPENDED) && !u->HasCommand("chanserv/drop"))
+ if (ci->HasFlag(CI_SUSPENDED) && !source.HasCommand("chanserv/drop"))
{
source.Reply(CHAN_X_SUSPENDED, chan.c_str());
return;
}
- if ((ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !ci->AccessFor(u).HasPriv("FOUNDER")) && !u->HasCommand("chanserv/drop"))
+ if ((ci->HasFlag(CI_SECUREFOUNDER) ? !source.IsFounder(ci) : !source.AccessFor(ci).HasPriv("FOUNDER")) && !source.HasCommand("chanserv/drop"))
{
source.Reply(ACCESS_DENIED);
return;
}
- bool override = (ci->HasFlag(CI_SECUREFOUNDER) ? !IsFounder(u, ci) : !ci->AccessFor(u).HasPriv("FOUNDER"));
- Log(override ? LOG_OVERRIDE : LOG_COMMAND, u, this, ci) << "(founder was: " << (ci->GetFounder() ? ci->GetFounder()->display : "none") << ")";
+ bool override = (ci->HasFlag(CI_SECUREFOUNDER) ? !source.IsFounder(ci) : !source.AccessFor(ci).HasPriv("FOUNDER"));
+ Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "(founder was: " << (ci->GetFounder() ? ci->GetFounder()->display : "none") << ")";
FOREACH_MOD(I_OnChanDrop, OnChanDrop(ci));
@@ -71,10 +69,9 @@ class CommandCSDrop : public Command
bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override
{
- User *u = source.u;
this->SendSyntax(source);
source.Reply(" ");
- if (u->IsServicesOper())
+ if (source.IsServicesOper())
source.Reply(_("Unregisters the named channel. Only \002Services Operators\002\n"
"can drop a channel for which they have not identified."));
else