]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/user_resolver.cpp
Fix bug #113
[user/henk/code/inspircd.git] / src / user_resolver.cpp
index 156bb9828f6384211d1b1e40b6b7b9bdfa87c54a..ecd864a698ae36ce23ef75b378772bd0a61ef08c 100644 (file)
@@ -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 */