summaryrefslogtreecommitdiff
path: root/src/modules/m_cloaking.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-10 21:14:26 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-10 21:14:26 +0000
commitdf0bdf390862226c1a8a404d9a154133ce2e0bde (patch)
tree8ed7baeb19c7875caee0e008f5d14ac9ee4b7cbb /src/modules/m_cloaking.cpp
parent5eff6e24a95adf6fcda63304b17f829d0f8d40fe (diff)
Fix double dot in half-cloaked resolved hosts
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11827 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 5a0fb9102..381a2dc40 100644
--- a/src/modules/m_cloaking.cpp
+++ b/src/modules/m_cloaking.cpp
@@ -237,7 +237,7 @@ class ModuleCloaking : public Module
char rv[50];
if (ip.sa.sa_family == AF_INET6)
{
- snprintf(rv, 50, "%02x%02x.%02x%02x.%02x%02x.IP",
+ snprintf(rv, 50, ".%02x%02x.%02x%02x.%02x%02x.IP",
ip.in6.sin6_addr.s6_addr[4], ip.in6.sin6_addr.s6_addr[5],
ip.in6.sin6_addr.s6_addr[2], ip.in6.sin6_addr.s6_addr[3],
ip.in6.sin6_addr.s6_addr[0], ip.in6.sin6_addr.s6_addr[1]);
@@ -245,7 +245,7 @@ class ModuleCloaking : public Module
else
{
const char* ip4 = (const char*)&ip.in4.sin_addr;
- snprintf(rv, 50, "%d.%d.IP", ip4[1], ip4[0]);
+ snprintf(rv, 50, ".%d.%d.IP", ip4[1], ip4[0]);
}
return rv;
}
@@ -471,7 +471,7 @@ class ModuleCloaking : public Module
tail = LastTwoDomainParts(dest->host);
if (tail.empty() || tail.length() > 50)
tail = ReversePartialIP(dest->client_sa);
- chost = prefix + SegmentCloak(dest->host, 1) + "." + tail;
+ chost = prefix + SegmentCloak(dest->host, 1) + tail;
break;
}
case MODE_OPAQUE: