diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-19 16:00:57 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-19 16:00:57 +0000 |
commit | df4f0dc888a2a24e7f8b42a1c21670679e633506 (patch) | |
tree | 6fb90acdb5ad14510b53045d0f414316792466c9 /src/users.cpp | |
parent | dfdb324f674177a4e8ed92d8a782fc51ccf4ed84 (diff) |
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
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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; |