#include "treesocket.h"
#include "resolvers.h"
+SpanningTreeUtilities* Utils = NULL;
+
/* Create server sockets off a listener. */
ModResult ModuleSpanningTree::OnAcceptConnection(int newsock, ListenSocket* from, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* server)
{
if (*i == "*" || *i == incomingip || irc::sockets::cidr_mask(*i).match(*client))
{
/* we don't need to do anything with the pointer, creating it stores it in the necessary places */
- new TreeSocket(Utils, newsock, from, client, server);
+ new TreeSocket(newsock, from, client, server);
return MOD_RES_ALLOW;
}
}
}
SpanningTreeUtilities::SpanningTreeUtilities(ModuleSpanningTree* C)
- : RefreshTimer(this), Creator(C)
+ : Creator(C), TreeRoot(NULL)
{
ServerInstance->Timers->AddTimer(&RefreshTimer);
- this->TreeRoot = new TreeServer(this);
this->ReadConfiguration();
}
ValidIPs.push_back(L->IPAddr);
else if (this->Creator->DNS)
{
- SecurityIPResolver* sr = new SecurityIPResolver(Creator, this, *this->Creator->DNS, L->IPAddr, L, DNS::QUERY_AAAA);
+ SecurityIPResolver* sr = new SecurityIPResolver(Creator, *this->Creator->DNS, L->IPAddr, L, DNS::QUERY_AAAA);
try
{
this->Creator->DNS->Process(sr);