]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
ident: reduce the amount of messages sent when a lookup fails.
authorPeter Powell <petpow@saberuk.com>
Fri, 1 Feb 2019 10:43:51 +0000 (10:43 +0000)
committerPeter Powell <petpow@saberuk.com>
Mon, 4 Feb 2019 09:47:24 +0000 (09:47 +0000)
src/modules/m_ident.cpp

index 74f049b448a2fab5f007a0adf9438c0e4d0a6f5a..7bd403fd8eb65ea0478d02ccb03c6644992d96c0 100644 (file)
@@ -352,7 +352,8 @@ class ModuleIdent : public Module
                if (ServerInstance->Time() >= compare)
                {
                        /* Ident timeout */
-                       user->WriteNotice("*** Ident request timed out.");
+                       PrefixIdent(user);
+                       user->WriteNotice("*** Ident lookup timed out, using " + user->ident + " instead.");
                }
                else if (!isock->HasResult())
                {
@@ -361,7 +362,7 @@ class ModuleIdent : public Module
                }
 
                /* wooo, got a result (it will be good, or bad) */
-               if (isock->result.empty())
+               else if (isock->result.empty())
                {
                        PrefixIdent(user);
                        user->WriteNotice("*** Could not find your ident, using " + user->ident + " instead.");