From f1ca6c6d71f3e31b333e0be45294bcb30fd89b4d Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 7 Jan 2007 21:35:25 +0000 Subject: DNS caching stuff (almost done) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6252 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/modules.cpp') 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) -- cgit v1.2.3