diff options
author | lethality <lethality@anope.org> | 2012-06-22 21:26:33 +0100 |
---|---|---|
committer | lethality <lethality@anope.org> | 2012-06-22 21:26:33 +0100 |
commit | d8a99d619f7ae301ecf188dc460b1f5c7cb791ac (patch) | |
tree | b327ce05b9b5cb598fbc829e48041d465bc2d579 /modules/commands/ns_identify.cpp | |
parent | ba53c7eb03add30acefbbc95bbd8b4b825b465b0 (diff) | |
parent | 2dec8e767a70def4b9b04a96ae4f75e4d1013038 (diff) |
Merge branch '1.9' of ssh://anope.git.sf.net/gitroot/anope/anope into 1.9
Diffstat (limited to 'modules/commands/ns_identify.cpp')
-rw-r--r-- | modules/commands/ns_identify.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/commands/ns_identify.cpp b/modules/commands/ns_identify.cpp index cd0b14ddb..9fbe46f6b 100644 --- a/modules/commands/ns_identify.cpp +++ b/modules/commands/ns_identify.cpp @@ -25,7 +25,10 @@ class CommandNSIdentify : public Command void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override { - User *u = source.u; + User *u = source.GetUser(); + + if (!u) + return; const Anope::string &nick = params.size() == 2 ? params[0] : u->nick; Anope::string pass = params[params.size() - 1]; @@ -46,16 +49,16 @@ class CommandNSIdentify : public Command source.Reply(NICK_X_NOT_REGISTERED, nick.c_str()); else if (MOD_RESULT != EVENT_ALLOW) { - Log(LOG_COMMAND, u, this) << "and failed to identify"; + Log(LOG_COMMAND, source, this) << "and failed to identify"; source.Reply(PASSWORD_INCORRECT); bad_password(u); } else { if (u->IsIdentified()) - Log(LOG_COMMAND, u, this) << "to log out of account " << u->Account()->display; + Log(LOG_COMMAND, source, this) << "to log out of account " << u->Account()->display; - Log(LOG_COMMAND, u, this) << "and identified for account " << na->nc->display; + Log(LOG_COMMAND, source, this) << "and identified for account " << na->nc->display; source.Reply(_("Password accepted - you are now recognized.")); u->Identify(na); } |