diff options
author | Daniel De Graaf <danieldg@inspircd.org> | 2010-04-26 14:50:54 -0500 |
---|---|---|
committer | Daniel De Graaf <danieldg@inspircd.org> | 2010-04-26 14:50:54 -0500 |
commit | 49313a2b5a5d8ba76ecb1ab2ed9f3df94639f7bb (patch) | |
tree | ff13d395d0f73681ba6b31f320bf9af8e8051962 | |
parent | 123bfed2ce68974321ca14dc4972fff309b12529 (diff) |
Add debug output of UserResolver results
-rw-r--r-- | src/user_resolver.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/user_resolver.cpp b/src/user_resolver.cpp index 156bb9828..ecd864a69 100644 --- a/src/user_resolver.cpp +++ b/src/user_resolver.cpp @@ -22,9 +22,17 @@ void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl, { UserResolver *res_forward; // for forward-resolution LocalUser* bound_user = (LocalUser*)ServerInstance->FindUUID(uuid); + if (!bound_user) + { + ServerInstance->Logs->Log("RESOLVER", DEBUG, "Resolution finished for user '%s' who is gone", uuid.c_str()); + return; + } + + ServerInstance->Logs->Log("RESOLVER", DEBUG, "DNS result for %s: '%s' -> '%s'", uuid.c_str(), input.c_str(), result.c_str()); - if ((!this->fwd) && bound_user) + if (!fwd) { + // first half of resolution is done. We now need to verify that the host matches. bound_user->stored_host = result; try { @@ -50,7 +58,7 @@ void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl, ServerInstance->Logs->Log("RESOLVER", DEBUG,"Error in resolver: %s",e.GetReason()); } } - else if ((this->fwd) && bound_user) + else { /* Both lookups completed */ |