diff options
| author | 2007-01-07 21:16:03 +0000 | |
|---|---|---|
| committer | 2007-01-07 21:16:03 +0000 | |
| commit | dac672cf303ce44dc5f877a5f9f7e5aee64b95e1 (patch) | |
| tree | 3484e7870d732dd04a590640cfe5c72ea50e7dde /src/modules/m_http_client.cpp | |
| parent | Move all /WHOWAS related out of core and into cmd_whowas. (diff) | |
DNS Stuff - this wont work right yet, it will soon (tm)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6250 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_http_client.cpp')
| -rw-r--r-- | src/modules/m_http_client.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/modules/m_http_client.cpp b/src/modules/m_http_client.cpp index 0ca302ef6..92a9aa348 100644 --- a/src/modules/m_http_client.cpp +++ b/src/modules/m_http_client.cpp @@ -56,7 +56,7 @@ class HTTPResolver : public Resolver 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) { } @@ -149,7 +149,12 @@ bool HTTPSocket::DoRequest(HTTPClientRequest *req) if (!inet_aton(this->host, &this->addy)) { - new HTTPResolver(this, Server, url.domain); + bool cached; + HTTPResolver* r = new HTTPResolver(this, Server, url.domain, cached, (Module*)Mod); + if (!cached) + Instance->AddResolver(r); + else + delete r; return true; } else |
