summaryrefslogtreecommitdiff
path: root/modules/encryption
diff options
context:
space:
mode:
Diffstat (limited to 'modules/encryption')
-rw-r--r--modules/encryption/bcrypt.cpp2
-rw-r--r--modules/encryption/md5.cpp2
-rw-r--r--modules/encryption/none.cpp3
-rw-r--r--modules/encryption/old.cpp13
-rw-r--r--modules/encryption/sha1.cpp2
-rw-r--r--modules/encryption/sha256.cpp2
6 files changed, 21 insertions, 3 deletions
diff --git a/modules/encryption/bcrypt.cpp b/modules/encryption/bcrypt.cpp
index 74d729491..ed003f883 100644
--- a/modules/encryption/bcrypt.cpp
+++ b/modules/encryption/bcrypt.cpp
@@ -877,6 +877,8 @@ class EBCRYPT : public Module
public:
EBCRYPT(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION | VENDOR)
+ , EventHook<Event::Encrypt>(this)
+ , EventHook<Event::CheckAuthentication>(this)
, rounds(10)
{
// Test a pre-calculated hash
diff --git a/modules/encryption/md5.cpp b/modules/encryption/md5.cpp
index a92f5a4f9..0bf3942ec 100644
--- a/modules/encryption/md5.cpp
+++ b/modules/encryption/md5.cpp
@@ -345,6 +345,8 @@ class EMD5 : public Module
public:
EMD5(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION | VENDOR)
+ , EventHook<Event::Encrypt>(this)
+ , EventHook<Event::CheckAuthentication>(this)
, md5provider(this)
{
if (ModuleManager::FindFirstOf(ENCRYPTION) == this)
diff --git a/modules/encryption/none.cpp b/modules/encryption/none.cpp
index 8164534eb..c51bcb9ae 100644
--- a/modules/encryption/none.cpp
+++ b/modules/encryption/none.cpp
@@ -16,6 +16,9 @@ class ENone : public Module
{
public:
ENone(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION | VENDOR)
+ , EventHook<Event::Encrypt>(this)
+ , EventHook<Event::Decrypt>(this)
+ , EventHook<Event::CheckAuthentication>(this)
{
}
diff --git a/modules/encryption/old.cpp b/modules/encryption/old.cpp
index 4e3e70f7d..fc4598887 100644
--- a/modules/encryption/old.cpp
+++ b/modules/encryption/old.cpp
@@ -12,12 +12,15 @@
#include "module.h"
#include "modules/encryption.h"
-static ServiceReference<Encryption::Provider> md5("Encryption::Provider", "md5");
-
class OldMD5Provider : public Encryption::Provider
{
+ ServiceReference<Encryption::Provider> md5;
+
public:
- OldMD5Provider(Module *creator) : Encryption::Provider(creator, "oldmd5") { }
+ OldMD5Provider(Module *creator) : Encryption::Provider(creator, "oldmd5")
+ , md5("md5")
+ {
+ }
Encryption::Context *CreateContext(Encryption::IV *iv) override
{
@@ -39,12 +42,16 @@ class EOld : public Module
, public EventHook<Event::CheckAuthentication>
{
OldMD5Provider oldmd5provider;
+ ServiceReference<Encryption::Provider> md5;
inline static char XTOI(char c) { return c > 9 ? c - 'A' + 10 : c - '0'; }
public:
EOld(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION | VENDOR)
+ , EventHook<Event::Encrypt>(this)
+ , EventHook<Event::CheckAuthentication>(this)
, oldmd5provider(this)
+ , md5("md5")
{
if (ModuleManager::FindFirstOf(ENCRYPTION) == this)
throw ModuleException("enc_old is deprecated and can not be used as a primary encryption method");
diff --git a/modules/encryption/sha1.cpp b/modules/encryption/sha1.cpp
index a99bc834e..85fc9a5f2 100644
--- a/modules/encryption/sha1.cpp
+++ b/modules/encryption/sha1.cpp
@@ -200,6 +200,8 @@ class ESHA1 : public Module
public:
ESHA1(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION | VENDOR)
+ , EventHook<Event::Encrypt>(this)
+ , EventHook<Event::CheckAuthentication>(this)
, sha1provider(this)
{
if (ModuleManager::FindFirstOf(ENCRYPTION) == this)
diff --git a/modules/encryption/sha256.cpp b/modules/encryption/sha256.cpp
index a138b3756..226cf0feb 100644
--- a/modules/encryption/sha256.cpp
+++ b/modules/encryption/sha256.cpp
@@ -275,6 +275,8 @@ class ESHA256 : public Module
public:
ESHA256(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION | VENDOR)
+ , EventHook<Event::Encrypt>(this)
+ , EventHook<Event::CheckAuthentication>(this)
, sha256provider(this)
{