From 98747e7710d0cca4316b07558f6fb9a5ecd142a0 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 6 Feb 2007 19:17:45 +0000 Subject: Fix using wrong var to determine if host is ipv6 or ipv4, resulting in wrong cloak algorithm being picked for ipv6 users git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6527 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 e1aec5d38..033ac8c53 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -108,7 +108,7 @@ class CloakUser : public ModeHandler b = hostcloak; else /* Valid ipv6 or ipv4 address (not resolved) ipv4 or ipv6 user */ - b = ((b.find(':') == std::string::npos) ? Cloak4(dest->host) : Cloak6(dest->host)); + b = ((!strchr(dest->host,':')) ? Cloak4(dest->host) : Cloak6(dest->host)); #else in_addr testaddr; if ((inet_aton(dest->host,&testaddr) < 1) && (hostcloak.length() <= 64)) -- cgit v1.2.3