diff options
author | Adam <Adam@anope.org> | 2012-12-02 04:31:50 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-12-02 04:31:50 -0500 |
commit | 7a865b6b2828b417e4d91441e5437a7c826cdc80 (patch) | |
tree | c97a5e61aab4431d3d073fa73c100730f6e0125a /modules/commands/ns_recover.cpp | |
parent | faaaae365a10f3a5aaa93a1354d00d5ed04e77b6 (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.cpp | 15 |
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()); } }; |