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

Don't attempt to connect to the uplink if given invalid hostnames

This commit is contained in:
Adam
2011-04-25 04:17:21 -04:00
parent 03d2378a9f
commit 4a733c93d4
5 changed files with 46 additions and 18 deletions
+5 -1
View File
@@ -221,6 +221,11 @@ inline DNSRecord::DNSRecord(const Anope::string &n) : name(n)
this->created = Anope::CurTime;
}
DNSRecord::operator bool() const
{
return !this->result.empty();
}
DNSSocket::DNSSocket() : ConnectionSocket(false, SOCK_DGRAM)
{
}
@@ -613,7 +618,6 @@ DNSRecord DNSManager::BlockingQuery(const Anope::string &mask, QueryType qt)
DNSRecord result(mask);
addrinfo *addrresult, hints;
result.result = mask;
result.type = qt;
int type = AF_UNSPEC;