summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp14
1 files 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;
+ }
}
}
}