summaryrefslogtreecommitdiff
path: root/modules/encryption/enc_none.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/encryption/enc_none.cpp')
-rw-r--r--modules/encryption/enc_none.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/modules/encryption/enc_none.cpp b/modules/encryption/enc_none.cpp
index b1e2c738a..970530c9b 100644
--- a/modules/encryption/enc_none.cpp
+++ b/modules/encryption/enc_none.cpp
@@ -14,10 +14,11 @@ class ENone : public Module
public:
ENone(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION | VENDOR)
{
-
+ if (ModuleManager::FindFirstOf(ENCRYPTION) == this)
+ throw ModuleException("enc_none is deprecated and can not be used as a primary encryption method");
}
- EventReturn OnEncrypt(const Anope::string &src, Anope::string &dest) anope_override
+ EventReturn OnEncrypt(const Anope::string &src, Anope::string &dest) override
{
Anope::string buf = "plain:";
Anope::string cpass;
@@ -28,17 +29,7 @@ class ENone : public Module
return EVENT_ALLOW;
}
- EventReturn OnDecrypt(const Anope::string &hashm, const Anope::string &src, Anope::string &dest) anope_override
- {
- if (!hashm.equals_cs("plain"))
- return EVENT_CONTINUE;
- size_t pos = src.find(':');
- Anope::string buf = src.substr(pos + 1);
- Anope::B64Decode(buf, dest);
- return EVENT_ALLOW;
- }
-
- void OnCheckAuthentication(User *, IdentifyRequest *req) anope_override
+ void OnCheckAuthentication(User *, IdentifyRequest *req) override
{
const NickAlias *na = NickAlias::Find(req->GetAccount());
if (na == NULL)