summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/user_resolver.cpp13
-rw-r--r--src/userprocess.cpp20
2 files changed, 7 insertions, 26 deletions
diff --git a/src/user_resolver.cpp b/src/user_resolver.cpp
index adae765eb..e7ae1ed07 100644
--- a/src/user_resolver.cpp
+++ b/src/user_resolver.cpp
@@ -22,6 +22,7 @@ UserResolver::UserResolver(InspIRCd* Instance, User* user, std::string to_resolv
void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl, bool cached, int resultnum)
{
+ ServerInstance->Log(DEBUG, "Got a result (lookup complete)");
/* We are only interested in the first matching result */
if (resultnum)
return;
@@ -102,16 +103,12 @@ void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl,
void UserResolver::OnError(ResolverError e, const std::string &errormessage)
{
+ ServerInstance->Log(DEBUG, "Resolver error: " + errormessage);
if (ServerInstance->SE->GetRef(this->bound_fd) == this->bound_user)
{
- /* Since dns timeout is implemented outside of the resolver, this was a race condition that could result in this message being sent *after*
- * the user was fully connected. This check fixes that issue - Special */
- if (!this->bound_user->dns_done)
- {
- /* Error message here */
- this->bound_user->WriteServ("NOTICE Auth :*** Could not resolve your hostname: %s; using your IP address (%s) instead.", errormessage.c_str(), this->bound_user->GetIPString());
- this->bound_user->dns_done = true;
- }
+ this->bound_user->WriteServ("NOTICE Auth :*** Could not resolve your hostname: %s; using your IP address (%s) instead.", errormessage.c_str(), this->bound_user->GetIPString());
+ this->bound_user->dns_done = true;
+ ServerInstance->stats->statsDnsBad++;
}
}
diff --git a/src/userprocess.cpp b/src/userprocess.cpp
index 407aca5b3..c4ce93d6a 100644
--- a/src/userprocess.cpp
+++ b/src/userprocess.cpp
@@ -188,29 +188,13 @@ void InspIRCd::DoBackgroundUserStuff()
/*
* `ready` means that the user has provided NICK/USER(/PASS), and all modules agree
- * that the user is okay to proceed. The one thing we are then waiting for is DNS, which we do here...
+ * that the user is okay to proceed. The one thing we are then waiting for now is DNS...
*/
bool ready = ((curr->registered == REG_NICKUSER) && AllModulesReportReady(curr));
if (ready)
{
- if (!curr->dns_done)
- {
- /*
- * DNS isn't done yet?
- * Cool. Check for timeout.
- */
- if (TIME > curr->signon)
- {
- /* FZZZZZZZZT, timeout! */
- curr->WriteServ("NOTICE Auth :*** Could not resolve your hostname: Request timed out; using your IP address (%s) instead.", curr->GetIPString());
- curr->dns_done = true;
- this->stats->statsDnsBad++;
- curr->FullConnect();
- continue;
- }
- }
- else
+ if (curr->dns_done)
{
/* DNS passed, connect the user */
curr->FullConnect();