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:
+2
-6
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user