From df4f0dc888a2a24e7f8b42a1c21670679e633506 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 19 Aug 2007 16:00:57 +0000 Subject: Allow support for multiple dns results per request. This is a significant change and should probably not be backported to stable. This will allow for a fix to feature request bug #384 git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7753 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index cbf9de0cd..bc8dc51e4 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -164,8 +164,12 @@ 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, bool cached) +void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl, bool cached, int resultnum) { + /* We are only interested in the first matching result */ + if (resultnum) + return; + if ((!this->fwd) && (ServerInstance->SE->GetRef(this->bound_fd) == this->bound_user)) { this->bound_user->stored_host = result; -- cgit v1.2.3