diff options
Diffstat (limited to 'modules/encryption/enc_none.cpp')
-rw-r--r-- | modules/encryption/enc_none.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/modules/encryption/enc_none.cpp b/modules/encryption/enc_none.cpp index 778ed6cba..9496939fd 100644 --- a/modules/encryption/enc_none.cpp +++ b/modules/encryption/enc_none.cpp @@ -41,33 +41,31 @@ class ENone : public Module return EVENT_ALLOW; } - EventReturn OnCheckAuthentication(Command *c, CommandSource *source, const std::vector<Anope::string> ¶ms, const Anope::string &account, const Anope::string &password) anope_override + void OnCheckAuthentication(User *, IdentifyRequest *req) anope_override { - const NickAlias *na = findnick(account); + const NickAlias *na = findnick(req->GetAccount()); if (na == NULL) - return EVENT_CONTINUE; + return; NickCore *nc = na->nc; size_t pos = nc->pass.find(':'); if (pos == Anope::string::npos) - return EVENT_CONTINUE; + return; Anope::string hash_method(nc->pass.begin(), nc->pass.begin() + pos); if (!hash_method.equals_cs("plain")) - return EVENT_CONTINUE; + return; Anope::string buf; - this->OnEncrypt(password, buf); + this->OnEncrypt(req->GetPassword(), buf); if (nc->pass.equals_cs(buf)) { /* if we are NOT the first module in the list, * we want to re-encrypt the pass with the new encryption */ if (ModuleManager::FindFirstOf(ENCRYPTION) != this) - enc_encrypt(password, nc->pass); - return EVENT_ALLOW; + enc_encrypt(req->GetPassword(), nc->pass); + req->Success(this); } - - return EVENT_CONTINUE; } }; |