diff options
author | Adam <Adam@anope.org> | 2014-04-20 14:35:14 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2014-04-20 14:35:14 -0400 |
commit | 26ac315192e0d8a04d50e910697ab794eedf0cc1 (patch) | |
tree | b9916f14fe35ce5c4de95c4194ca4ea0cb30812f /modules/encryption/enc_bcrypt.cpp | |
parent | 0b6476f06ff9ce06545c421143c7d7163c750aa5 (diff) |
New event system
Diffstat (limited to 'modules/encryption/enc_bcrypt.cpp')
-rw-r--r-- | modules/encryption/enc_bcrypt.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/encryption/enc_bcrypt.cpp b/modules/encryption/enc_bcrypt.cpp index 8ed5695ac..020bafe6e 100644 --- a/modules/encryption/enc_bcrypt.cpp +++ b/modules/encryption/enc_bcrypt.cpp @@ -841,6 +841,8 @@ char *_crypt_gensalt_blowfish_rn(const char *prefix, unsigned long count, #include "modules/encryption.h" class EBCRYPT : public Module + , public EventHook<Event::Encrypt> + , public EventHook<Event::CheckAuthentication> { unsigned int rounds; @@ -873,8 +875,10 @@ class EBCRYPT : public Module } public: - EBCRYPT(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION | VENDOR | EXTRA), - rounds(10) + EBCRYPT(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, ENCRYPTION | VENDOR | EXTRA) + , EventHook<Event::Encrypt>("OnEncrypt") + , EventHook<Event::CheckAuthentication>("OnCheckAuthentication") + , rounds(10) { // Test a pre-calculated hash bool test = Compare("Test!", "$2a$10$x9AQFAQScY0v9KF2suqkEOepsHFrG.CXHbIXI.1F28SfSUb56A/7K"); |