summaryrefslogtreecommitdiff
path: root/modules/commands/ns_suspend.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-06-18 05:04:30 -0400
committerAdam <Adam@anope.org>2012-06-18 05:04:30 -0400
commit2dec8e767a70def4b9b04a96ae4f75e4d1013038 (patch)
tree36f5b551ff359a578e17d5e7d2f486970d759a7b /modules/commands/ns_suspend.cpp
parent873d4287de57f7f9caa23cb2c9265d1ad2804aba (diff)
Allow userless command sources
Diffstat (limited to 'modules/commands/ns_suspend.cpp')
-rw-r--r--modules/commands/ns_suspend.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/commands/ns_suspend.cpp b/modules/commands/ns_suspend.cpp
index 4fcbe6c38..dd3da66f6 100644
--- a/modules/commands/ns_suspend.cpp
+++ b/modules/commands/ns_suspend.cpp
@@ -70,7 +70,6 @@ class CommandNSSuspend : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
{
- User *u = source.u;
const Anope::string &nick = params[0];
Anope::string expiry = params[1];
@@ -139,7 +138,7 @@ class CommandNSSuspend : public Command
nc->Extend("ns_suspend_expire", ns);
}
- Log(LOG_ADMIN, u, this) << "for " << nick << " (" << (!reason.empty() ? reason : "No reason") << "), expires in " << (expiry_secs ? do_strftime(Anope::CurTime + expiry_secs) : "never");
+ Log(LOG_ADMIN, source, this) << "for " << nick << " (" << (!reason.empty() ? reason : "No reason") << "), expires in " << (expiry_secs ? do_strftime(Anope::CurTime + expiry_secs) : "never");
source.Reply(_("Nick %s is now suspended."), nick.c_str());
FOREACH_MOD(I_OnNickSuspended, OnNickSuspend(na));
@@ -170,7 +169,6 @@ class CommandNSUnSuspend : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
{
- User *u = source.u;
const Anope::string &nick = params[0];
if (readonly)
@@ -195,7 +193,7 @@ class CommandNSUnSuspend : public Command
na->nc->UnsetFlag(NI_SUSPENDED);
na->nc->Shrink("ns_suspend_expire");
- Log(LOG_ADMIN, u, this) << "for " << na->nick;
+ Log(LOG_ADMIN, source, this) << "for " << na->nick;
source.Reply(_("Nick %s is now released."), nick.c_str());
FOREACH_MOD(I_OnNickUnsuspended, OnNickUnsuspended(na));