From 7286c2b90c0844d978cb498f656b36386b688024 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 20 Apr 2014 15:19:47 -0400 Subject: Deprecate enc_old, enc_md5, and enc_sha1 --- modules/encryption/enc_md5.cpp | 3 ++- modules/encryption/enc_old.cpp | 2 ++ modules/encryption/enc_sha1.cpp | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'modules') 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("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("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("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 -- cgit