summaryrefslogtreecommitdiff
path: root/src/modules/m_cloaking.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_cloaking.cpp')
-rw-r--r--src/modules/m_cloaking.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp
index a17577702..ae409ae93 100644
--- a/src/modules/m_cloaking.cpp
+++ b/src/modules/m_cloaking.cpp
@@ -410,8 +410,9 @@ class ModuleCloaking : public Module
* Their ISP shouldnt go to town on subdomains, or they shouldnt have a kiddie
* vhost.
*/
- in6_addr testaddr;
- if (inet_pton(dest->client_sa.sa.sa_family, dest->host.c_str(), &testaddr) < 1 && (hostcloak.length() <= 64))
+ std::string testaddr;
+ int testport;
+ if (!irc::sockets::satoap(&dest->client_sa, testaddr, testport) && (hostcloak.length() <= 64))
/* not a valid address, must have been a host, so cloak as a host */
b = hostcloak;
else if (dest->client_sa.sa.sa_family == AF_INET6)