]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/modules/dns.h
Convert the SASL fallback event to use the new cross-module event system
[user/henk/code/inspircd.git] / include / modules / dns.h
index 65a1762b33c099f6b3408ba3140a0366d5f36842..400d2085d450d55b53f5772860b082e30e1d3283 100644 (file)
@@ -152,14 +152,14 @@ namespace DNS
                Module* const creator;
 
                Request(Manager* mgr, Module* mod, const std::string& addr, QueryType qt, bool usecache = true)
-                       : Timer((ServerInstance->Config->dns_timeout ? ServerInstance->Config->dns_timeout : 5), ServerInstance->Time())
+                       : Timer((ServerInstance->Config->dns_timeout ? ServerInstance->Config->dns_timeout : 5))
                        , Question(addr, qt)
                        , manager(mgr)
                        , use_cache(usecache)
                        , id(0)
                        , creator(mod)
                {
-                       ServerInstance->Timers->AddTimer(this);
+                       ServerInstance->Timers.AddTimer(this);
                }
 
                virtual ~Request()
@@ -185,9 +185,9 @@ namespace DNS
                        Query rr(*this);
                        rr.error = ERROR_TIMEDOUT;
                        this->OnError(&rr);
+                       delete this;
                        return false;
                }
        };
 
 } // namespace DNS
-