summaryrefslogtreecommitdiff
path: root/src/dns.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-04-25 04:17:21 -0400
committerAdam <Adam@anope.org>2011-04-25 04:17:21 -0400
commit4a733c93d45e0ca5d757abf826d65bc1cbaf610e (patch)
treee09f093a9926b4285ea1d33da93828ddd5b6bbcb /src/dns.cpp
parent03d2378a9fc2fdc868ee4476597ec1901242a0c5 (diff)
Don't attempt to connect to the uplink if given invalid hostnames
Diffstat (limited to 'src/dns.cpp')
-rw-r--r--src/dns.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dns.cpp b/src/dns.cpp
index e5a2c3098..45b3db6bd 100644
--- a/src/dns.cpp
+++ b/src/dns.cpp
@@ -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;