summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-04-21 19:21:26 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-04-21 19:21:26 +0000
commit6e98307171ac86933419a0669d02ca44900a2e7a (patch)
tree619b8af9a260c33111a9aca3d064a10ba04a5700 /src
parentcbd52f4c3dc086a95a6361f1d48b8f2b71b23290 (diff)
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
Diffstat (limited to 'src')
-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;
+ }
}
}
}