From 6e98307171ac86933419a0669d02ca44900a2e7a Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 21 Apr 2007 19:21:26 +0000 Subject: Fix spurious 'found host' messages after being told it couldnt. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6821 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/users.cpp b/src/users.cpp index 43ca8ec9f..fb4c8b48e 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -210,7 +210,7 @@ void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl, if (hostname.length() < 65) { /* Check we didnt time out */ - if (this->bound_user->registered != REG_ALL) + if ((this->bound_user->registered != REG_ALL) && (!this->bound_user->dns_done)) { /* Hostnames starting with : are not a good thing (tm) */ if (*(hostname.c_str()) == ':') @@ -226,12 +226,20 @@ void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl, } else { - this->bound_user->WriteServ("NOTICE Auth :*** Your hostname is longer than the maximum of 64 characters, using your IP address (%s) instead.", this->bound_user->GetIPString()); + if (!this->bound_user->dns_done) + { + this->bound_user->WriteServ("NOTICE Auth :*** Your hostname is longer than the maximum of 64 characters, using your IP address (%s) instead.", this->bound_user->GetIPString()); + this->bound_user->dns_done = true; + } } } else { - this->bound_user->WriteServ("NOTICE Auth :*** Your hostname does not match up with your IP address. Sorry, using your IP address (%s) instead.", this->bound_user->GetIPString()); + if (!this->bound_user->dns_done) + { + this->bound_user->WriteServ("NOTICE Auth :*** Your hostname does not match up with your IP address. Sorry, using your IP address (%s) instead.", this->bound_user->GetIPString()); + this->bound_user->dns_done = true; + } } } } -- cgit v1.2.3