* ---------------------------------------------------
*/
-/* $Core */
-
#include "inspircd.h"
-UserResolver::UserResolver(User* user, std::string to_resolve, QueryType qt, bool &cache) :
- Resolver(to_resolve, qt, cache), bound_user(user)
+UserResolver::UserResolver(LocalUser* user, std::string to_resolve, QueryType qt, bool &cache) :
+ Resolver(to_resolve, qt, cache, NULL), bound_user(user)
{
this->fwd = (qt == DNS_QUERY_A || qt == DNS_QUERY_AAAA);
this->bound_fd = user->GetFd();
{
UserResolver *res_forward; // for forward-resolution
- if ((!this->fwd) && (ServerInstance->SE->GetRef(this->bound_fd) == this->bound_user))
+ if ((!this->fwd) && (ServerInstance->SE->GetRef(this->bound_fd) == &bound_user->eh))
{
this->bound_user->stored_host = result;
try
ServerInstance->Logs->Log("RESOLVER", DEBUG,"Error in resolver: %s",e.GetReason());
}
}
- else if ((this->fwd) && (ServerInstance->SE->GetRef(this->bound_fd) == this->bound_user))
+ else if ((this->fwd) && (ServerInstance->SE->GetRef(this->bound_fd) == &bound_user->eh))
{
/* Both lookups completed */
void UserResolver::OnError(ResolverError e, const std::string &errormessage)
{
- if (ServerInstance->SE->GetRef(this->bound_fd) == this->bound_user)
+ if (ServerInstance->SE->GetRef(this->bound_fd) == &bound_user->eh)
{
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());
this->bound_user->dns_done = true;