1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 03:43:13 +02:00

Added an asynchronous DNS system and m_dnsbl, which checks clients against DNS blacklists.

Rewrote internal handling of IPs, we now properly support users using IPv6.
Fixed a few problems with the UnrealIRCd protocol module.
This commit is contained in:
Adam
2010-09-09 23:43:11 -04:00
parent fdd196e50b
commit 46813ccb8c
34 changed files with 1304 additions and 349 deletions
-14
View File
@@ -161,17 +161,3 @@ void b64_decode(const Anope::string &src, Anope::string &target)
target.erase(target.length() - 1);
}
int decode_ip(const Anope::string &buf)
{
int len = buf.length();
Anope::string targ;
b64_decode(buf, targ);
const struct in_addr ia = *reinterpret_cast<const struct in_addr *>(targ.c_str());
if (len == 24) /* IPv6 */
return 0;
else if (len == 8) /* IPv4 */
return ia.s_addr;
else /* Error?? */
return 0;
}