From 93b0dec6654e1b8249c7b01a4820d861f9bac149 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 10 Dec 2006 18:15:34 +0000 Subject: Host cloaks for resolved hosts are wayyyy too long, cut the hash down to the first 8 chars git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5918 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_cloaking.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 7d2a4bc95..ffa189007 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -94,7 +94,7 @@ class CloakUser : public ModeHandler HashHexRequest(Sender, HashProvider, xtab[(*dest->host) % 4]); /* Generate a cloak using specialized Hash */ - std::string hostcloak = prefix + "-" + HashSumRequest(Sender, HashProvider, dest->host).Send() + a; + std::string hostcloak = prefix + "-" + std::string(HashSumRequest(Sender, HashProvider, dest->host).Send()).substr(0,8) + a; /* Fix by brain - if the cloaked host is > the max length of a host (64 bytes * according to the DNS RFC) then tough titty, they get cloaked as an IP. -- cgit v1.2.3