summaryrefslogtreecommitdiff
path: root/modules/commands/ns_recover.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-12-02 04:31:50 -0500
committerAdam <Adam@anope.org>2012-12-02 04:31:50 -0500
commit7a865b6b2828b417e4d91441e5437a7c826cdc80 (patch)
treec97a5e61aab4431d3d073fa73c100730f6e0125a /modules/commands/ns_recover.cpp
parentfaaaae365a10f3a5aaa93a1354d00d5ed04e77b6 (diff)
Only bad-password users when the account theyre trying to identify for actually exists
Diffstat (limited to 'modules/commands/ns_recover.cpp')
-rw-r--r--modules/commands/ns_recover.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/modules/commands/ns_recover.cpp b/modules/commands/ns_recover.cpp
index 419857eee..ed258c4e4 100644
--- a/modules/commands/ns_recover.cpp
+++ b/modules/commands/ns_recover.cpp
@@ -106,13 +106,18 @@ class NSRecoverRequest : public IdentifyRequest
void OnFail() anope_override
{
- source.Reply(ACCESS_DENIED);
- if (!GetPassword().empty())
+ if (NickAlias::Find(GetAccount()) != NULL)
{
- Log(LOG_COMMAND, source, cmd) << "with an invalid password for " << GetAccount();
- if (source.GetUser())
- source.GetUser()->BadPassword();
+ source.Reply(ACCESS_DENIED);
+ if (!GetPassword().empty())
+ {
+ Log(LOG_COMMAND, source, cmd) << "with an invalid password for " << GetAccount();
+ if (source.GetUser())
+ source.GetUser()->BadPassword();
+ }
}
+ else
+ source.Reply(NICK_X_NOT_REGISTERED, GetAccount().c_str());
}
};