summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-02-06 19:17:45 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-02-06 19:17:45 +0000
commit98747e7710d0cca4316b07558f6fb9a5ecd142a0 (patch)
treecb3e5bcae7f2fdd7c8148c22562990874a5bf12b /src/modules
parentcb4248a10db4313367e8802299eba17cfb10d9dc (diff)
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
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_cloaking.cpp2
1 files changed, 1 insertions, 1 deletions
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))