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/commands/os_dns.cpp | |
parent | 0b6476f06ff9ce06545c421143c7d7163c750aa5 (diff) |
New event system
Diffstat (limited to 'modules/commands/os_dns.cpp')
-rw-r--r-- | modules/commands/os_dns.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/modules/commands/os_dns.cpp b/modules/commands/os_dns.cpp index f58c29e98..d76ad451f 100644 --- a/modules/commands/os_dns.cpp +++ b/modules/commands/os_dns.cpp @@ -716,6 +716,11 @@ class CommandOSDNS : public Command }; class ModuleDNS : public Module + , public EventHook<Event::NewServer> + , public EventHook<Event::ServerQuit> + , public EventHook<Event::UserConnect> + , public EventHook<Event::PreUserLogoff> + , public EventHook<Event::DnsRequest> { Serialize::Type zone_type, dns_type; CommandOSDNS commandosdns; @@ -730,9 +735,16 @@ class ModuleDNS : public Module time_t last_warn; public: - ModuleDNS(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR), - zone_type("DNSZone", DNSZone::Unserialize), dns_type("DNSServer", DNSServer::Unserialize), commandosdns(this), - last_warn(0) + ModuleDNS(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR) + , EventHook<Event::NewServer>("OnNewServer") + , EventHook<Event::ServerQuit>("OnServerQuit") + , EventHook<Event::UserConnect>("OnUserConnect") + , EventHook<Event::PreUserLogoff>("OnPreUserLogoff") + , EventHook<Event::DnsRequest>("OnDnsRequest") + , zone_type("DNSZone", DNSZone::Unserialize) + , dns_type("DNSServer", DNSServer::Unserialize) + , commandosdns(this) + , last_warn(0) { |