From ca88d7cd164c128f67350eeb72e65bda2b58ebb4 Mon Sep 17 00:00:00 2001 From: Daniel De Graaf Date: Sat, 24 Apr 2010 17:28:48 -0500 Subject: Emulate a bug in 1.2 to get matching cloaks --- src/modules/m_cloaking.cpp | 4 ++-- 1 file changed, 2 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 cb605bb68..f5f13abae 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -505,8 +505,8 @@ class ModuleCloaking : public Module { std::string tail = LastTwoDomainParts(host); - /* Generate a cloak using specialized Hash */ - chost = prefix + "-" + sumIV(dest->host[0], dest->host, 4) + tail; + // sumIV is not used here due to a bug in 1.2 cloaking + chost = prefix + "-" + irc::hex((const unsigned char*)Hash->sum(host, compatkey).data(), 4) + tail; /* Fix by brain - if the cloaked host is > the max length of a host (64 bytes * according to the DNS RFC) then they get cloaked as an IP. -- cgit v1.3.1-10-gc9f91