From e7ac33fd622ae6e21bc9af684832b7de5cfa0c0c Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 14 Sep 2010 18:24:14 -0400 Subject: Cleanup DNS requests when modules are unloaded, fixes unloading m_dnsbl during the middle of queries --- modules/extra/m_dnsbl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/extra') diff --git a/modules/extra/m_dnsbl.cpp b/modules/extra/m_dnsbl.cpp index 42e505c31..ce82b68a4 100644 --- a/modules/extra/m_dnsbl.cpp +++ b/modules/extra/m_dnsbl.cpp @@ -23,7 +23,7 @@ class DNSBLResolver : public DNSRequest bool add_to_akill; public: - DNSBLResolver(User *u, const Blacklist &b, const Anope::string &host, bool add_akill) : DNSRequest(host, DNS_QUERY_A, true), user(u), blacklist(b), add_to_akill(add_akill) { } + DNSBLResolver(Module *c, User *u, const Blacklist &b, const Anope::string &host, bool add_akill) : DNSRequest(host, DNS_QUERY_A, true, c), user(u), blacklist(b), add_to_akill(add_akill) { } void OnLookupComplete(const DNSRecord *) { @@ -120,7 +120,7 @@ class ModuleDNSBL : public Module try { Anope::string dnsbl_host = user_ip.addr() + "." + b.name; - new DNSBLResolver(u, b, dnsbl_host, this->add_to_akill); + new DNSBLResolver(this, u, b, dnsbl_host, this->add_to_akill); } catch (const SocketException &ex) { -- cgit