From df0bdf390862226c1a8a404d9a154133ce2e0bde Mon Sep 17 00:00:00 2001 From: danieldg Date: Sat, 10 Oct 2009 21:14:26 +0000 Subject: Fix double dot in half-cloaked resolved hosts git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11827 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_cloaking.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/modules') 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: -- cgit v1.2.3