X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcoremods%2Fcore_hostname_lookup.cpp;h=b9adc9c2e7433df71b9629a18880ba5fa3feb6fa;hb=5ac5440a44595a7d7073a311bc280274aaed449e;hp=cbd80931c727ab2fd9c00529b2068104660a6e50;hpb=f9fd78c01623514a060c607534fc52cb73140200;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/coremods/core_hostname_lookup.cpp b/src/coremods/core_hostname_lookup.cpp index cbd80931c..b9adc9c2e 100644 --- a/src/coremods/core_hostname_lookup.cpp +++ b/src/coremods/core_hostname_lookup.cpp @@ -37,21 +37,6 @@ class UserResolver : public DNS::Request */ const bool fwd; - const DNS::ResourceRecord* FindAnswerOfType(const DNS::Query* response, DNS::QueryType qtype) - { - for (std::vector::const_iterator it = response->answers.begin(); it != response->answers.end(); ++it) - { - const DNS::ResourceRecord& rr = *it; - - if (rr.type == qtype) - { - return &rr; - } - } - - return NULL; - } - public: /** Create a resolver. * @param mgr DNS Manager @@ -80,10 +65,10 @@ class UserResolver : public DNS::Request return; } - const DNS::ResourceRecord* ans_record = FindAnswerOfType(r, this->type); + const DNS::ResourceRecord* ans_record = r->FindAnswerOfType(this->question.type); if (ans_record == NULL) { - ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "DNS result for %s: no record of type %d", uuid.c_str(), this->type); + OnError(r); return; }