diff options
author | Adam <Adam@anope.org> | 2012-06-18 05:04:30 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-06-18 05:04:30 -0400 |
commit | 2dec8e767a70def4b9b04a96ae4f75e4d1013038 (patch) | |
tree | 36f5b551ff359a578e17d5e7d2f486970d759a7b /modules/commands/os_chankill.cpp | |
parent | 873d4287de57f7f9caa23cb2c9265d1ad2804aba (diff) |
Allow userless command sources
Diffstat (limited to 'modules/commands/os_chankill.cpp')
-rw-r--r-- | modules/commands/os_chankill.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/commands/os_chankill.cpp b/modules/commands/os_chankill.cpp index bbfb5121b..456525a46 100644 --- a/modules/commands/os_chankill.cpp +++ b/modules/commands/os_chankill.cpp @@ -29,7 +29,6 @@ class CommandOSChanKill : public Command if (!akills) return; - User *u = source.u; Anope::string expiry, channel; time_t expires; unsigned last_param = 1; @@ -67,7 +66,7 @@ class CommandOSChanKill : public Command { Anope::string realreason; if (Config->AddAkiller) - realreason = "[" + u->nick + "] " + reason; + realreason = "[" + source.GetNick() + "] " + reason; else realreason = reason; @@ -80,12 +79,12 @@ class CommandOSChanKill : public Command if (uc->user->server == Me || uc->user->HasMode(UMODE_OPER)) continue; - XLine *x = new XLine("*@" + uc->user->host, u->nick, expires, realreason, XLineManager::GenerateUID()); + XLine *x = new XLine("*@" + uc->user->host, source.GetNick(), expires, realreason, XLineManager::GenerateUID()); akills->AddXLine(x); akills->OnMatch(uc->user, x); } - Log(LOG_ADMIN, u, this) << "on " << c->name << " (" << realreason << ")"; + Log(LOG_ADMIN, source, this) << "on " << c->name << " (" << realreason << ")"; } else source.Reply(CHAN_X_NOT_IN_USE, channel.c_str()); |