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

ns_identify: When logging failures, also show the account name, and that it exists or not.

This commit is contained in:
Robby-
2013-11-04 02:59:16 +01:00
parent 6e8d2bf09d
commit b901dfee84
+3 -2
View File
@@ -44,8 +44,9 @@ class NSIdentifyRequest : public IdentifyRequest
{
if (source.GetUser())
{
Log(LOG_COMMAND, source, cmd) << "and failed to identify";
if (NickAlias::Find(GetAccount()) != NULL)
bool accountexists = NickAlias::Find(GetAccount()) != NULL;
Log(LOG_COMMAND, source, cmd) << "and failed to identify to" << (accountexists ? " " : " nonexistent ") << "account " << GetAccount();
if (accountexists)
{
source.Reply(PASSWORD_INCORRECT);
source.GetUser()->BadPassword();