1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 20:26:39 +02:00

Make sockaddrs/cidr not throw on invalid ips to give us an easier/cheaper way to test for a valid IP

This commit is contained in:
Adam
2013-05-08 09:50:43 -04:00
parent 6859decfb8
commit 9b07e163c0
16 changed files with 212 additions and 244 deletions
+2 -6
View File
@@ -707,12 +707,8 @@ Anope::string Anope::Resolve(const Anope::string &host, int type)
{
sockaddrs addr;
memcpy(&addr, addrresult->ai_addr, addrresult->ai_addrlen);
try
{
result = addr.addr();
Log(LOG_DEBUG_2) << "Resolver: " << host << " -> " << result;
}
catch (const SocketException &) { }
result = addr.addr();
Log(LOG_DEBUG_2) << "Resolver: " << host << " -> " << result;
freeaddrinfo(addrresult);
}