private:
HTTPSocket *socket;
public:
- HTTPResolver(HTTPSocket *socket, InspIRCd *Instance, const string &hostname) : Resolver(Instance, hostname, DNS_QUERY_FORWARD), socket(socket)
+ HTTPResolver(HTTPSocket *socket, InspIRCd *Instance, const string &hostname, bool &cached, Module* me) : Resolver(Instance, hostname, DNS_QUERY_FORWARD, cached, me), socket(socket)
{
}
- void OnLookupComplete(const string &result)
+ void OnLookupComplete(const string &result, unsigned int ttl, bool cached)
{
socket->Connect(result);
}
this->port = url.port;
strlcpy(this->host, url.domain.c_str(), MAXBUF);
- if (!inet_aton(this->host, &this->addy))
+ if (!insp_aton(this->host, &this->addy))
{
- new HTTPResolver(this, Server, url.domain);
+ bool cached;
+ HTTPResolver* r = new HTTPResolver(this, Server, url.domain, cached, (Module*)Mod);
+ Instance->AddResolver(r, cached);
return true;
}
else
{
return new ModuleHTTPClientFactory;
}
-
-