summaryrefslogtreecommitdiff
path: root/src/modules/m_cloaking.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-01 15:07:52 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-01 15:07:52 +0000
commitb47228902d585dd16953b7f9bc395553890fc56e (patch)
treeffc4ed1d4177c2e2f0d10ea01f17c4ea8ee0409a /src/modules/m_cloaking.cpp
parent77d5c9f765702a06a1ad77f239d1cbe2d9b11662 (diff)
Move IP<->sockaddr conversions into irc::sockets:: namespace
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11580 e03df62e-2008-0410-955e-edbf42e46eb7
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)