From 4488e477136ea3daa60a744bac272cc37a604136 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 1 Aug 2006 11:46:19 +0000 Subject: The IPV6 stuff compiles now, with compile-correct ipv6 code. I dont know if this works yet. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4611 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_check.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/modules/m_check.cpp') diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp index 29aaaa6dc..e41e60b80 100644 --- a/src/modules/m_check.cpp +++ b/src/modules/m_check.cpp @@ -160,8 +160,11 @@ class cmd_check : public command_t /* /check on an IP address, or something that doesn't exist */ insp_sockaddr addr; long x = 0; - - if (inet_aton(parameters[0], &addr.sin_addr) == 0) +#ifdef IPV6 + if (insp_aton(parameters[0], &addr.sin6_addr) == 0) +#else + if (insp_aton(parameters[0], &addr.sin_addr) == 0) +#endif { /* hostname or other */ for (user_hash::const_iterator a = clientlist.begin(); a != clientlist.end(); a++) @@ -178,11 +181,15 @@ class cmd_check : public command_t /* IP address */ for (user_hash::const_iterator a = clientlist.begin(); a != clientlist.end(); a++) { +#ifdef IPV6 + /* TODO: Clone matching for IPV6 ips */ +#else if (addr.sin_addr.s_addr == a->second->ip4.s_addr) { /* same IP. */ Srv->SendTo(NULL, user, checkstr + " match " + ConvToStr(++x) + " " + a->second->GetFullRealHost()); } +#endif } } -- cgit v1.3.1-10-gc9f91