aboutsummaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorGravatar brain2007-01-07 21:35:25 +0000
committerGravatar brain2007-01-07 21:35:25 +0000
commitf1ca6c6d71f3e31b333e0be45294bcb30fd89b4d (patch)
tree307b67ee46dc6b69b844626051c933711d1d1d0d /src/users.cpp
parentTidy up old MaintainWhoWas. (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/users.cpp')
-rw-r--r--src/users.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 37664a629..a42e86210 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -153,10 +153,7 @@ void userrec::StartDNSLookup()
ServerInstance->Log(DEBUG,"Passing instance: %08x",this->ServerInstance);
bool cached;
res_reverse = new UserResolver(this->ServerInstance, this, this->GetIPString(), DNS_QUERY_REVERSE, cached);
- if (!cached)
- this->ServerInstance->AddResolver(res_reverse);
- else
- delete res_reverse;
+ this->ServerInstance->AddResolver(res_reverse, cached);
}
catch (CoreException& e)
{
@@ -189,10 +186,7 @@ void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl)
#else
bound_user->res_forward = new UserResolver(this->ServerInstance, this->bound_user, result, DNS_QUERY_A, cached);
#endif
- if (!cached)
- this->ServerInstance->AddResolver(bound_user->res_forward);
- else
- delete bound_user->res_forward;
+ this->ServerInstance->AddResolver(bound_user->res_forward, cached);
}
}
catch (CoreException& e)