diff options
Diffstat (limited to 'src/modules/m_dnsbl.cpp')
-rw-r--r-- | src/modules/m_dnsbl.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index 91bfa5131..d6581a7d1 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -46,8 +46,8 @@ class DNSBLResolver : public Resolver DNSBLConfEntry *ConfEntry; public: - DNSBLResolver(Module *me, InspIRCd *ServerInstance, const std::string &hostname, userrec* u, int userfd, DNSBLConfEntry *conf) - : Resolver(ServerInstance, hostname, DNS_QUERY_A, me) + DNSBLResolver(Module *me, InspIRCd *ServerInstance, const std::string &hostname, userrec* u, int userfd, DNSBLConfEntry *conf, bool &cached) + : Resolver(ServerInstance, hostname, DNS_QUERY_A, cached, me) { theirfd = userfd; them = u; @@ -307,8 +307,12 @@ class ModuleDNSBL : public Module ServerInstance->Log(DEBUG, "m_dnsbl: sending %s for resolution", hostname.c_str()); /* now we'd need to fire off lookups for `hostname'. */ - DNSBLResolver *r = new DNSBLResolver(this, ServerInstance, hostname, user, user->GetFd(), *i); - ServerInstance->AddResolver(r); + bool cached; + DNSBLResolver *r = new DNSBLResolver(this, ServerInstance, hostname, user, user->GetFd(), *i, cached); + if (!cached) + ServerInstance->AddResolver(r); + else + delete r; } } |