diff options
Diffstat (limited to 'src/cmd_nick.cpp')
-rw-r--r-- | src/cmd_nick.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/cmd_nick.cpp b/src/cmd_nick.cpp index 432c2e814..3eeb37663 100644 --- a/src/cmd_nick.cpp +++ b/src/cmd_nick.cpp @@ -143,18 +143,24 @@ void cmd_nick::Handle (char **parameters, int pcnt, userrec *user) //if (user->dns_done) // log(DEBUG,"Aborting dns lookup of %s because dns server experienced a failure.",user->nick); -#ifdef THREADED_DNS - // initialize their dns lookup thread - if (pthread_create(&user->dnsthread, NULL, dns_task, (void *)user) != 0) + if (Config->NoUserDns) { - log(DEBUG,"Failed to create DNS lookup thread for user %s",user->nick); + user->dns_done = true; } + else + { +#ifdef THREADED_DNS + // initialize their dns lookup thread + if (pthread_create(&user->dnsthread, NULL, dns_task, (void *)user) != 0) + { + log(DEBUG,"Failed to create DNS lookup thread for user %s",user->nick); + } #else - user->dns_done = (!lookup_dns(user->nick)); - if (user->dns_done) - log(DEBUG,"Aborting dns lookup of %s because dns server experienced a failure.",user->nick); + user->dns_done = (!lookup_dns(user->nick)); + if (user->dns_done) + log(DEBUG,"Aborting dns lookup of %s because dns server experienced a failure.",user->nick); #endif - + } } if (user->registered == 3) { |