diff options
author | Adam <Adam@anope.org> | 2016-09-02 12:43:13 -0400 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2016-09-02 20:23:43 +0200 |
commit | 0b0b8d9e06139d41ebf7e304fe8b80bf1fae6448 (patch) | |
tree | c640eda2bd983fb9f09aedf2034110c0271343eb /src | |
parent | 1e96bca9b075aebec490e6892ef2da2a3048ba12 (diff) |
m_dnsbl Use FindAnswerOfType
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_dnsbl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index 44328480e..73ecd02a6 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -66,7 +66,9 @@ class DNSBLResolver : public DNS::Request if (!them) return; - const DNS::ResourceRecord &ans_record = r->answers[0]; + const DNS::ResourceRecord* const ans_record = r->FindAnswerOfType(DNS::QUERY_A); + if (!ans_record) + return; int i = countExt.get(them); if (i) @@ -78,7 +80,7 @@ class DNSBLResolver : public DNS::Request bool match = false; in_addr resultip; - inet_aton(ans_record.rdata.c_str(), &resultip); + inet_aton(ans_record->rdata.c_str(), &resultip); switch (ConfEntry->type) { |