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/os_chankill.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'modules/commands/os_chankill.cpp') 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()); -- cgit