X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fresolvers.h;h=5d4386c4b2c276f5931fb34d244e292da27aafc8;hb=dbf4d595433ecefeb61f1267ffa515a91c3ab548;hp=0b82bfd99c1c85c108f9b5932d55b88e68112cca;hpb=192fa7d3138ccb5929dc9af8de3395d6ea25619c;p=user%2Fhenk%2Fcode%2Finspircd.git
diff --git a/src/modules/m_spanningtree/resolvers.h b/src/modules/m_spanningtree/resolvers.h
index 0b82bfd99..5d4386c4b 100644
--- a/src/modules/m_spanningtree/resolvers.h
+++ b/src/modules/m_spanningtree/resolvers.h
@@ -14,12 +14,9 @@
#ifndef __RESOLVERS__H__
#define __RESOLVERS__H__
-#include "commands/cmd_whois.h"
-#include "commands/cmd_stats.h"
#include "socket.h"
#include "inspircd.h"
#include "xline.h"
-#include "../transport.h"
#include "utils.h"
#include "link.h"
@@ -29,14 +26,14 @@
class SecurityIPResolver : public Resolver
{
private:
- Link MyLink;
+ reference MyLink;
SpanningTreeUtilities* Utils;
Module* mine;
std::string host;
QueryType query;
public:
- SecurityIPResolver(Module* me, SpanningTreeUtilities* U, InspIRCd* Instance, const std::string &hostname, Link x, bool &cached, QueryType qt)
- : Resolver(Instance, hostname, qt, cached, me), MyLink(x), Utils(U), mine(me), host(hostname), query(qt)
+ SecurityIPResolver(Module* me, SpanningTreeUtilities* U, const std::string &hostname, Link* x, bool &cached, QueryType qt)
+ : Resolver(hostname, qt, cached, me), MyLink(x), Utils(U), mine(me), host(hostname), query(qt)
{
}
@@ -50,11 +47,12 @@ class SecurityIPResolver : public Resolver
if (query == DNS_QUERY_AAAA)
{
bool cached;
- SecurityIPResolver* res = new SecurityIPResolver(mine, Utils, ServerInstance, host, MyLink, cached, DNS_QUERY_A);
+ SecurityIPResolver* res = new SecurityIPResolver(mine, Utils, host, MyLink, cached, DNS_QUERY_A);
ServerInstance->AddResolver(res, cached);
return;
}
- ServerInstance->Logs->Log("m_spanningtree",DEFAULT,"Could not resolve IP associated with Link '%s': %s",MyLink.Name.c_str(),errormessage.c_str());
+ ServerInstance->Logs->Log("m_spanningtree",DEFAULT,"Could not resolve IP associated with Link '%s': %s",
+ MyLink->Name.c_str(),errormessage.c_str());
}
};
@@ -67,19 +65,15 @@ class SecurityIPResolver : public Resolver
class ServernameResolver : public Resolver
{
private:
- /** A copy of the Link tag info for what we're connecting to.
- * We take a copy, rather than using a pointer, just in case the
- * admin takes the tag away and rehashes while the domain is resolving.
- */
- Link MyLink;
- SpanningTreeUtilities* Utils;
+ SpanningTreeUtilities* Utils;
QueryType query;
std::string host;
- Module* mine;
+ reference MyLink;
+ reference myautoconnect;
public:
- ServernameResolver(Module* me, SpanningTreeUtilities* Util, InspIRCd* Instance, const std::string &hostname, Link x, bool &cached, QueryType qt);
- void OnLookupComplete(const std::string &result, unsigned int ttl, bool cached);
- void OnError(ResolverError e, const std::string &errormessage);
+ ServernameResolver(SpanningTreeUtilities* Util, const std::string &hostname, Link* x, bool &cached, QueryType qt, Autoconnect* myac);
+ void OnLookupComplete(const std::string &result, unsigned int ttl, bool cached);
+ void OnError(ResolverError e, const std::string &errormessage);
};
#endif