From e950f568d0f571e9475aa38177486468714de4d3 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Thu, 15 Aug 2013 16:15:26 +0200 Subject: m_spanningtree Remove SpanningTreeUtilities* fields and parameters --- src/modules/m_spanningtree/main.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/modules/m_spanningtree/main.cpp') diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 59e17f88e..a49383523 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -36,12 +36,12 @@ #include "protocolinterface.h" ModuleSpanningTree::ModuleSpanningTree() - : commands(NULL), DNS(this, "DNS"), Utils(NULL) + : commands(NULL), DNS(this, "DNS") { } SpanningTreeCommands::SpanningTreeCommands(ModuleSpanningTree* module) - : rconnect(module, module->Utils), rsquit(module, module->Utils), + : rconnect(module), rsquit(module), svsjoin(module), svspart(module), svsnick(module), metadata(module), uid(module), opertype(module), fjoin(module), ijoin(module), resync(module), fmode(module), ftopic(module), fhost(module), fident(module), fname(module) @@ -53,6 +53,7 @@ void ModuleSpanningTree::init() ServerInstance->SNO->EnableSnomask('l', "LINK"); Utils = new SpanningTreeUtilities(this); + Utils->TreeRoot = new TreeServer; commands = new SpanningTreeCommands(this); ServerInstance->Modules->AddService(commands->rconnect); ServerInstance->Modules->AddService(commands->rsquit); @@ -275,7 +276,7 @@ void ModuleSpanningTree::ConnectServer(Link* x, Autoconnect* y) if (ipvalid) { /* Gave a hook, but it wasnt one we know */ - TreeSocket* newsocket = new TreeSocket(Utils, x, y, x->IPAddr); + TreeSocket* newsocket = new TreeSocket(x, y, x->IPAddr); if (newsocket->GetFd() > -1) { /* Handled automatically on success */ @@ -293,7 +294,7 @@ void ModuleSpanningTree::ConnectServer(Link* x, Autoconnect* y) } else { - ServernameResolver* snr = new ServernameResolver(Utils, *DNS, x->IPAddr, x, start_type, y); + ServernameResolver* snr = new ServernameResolver(*DNS, x->IPAddr, x, start_type, y); try { DNS->Process(snr); -- cgit v1.2.3