From fe46f3c228ae993b59fbf5eca423c3171d90e1b3 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 7 Jan 2007 22:01:00 +0000 Subject: 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 --- src/users.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/users.cpp') 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); -- cgit v1.3.1-10-gc9f91