summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-02-06 17:46:23 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-02-06 17:46:23 +0000
commite15284bcfd25447b0a05029536570b38dc00700e (patch)
tree4a47e7648ac86555e88e2f8d6ec5c5fc8ff12fc7
parentaad6c4e5096d4059712ce8671d7ec6af1f6d621c (diff)
Fixes to make this module build with the slightly changed inspsocket (insp_sockaddr addy is gone)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6516 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_http_client.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/modules/m_http_client.cpp b/src/modules/m_http_client.cpp
index 706008104..764d51be4 100644
--- a/src/modules/m_http_client.cpp
+++ b/src/modules/m_http_client.cpp
@@ -156,7 +156,14 @@ bool HTTPSocket::DoRequest(HTTPClientRequest *req)
this->port = url.port;
strlcpy(this->host, url.domain.c_str(), MAXBUF);
- if (insp_aton(this->host, &this->addy) < 1)
+ in_addr addy1;
+#ifdef IPV6
+ in6_addr addy2;
+ char buf[MAXBUF];
+ if ((inet_aton(this->host, &addy1) > 0) || (inet_pton(AF_INET6, this->host, &addy2) > 0))
+#else
+ if (inet_aton(this->host, &addy1) > 0)
+#endif
{
bool cached;
HTTPResolver* r = new HTTPResolver(this, Server, url.domain, cached, (Module*)Mod);