diff options
Diffstat (limited to 'src/users.cpp')
-rw-r--r-- | src/users.cpp | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/users.cpp b/src/users.cpp index 85fd06dbe..fcdba65ca 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -137,8 +137,15 @@ bool userrec::ProcessNoticeMasks(const char *sm) void userrec::StartDNSLookup() { log(DEBUG,"Commencing reverse lookup"); - res_reverse = new UserResolver(this, insp_ntoa(this->ip4), false); - MyServer->AddResolver(res_reverse); + try + { + res_reverse = new UserResolver(this, insp_ntoa(this->ip4), false); + MyServer->AddResolver(res_reverse); + } + catch (ModuleException& e) + { + log(DEBUG,"Error in resolver: %s",e.GetReason()); + } } UserResolver::UserResolver(userrec* user, std::string to_resolve, bool forward) : Resolver(to_resolve, forward), bound_user(user) @@ -152,8 +159,15 @@ void UserResolver::OnLookupComplete(const std::string &result) { log(DEBUG,"Commencing forward lookup"); this->bound_user->stored_host = result; - bound_user->res_forward = new UserResolver(this->bound_user, result, true); - MyServer->AddResolver(bound_user->res_forward); + try + { + bound_user->res_forward = new UserResolver(this->bound_user, result, true); + MyServer->AddResolver(bound_user->res_forward); + } + catch (ModuleException& e) + { + log(DEBUG,"Error in resolver: %s",e.GetReason()); + } } else if ((this->fwd) && (fd_ref_table[this->bound_fd] == this->bound_user)) { @@ -180,7 +194,7 @@ void UserResolver::OnLookupComplete(const std::string &result) } } -void UserResolver::OnError(ResolverError e) +void UserResolver::OnError(ResolverError e, const std::string &errormessage) { if (fd_ref_table[this->bound_fd] == this->bound_user) { |