From e15284bcfd25447b0a05029536570b38dc00700e Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 6 Feb 2007 17:46:23 +0000 Subject: 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 --- src/modules/m_http_client.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3