summaryrefslogtreecommitdiff
path: root/src/modules/extra
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-01-07 21:16:03 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-01-07 21:16:03 +0000
commitdac672cf303ce44dc5f877a5f9f7e5aee64b95e1 (patch)
tree3484e7870d732dd04a590640cfe5c72ea50e7dde /src/modules/extra
parent6b9eaeba4130acb818a63782640194c7e5bcc2fa (diff)
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
Diffstat (limited to 'src/modules/extra')
-rw-r--r--src/modules/extra/m_pgsql.cpp13
1 files changed, 8 insertions, 5 deletions
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(...)
{