summaryrefslogtreecommitdiff
path: root/src/modules/m_cloaking.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-29 18:46:36 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-29 18:46:36 +0000
commit7547509db91a15dbbc67c84998a5ba630f87afc4 (patch)
tree08bef2418f2b063a4e0ebc54337dbcbc9e347212 /src/modules/m_cloaking.cpp
parenta82e3bb5ae9c062fe9d4c5ff56675183cc29def2 (diff)
Apply patch to fix ipv6 builds, contributed by danieldg, thanks :-)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9817 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_cloaking.cpp')
-rw-r--r--src/modules/m_cloaking.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp
index 2cbd8fb99..e0ca026bb 100644
--- a/src/modules/m_cloaking.cpp
+++ b/src/modules/m_cloaking.cpp
@@ -394,15 +394,15 @@ class ModuleCloaking : public Module
#ifdef IPV6
in6_addr testaddr;
in_addr testaddr2;
- if ((dest->GetProtocolFamily() == AF_INET6) && (inet_pton(AF_INET6,dest->host,&testaddr) < 1) && (hostcloak.length() <= 64))
+ if ((dest->GetProtocolFamily() == AF_INET6) && (inet_pton(AF_INET6,dest->host.c_str(),&testaddr) < 1) && (hostcloak.length() <= 64))
/* Invalid ipv6 address, and ipv6 user (resolved host) */
b = hostcloak;
- else if ((dest->GetProtocolFamily() == AF_INET) && (inet_aton(dest->host,&testaddr2) < 1) && (hostcloak.length() <= 64))
+ else if ((dest->GetProtocolFamily() == AF_INET) && (inet_aton(dest->host.c_str(),&testaddr2) < 1) && (hostcloak.length() <= 64))
/* Invalid ipv4 address, and ipv4 user (resolved host) */
b = hostcloak;
else
/* Valid ipv6 or ipv4 address (not resolved) ipv4 or ipv6 user */
- b = ((!strchr(dest->host,':')) ? cu->Cloak4(dest->host) : cu->Cloak6(dest->host));
+ b = ((!strchr(dest->host.c_str(),':')) ? cu->Cloak4(dest->host.c_str()) : cu->Cloak6(dest->host.c_str()));
#else
in_addr testaddr;
if ((inet_aton(dest->host.c_str(),&testaddr) < 1) && (hostcloak.length() <= 64))