summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-21 20:22:21 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-21 20:22:21 +0000
commit665ae74f2a8be8f9fd6592cd8f1655d3ad65a3dd (patch)
treea08cda75f80b25aad07e3520139979884f166441
parentaf739bfa5fbb8070dd3b0d21bdda493cb3052588 (diff)
Tidy up some DNS stuff more
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8280 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/cmd_nick.cpp13
-rw-r--r--src/user_resolver.cpp2
-rw-r--r--src/users.cpp9
3 files changed, 11 insertions, 13 deletions
diff --git a/src/cmd_nick.cpp b/src/cmd_nick.cpp
index f23ad93fa..218ea23f2 100644
--- a/src/cmd_nick.cpp
+++ b/src/cmd_nick.cpp
@@ -140,17 +140,8 @@ CmdResult cmd_nick::Handle (const char** parameters, int pcnt, User *user)
if (user->registered < REG_NICKUSER)
{
user->registered = (user->registered | REG_NICK);
-
- if (ServerInstance->Config->NoUserDns)
- {
- user->dns_done = true;
- }
- else
- {
- user->StartDNSLookup();
- }
}
- if (user->registered == REG_NICKUSER)
+ else if (user->registered == REG_NICKUSER)
{
/* user is registered now, bit 0 = USER command, bit 1 = sent a NICK command */
int MOD_RESULT = 0;
@@ -158,7 +149,7 @@ CmdResult cmd_nick::Handle (const char** parameters, int pcnt, User *user)
if (MOD_RESULT > 0)
return CMD_FAILURE;
}
- if (user->registered == REG_ALL)
+ else if (user->registered == REG_ALL)
{
FOREACH_MOD(I_OnUserPostNick,OnUserPostNick(user,oldnick));
}
diff --git a/src/user_resolver.cpp b/src/user_resolver.cpp
index e7ae1ed07..f23682b14 100644
--- a/src/user_resolver.cpp
+++ b/src/user_resolver.cpp
@@ -22,7 +22,6 @@ UserResolver::UserResolver(InspIRCd* Instance, User* user, std::string to_resolv
void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl, bool cached, int resultnum)
{
- ServerInstance->Log(DEBUG, "Got a result (lookup complete)");
/* We are only interested in the first matching result */
if (resultnum)
return;
@@ -103,7 +102,6 @@ void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl,
void UserResolver::OnError(ResolverError e, const std::string &errormessage)
{
- ServerInstance->Log(DEBUG, "Resolver error: " + errormessage);
if (ServerInstance->SE->GetRef(this->bound_fd) == this->bound_user)
{
this->bound_user->WriteServ("NOTICE Auth :*** Could not resolve your hostname: %s; using your IP address (%s) instead.", errormessage.c_str(), this->bound_user->GetIPString());
diff --git a/src/users.cpp b/src/users.cpp
index c6c8126ee..f86e18257 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -848,6 +848,15 @@ void User::AddClient(InspIRCd* Instance, int socket, int port, bool iscached, in
* BOPM and other stuff requires it.
*/
New->WriteServ("NOTICE Auth :*** Looking up your hostname...");
+
+ if (Instance->Config->NoUserDns)
+ {
+ New->dns_done = true;
+ }
+ else
+ {
+ New->StartDNSLookup();
+ }
}
unsigned long User::GlobalCloneCount()