diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-12 20:27:30 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-12 20:27:30 +0000 |
commit | a5da688e2bb2ba78298a26f14f6dde28e9c47894 (patch) | |
tree | 923bd4517714ac6cce39c214212251ce1feef6c6 /src | |
parent | 48291aaee55644c3df35be187c4fc2d19a3f1d0d (diff) |
Make sure that the hostname isnt set after the timeout period
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4912 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/users.cpp | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/src/users.cpp b/src/users.cpp index 84bdbb9d6..84f762640 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -149,8 +149,12 @@ void UserResolver::OnLookupComplete(const std::string &result) this->bound_user->stored_host = result; try { - bound_user->res_forward = new UserResolver(this->ServerInstance, this->bound_user, result, true); - this->ServerInstance->AddResolver(bound_user->res_forward); + /* Check we didnt time out */ + if (this->bound_user->registered != REG_ALL) + { + bound_user->res_forward = new UserResolver(this->ServerInstance, this->bound_user, result, true); + this->ServerInstance->AddResolver(bound_user->res_forward); + } } catch (ModuleException& e) { @@ -165,14 +169,18 @@ void UserResolver::OnLookupComplete(const std::string &result) std::string hostname = this->bound_user->stored_host; if (hostname.length() < 65) { - /* Hostnames starting with : are not a good thing (tm) */ - if (*(hostname.c_str()) == ':') - hostname = "0" + hostname; - - this->bound_user->WriteServ("NOTICE Auth :*** Found your hostname (%s)", hostname.c_str()); - this->bound_user->dns_done = true; - strlcpy(this->bound_user->dhost, hostname.c_str(),64); - strlcpy(this->bound_user->host, hostname.c_str(),64); + /* Check we didnt time out */ + if (this->bound_user->registered != REG_ALL) + { + /* Hostnames starting with : are not a good thing (tm) */ + if (*(hostname.c_str()) == ':') + hostname = "0" + hostname; + + this->bound_user->WriteServ("NOTICE Auth :*** Found your hostname (%s)", hostname.c_str()); + this->bound_user->dns_done = true; + strlcpy(this->bound_user->dhost, hostname.c_str(),64); + strlcpy(this->bound_user->host, hostname.c_str(),64); + } } else { |