From dac672cf303ce44dc5f877a5f9f7e5aee64b95e1 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 7 Jan 2007 21:16:03 +0000 Subject: DNS Stuff - this wont work right yet, it will soon (tm) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6250 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_pgsql.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/modules/extra') diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index 79630d416..d72256a5f 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -90,8 +90,8 @@ class SQLresolver : public Resolver SQLhost host; Module* mod; public: - SQLresolver(Module* m, InspIRCd* Instance, const SQLhost& hi) - : Resolver(Instance, hi.host, DNS_QUERY_FORWARD, (Module*)m), host(hi), mod(m) + SQLresolver(Module* m, InspIRCd* Instance, const SQLhost& hi, bool &cached) + : Resolver(Instance, hi.host, DNS_QUERY_FORWARD, cached, (Module*)m), host(hi), mod(m) { } @@ -1099,9 +1099,12 @@ public: try { - resolver = new SQLresolver(this, ServerInstance, host); - - ServerInstance->AddResolver(resolver); + bool cached; + resolver = new SQLresolver(this, ServerInstance, host, cached); + if (!cached) + ServerInstance->AddResolver(resolver); + else + delete resolver; } catch(...) { -- cgit v1.2.3