diff options
author | Adam <Adam@anope.org> | 2012-12-15 01:33:31 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-12-15 01:33:31 -0500 |
commit | dcd34d37287adb6aa03d32edd17fc8015b52feb8 (patch) | |
tree | 4eb963bc60c8db543973456e7fce35aaae5a4ad4 /modules/commands/os_dns.cpp | |
parent | cdec0a3f96bbfa6d5300b7a6d602fd170e7ccd56 (diff) |
Move DNS handling to a module
Diffstat (limited to 'modules/commands/os_dns.cpp')
-rw-r--r-- | modules/commands/os_dns.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/modules/commands/os_dns.cpp b/modules/commands/os_dns.cpp index 6e5689396..ec72f5a5d 100644 --- a/modules/commands/os_dns.cpp +++ b/modules/commands/os_dns.cpp @@ -6,6 +6,9 @@ */ #include "module.h" +#include "../extra/dns.h" + +static ServiceReference<DNS::Manager> dnsmanager("DNS::Manager", "dns/manager"); class DNSServer; static std::vector<DNSServer *> dns_servers; @@ -44,8 +47,8 @@ class DNSServer : public Serializable void Pool(bool p) { pooled = p; - if (DNS::Engine) - DNS::Engine->UpdateSerial(); + if (dnsmanager) + dnsmanager->UpdateSerial(); } @@ -220,8 +223,8 @@ class CommandOSDNS : public Command source.Reply(_("Added IP %s to %s."), params[2].c_str(), s->GetName().c_str()); Log(LOG_ADMIN, source, this) << "to add IP " << params[2] << " to " << s->GetName(); - if (s->Pooled()) - DNS::Engine->UpdateSerial(); + if (s->Pooled() && dnsmanager) + dnsmanager->UpdateSerial(); } void DelIP(CommandSource &source, const std::vector<Anope::string> ¶ms) @@ -247,8 +250,8 @@ class CommandOSDNS : public Command s->Pool(false); } - if (s->Pooled()) - DNS::Engine->UpdateSerial(); + if (s->Pooled() && dnsmanager) + dnsmanager->UpdateSerial(); return; } |