From b47228902d585dd16953b7f9bc395553890fc56e Mon Sep 17 00:00:00 2001 From: danieldg Date: Tue, 1 Sep 2009 15:07:52 +0000 Subject: Move IP<->sockaddr conversions into irc::sockets:: namespace git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11580 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_cloaking.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/modules/m_cloaking.cpp') 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) -- cgit v1.2.3