1 #ifndef __RESOLVERS__H__
2 #define __RESOLVERS__H__
4 #include "configreader.h"
8 #include "commands/cmd_whois.h"
9 #include "commands/cmd_stats.h"
14 #include "transport.h"
16 #include "m_spanningtree/utils.h"
18 /** Handle resolving of server IPs for the cache
20 class SecurityIPResolver : public Resolver
24 SpanningTreeUtilities* Utils;
26 SecurityIPResolver(Module* me, SpanningTreeUtilities* U, InspIRCd* Instance, const std::string &hostname, Link x, bool &cached)
27 : Resolver(Instance, hostname, DNS_QUERY_FORWARD, cached, me), MyLink(x), Utils(U)
31 void OnLookupComplete(const std::string &result, unsigned int ttl, bool cached)
33 Utils->ValidIPs.push_back(result);
36 void OnError(ResolverError e, const std::string &errormessage)
38 ServerInstance->Log(DEFAULT,"Could not resolve IP associated with Link '%s': %s",MyLink.Name.c_str(),errormessage.c_str());