summaryrefslogtreecommitdiff
path: root/modules/database/db_old.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-04-20 14:35:14 -0400
committerAdam <Adam@anope.org>2014-04-20 14:35:14 -0400
commit26ac315192e0d8a04d50e910697ab794eedf0cc1 (patch)
treeb9916f14fe35ce5c4de95c4194ca4ea0cb30812f /modules/database/db_old.cpp
parent0b6476f06ff9ce06545c421143c7d7163c750aa5 (diff)
New event system
Diffstat (limited to 'modules/database/db_old.cpp')
-rw-r--r--modules/database/db_old.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/modules/database/db_old.cpp b/modules/database/db_old.cpp
index 82f26e064..f80d55d5a 100644
--- a/modules/database/db_old.cpp
+++ b/modules/database/db_old.cpp
@@ -1294,16 +1294,21 @@ static void LoadNews()
}
class DBOld : public Module
+ , public EventHook<Event::LoadDatabase>
+ , public EventHook<Event::UplinkSync>
{
PrimitiveExtensibleItem<uint32_t> mlock_on, mlock_off, mlock_limit;
PrimitiveExtensibleItem<Anope::string> mlock_key;
public:
- DBOld(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, DATABASE | VENDOR),
- mlock_on(this, "mlock_on"), mlock_off(this, "mlock_off"), mlock_limit(this, "mlock_limit"), mlock_key(this, "mlock_key")
+ DBOld(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, DATABASE | VENDOR)
+ , EventHook<Event::LoadDatabase>("OnLoadDatabase")
+ , EventHook<Event::UplinkSync>("OnUplinkSync")
+ , mlock_on(this, "mlock_on")
+ , mlock_off(this, "mlock_off")
+ , mlock_limit(this, "mlock_limit")
+ , mlock_key(this, "mlock_key")
{
-
-
hashm = Config->GetModule(this)->Get<const Anope::string>("hash");
if (hashm != "md5" && hashm != "oldmd5" && hashm != "sha1" && hashm != "plain" && hashm != "sha256")