summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-01-07 22:01:00 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-01-07 22:01:00 +0000
commitfe46f3c228ae993b59fbf5eca423c3171d90e1b3 (patch)
tree00e891232399b60adfe3a815b1a00ee2273da99d /src/users.cpp
parent2a5e6d416ff00d25230cee662b6e56e9a3d59f75 (diff)
Document dns caching, add a "bool cached" to OnLookupComplete method in Resolver, and and add " -- cached" to end of 'looking up your host' string if their result is a cached result
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6254 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/users.cpp b/src/users.cpp
index a42e86210..0e88c3de4 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -168,7 +168,7 @@ UserResolver::UserResolver(InspIRCd* Instance, userrec* user, std::string to_res
this->bound_fd = user->GetFd();
}
-void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl)
+void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl, bool cached)
{
if ((!this->fwd) && (ServerInstance->SE->GetRef(this->bound_fd) == this->bound_user))
{
@@ -211,7 +211,7 @@ void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl)
if (*(hostname.c_str()) == ':')
hostname = "0" + hostname;
- this->bound_user->WriteServ("NOTICE Auth :*** Found your hostname (%s)", hostname.c_str());
+ this->bound_user->WriteServ("NOTICE Auth :*** Found your hostname (%s)%s", hostname.c_str(), (cached ? " -- cached" : ""));
this->bound_user->dns_done = true;
strlcpy(this->bound_user->dhost, hostname.c_str(),64);
strlcpy(this->bound_user->host, hostname.c_str(),64);