1
0
mirror of https://github.com/anope/anope.git synced 2026-07-05 07:33:13 +02:00

Allow userless command sources

This commit is contained in:
Adam
2012-06-18 05:04:30 -04:00
parent 873d4287de
commit 2dec8e767a
153 changed files with 1029 additions and 1060 deletions
+2 -3
View File
@@ -24,7 +24,6 @@ class CommandOSKill : 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 reason = params.size() > 1 ? params[1] : "";
@@ -38,8 +37,8 @@ class CommandOSKill : public Command
if (reason.empty())
reason = "No reason specified";
if (Config->AddAkiller)
reason = "(" + u->nick + ") " + reason;
Log(LOG_ADMIN, u, this) << "on " << u2->nick << " for " << reason;
reason = "(" + source.GetNick() + ") " + reason;
Log(LOG_ADMIN, source, this) << "on " << u2->nick << " for " << reason;
u2->Kill(Config->OperServ, reason);
}
}