diff options
| author | Adam <Adam@anope.org> | 2014-04-20 15:19:47 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2014-04-20 15:19:47 -0400 |
| commit | 7286c2b90c0844d978cb498f656b36386b688024 (patch) | |
| tree | bd3eacf22314dd8a2e552ccb20837b679dde15e8 /modules | |
| parent | 26ac315192e0d8a04d50e910697ab794eedf0cc1 (diff) | |
Deprecate enc_old, enc_md5, and enc_sha1
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 |
