diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/encryption/enc_md5.cpp | 3 | ||||
| -rw-r--r-- | modules/encryption/enc_old.cpp | 2 | ||||
| -rw-r--r-- | modules/encryption/enc_sha1.cpp | 3 |
3 files changed, 6 insertions, 2 deletions
diff --git a/modules/encryption/enc_md5.cpp b/modules/encryption/enc_md5.cpp index 838c5712f..108fb2504 100644 --- a/modules/encryption/enc_md5.cpp +++ b/modules/encryption/enc_md5.cpp @@ -349,7 +349,8 @@ class EMD5 : public Module , EventHook<Event::CheckAuthentication>("OnCheckAuthentication") , md5provider(this) { - + if (ModuleManager::FindFirstOf(ENCRYPTION) == this) + throw ModuleException("enc_md5 is deprecated and can not be used as a primary encryption method"); } EventReturn OnEncrypt(const Anope::string &src, Anope::string &dest) override diff --git a/modules/encryption/enc_old.cpp b/modules/encryption/enc_old.cpp index b885eb777..671921c72 100644 --- a/modules/encryption/enc_old.cpp +++ b/modules/encryption/enc_old.cpp @@ -48,6 +48,8 @@ class EOld : public Module , EventHook<Event::CheckAuthentication>("OnCheckAuthentication") , oldmd5provider(this) { + if (ModuleManager::FindFirstOf(ENCRYPTION) == this) + throw ModuleException("enc_old is deprecated and can not be used as a primary encryption method"); ModuleManager::LoadModule("enc_md5", User::Find(creator)); if (!md5) diff --git a/modules/encryption/enc_sha1.cpp b/modules/encryption/enc_sha1.cpp index f65b5d5ea..df7de4f72 100644 --- a/modules/encryption/enc_sha1.cpp +++ b/modules/encryption/enc_sha1.cpp @@ -204,7 +204,8 @@ class ESHA1 : public Module , EventHook<Event::CheckAuthentication>("OnCheckAuthentication") , sha1provider(this) { - + if (ModuleManager::FindFirstOf(ENCRYPTION) == this) + throw ModuleException("enc_sha1 is deprecated and can not be used as a primary encryption method"); } EventReturn OnEncrypt(const Anope::string &src, Anope::string &dest) override |
