]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cloaking.cpp
Clean up challenge generation to not include character 0x7F, and fix some other thing...
[user/henk/code/inspircd.git] / src / modules / m_cloaking.cpp
index a175777021075954c2ca28331aeeba4092d41e58..ae409ae9327c7e426db283d87bf290ee89942859 100644 (file)
@@ -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)