diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-01 11:46:19 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-01 11:46:19 +0000 |
commit | 4488e477136ea3daa60a744bac272cc37a604136 (patch) | |
tree | 49ec2884832cea192feb6a667f9ec8d352c14199 /src/modules/m_check.cpp | |
parent | 4789b3f6536ef8267c79c7cb3ee6678546c2150b (diff) |
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
Diffstat (limited to 'src/modules/m_check.cpp')
-rw-r--r-- | src/modules/m_check.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
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 } } |