From 2dec8e767a70def4b9b04a96ae4f75e4d1013038 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 18 Jun 2012 05:04:30 -0400 Subject: Allow userless command sources --- modules/commands/ns_suspend.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'modules/commands/ns_suspend.cpp') 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 ¶ms) 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 ¶ms) 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)); -- cgit