summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/resolvers.h
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-01-18 20:56:11 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-01-18 20:56:11 +0000
commitbf65e9dc25b9e52dc1f84a6e24157bdaf8d39d5c (patch)
treeceb704bea4eae3c37fad7ea9577d044a54d98543 /src/modules/m_spanningtree/resolvers.h
parent8265557b341080244b3057040f094f05e7727155 (diff)
Add all this crapola
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6385 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree/resolvers.h')
-rw-r--r--src/modules/m_spanningtree/resolvers.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/resolvers.h b/src/modules/m_spanningtree/resolvers.h
new file mode 100644
index 000000000..dd7a9a215
--- /dev/null
+++ b/src/modules/m_spanningtree/resolvers.h
@@ -0,0 +1,43 @@
+#ifndef __RESOLVERS__H__
+#define __RESOLVERS__H__
+
+#include "configreader.h"
+#include "users.h"
+#include "channels.h"
+#include "modules.h"
+#include "commands/cmd_whois.h"
+#include "commands/cmd_stats.h"
+#include "socket.h"
+#include "inspircd.h"
+#include "wildcard.h"
+#include "xline.h"
+#include "transport.h"
+
+#include "m_spanningtree/utils.h"
+
+/** Handle resolving of server IPs for the cache
+ */
+class SecurityIPResolver : public Resolver
+{
+ private:
+ Link MyLink;
+ SpanningTreeUtilities* Utils;
+ public:
+ SecurityIPResolver(Module* me, SpanningTreeUtilities* U, InspIRCd* Instance, const std::string &hostname, Link x, bool &cached) : Resolver(Instance, hostname, DNS_QUERY_FORWARD, cached, me),
+MyLink(x),
+ Utils(U)
+ {
+ }
+
+ void OnLookupComplete(const std::string &result, unsigned int ttl, bool cached)
+ {
+ Utils->ValidIPs.push_back(result);
+ }
+
+ void OnError(ResolverError e, const std::string &errormessage)
+ {
+ ServerInstance->Log(DEFAULT,"Could not resolve IP associated with Link '%s': %s",MyLink.Name.c_str(),errormessage.c_str());
+ }
+};
+
+#endif