]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
If the result is cached, dont bother waiting for the dns timeout, release them at...
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 7 Jan 2007 22:11:18 +0000 (22:11 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 7 Jan 2007 22:11:18 +0000 (22:11 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6255 e03df62e-2008-0410-955e-edbf42e46eb7

src/cmd_nick.cpp

index 4b3317a9fe0bb51a54697584d6b96b3c4af7d5a8..21723fafc4f5b85da40498e9fa786b9ee76324a3 100644 (file)
@@ -131,15 +131,22 @@ CmdResult cmd_nick::Handle (const char** parameters, int pcnt, userrec *user)
                if (ServerInstance->Config->NoUserDns)
                {
                        user->dns_done = true;
+                       ServerInstance->next_call = ServerInstance->Time();
                }
                else
                {
                        user->StartDNSLookup();
                        if (user->dns_done)
-                               ServerInstance->Log(DEBUG,"Aborting dns lookup of %s because dns server experienced a failure.",user->nick);
+                       {
+                               /* Cached result or instant failure - fall right through if possible */
+                               ServerInstance->next_call = ServerInstance->Time();
+                       }
+                       else
+                       {
+                               if (ServerInstance->next_call > ServerInstance->Time() + ServerInstance->Config->dns_timeout)
+                                       ServerInstance->next_call = ServerInstance->Time() + ServerInstance->Config->dns_timeout;
+                       }
                }
-               if (ServerInstance->next_call > ServerInstance->Time() + ServerInstance->Config->dns_timeout)
-                       ServerInstance->next_call = ServerInstance->Time() + ServerInstance->Config->dns_timeout;
        }
        if (user->registered == REG_NICKUSER)
        {