summaryrefslogtreecommitdiff
path: root/modules/commands/os_noop.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/os_noop.cpp
parent873d4287de57f7f9caa23cb2c9265d1ad2804aba (diff)
Allow userless command sources
Diffstat (limited to 'modules/commands/os_noop.cpp')
-rw-r--r--modules/commands/os_noop.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/commands/os_noop.cpp b/modules/commands/os_noop.cpp
index 454299c89..21ec0dd91 100644
--- a/modules/commands/os_noop.cpp
+++ b/modules/commands/os_noop.cpp
@@ -25,7 +25,6 @@ class CommandOSNOOP : public Command
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
{
- User *u = source.u;
const Anope::string &cmd = params[0];
const Anope::string &server = params[1];
@@ -37,10 +36,10 @@ class CommandOSNOOP : public Command
/* Remove the O:lines */
ircdproto->SendSVSNOOP(s, true);
- Log(LOG_ADMIN, u, this) << "SET on " << s->GetName();
+ Log(LOG_ADMIN, source, this) << "SET on " << s->GetName();
source.Reply(_("All O:lines of \002%s\002 have been removed."), s->GetName().c_str());
- Anope::string reason = "NOOP command used by " + u->nick;
+ Anope::string reason = "NOOP command used by " + source.GetNick();
/* Kill all the IRCops of the server */
for (Anope::insensitive_map<User *>::iterator it = UserListByNick.begin(); it != UserListByNick.end();)
{
@@ -53,7 +52,7 @@ class CommandOSNOOP : public Command
}
else if (cmd.equals_ci("REVOKE"))
{
- Log(LOG_ADMIN, u, this) << "REVOKE on " << s->GetName();
+ Log(LOG_ADMIN, source, this) << "REVOKE on " << s->GetName();
ircdproto->SendSVSNOOP(s, false);
source.Reply(_("All O:lines of \002%s\002 have been reset."), s->GetName().c_str());
}