summaryrefslogtreecommitdiff
path: root/src/modules.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-01-07 21:35:25 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-01-07 21:35:25 +0000
commitf1ca6c6d71f3e31b333e0be45294bcb30fd89b4d (patch)
tree307b67ee46dc6b69b844626051c933711d1d1d0d /src/modules.cpp
parent8d948ff975c815cb32300354244b1bab263af155 (diff)
DNS caching stuff (almost done)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6252 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index 959092641..8d5ca846f 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -434,9 +434,16 @@ bool InspIRCd::DelModeWatcher(ModeWatcher* mw)
return this->Modes->DelModeWatcher(mw);
}
-bool InspIRCd::AddResolver(Resolver* r)
+bool InspIRCd::AddResolver(Resolver* r, bool cached)
{
- return this->Res->AddResolverClass(r);
+ if (!cached)
+ return this->Res->AddResolverClass(r);
+ else
+ {
+ r->TriggerCachedResult();
+ delete r;
+ return true;
+ }
}
bool InspIRCd::UserToPseudo(userrec* user, const std::string &message)