aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_cloaking.cpp
diff options
context:
space:
mode:
authorGravatar Daniel De Graaf2010-04-24 17:28:48 -0500
committerGravatar Daniel De Graaf2010-08-03 17:32:43 -0400
commitca88d7cd164c128f67350eeb72e65bda2b58ebb4 (patch)
tree97c16fe44a734701d9bc611b1655bc6a551f13ec /src/modules/m_cloaking.cpp
parentAdd "CLOAK" command to allow opers to see the cloaked form of any host (diff)
Emulate a bug in 1.2 to get matching cloaks
Diffstat (limited to 'src/modules/m_cloaking.cpp')
-rw-r--r--src/modules/m_cloaking.cpp4
1 files changed, 2 insertions, 2 deletions
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.