summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_spanningtree/main.cpp4
-rw-r--r--src/modules/m_spanningtree/main.h5
-rw-r--r--src/modules/m_spanningtree/netburst.cpp1
3 files changed, 6 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 45f219286..8f0586923 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -33,7 +33,6 @@
#include "link.h"
#include "treesocket.h"
#include "commands.h"
-#include "protocolinterface.h"
ModuleSpanningTree::ModuleSpanningTree()
: rconnect(this), rsquit(this), map(this)
@@ -88,7 +87,7 @@ void ModuleSpanningTree::init()
commands = new SpanningTreeCommands(this);
delete ServerInstance->PI;
- ServerInstance->PI = new SpanningTreeProtocolInterface;
+ ServerInstance->PI = &protocolinterface;
delete ServerInstance->FakeClient->server;
SetLocalUsersServer(Utils->TreeRoot);
@@ -759,7 +758,6 @@ CullResult ModuleSpanningTree::cull()
ModuleSpanningTree::~ModuleSpanningTree()
{
- delete ServerInstance->PI;
ServerInstance->PI = new ProtocolInterface;
Server* newsrv = new Server(ServerInstance->Config->ServerName, ServerInstance->Config->ServerDesc);
diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h
index 7fb2c6701..da94cb877 100644
--- a/src/modules/m_spanningtree/main.h
+++ b/src/modules/m_spanningtree/main.h
@@ -27,6 +27,7 @@
#include "modules/dns.h"
#include "servercommand.h"
#include "commands.h"
+#include "protocolinterface.h"
/** If you make a change which breaks the protocol, increment this.
* If you completely change the protocol, completely change the number.
@@ -67,6 +68,10 @@ class ModuleSpanningTree : public Module
*/
Membership::Id currmembid;
+ /** The specialized ProtocolInterface that is assigned to ServerInstance->PI on load
+ */
+ SpanningTreeProtocolInterface protocolinterface;
+
public:
dynamic_reference<DNS::Manager> DNS;
diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp
index 093ab89eb..2703ad0f0 100644
--- a/src/modules/m_spanningtree/netburst.cpp
+++ b/src/modules/m_spanningtree/netburst.cpp
@@ -27,7 +27,6 @@
#include "treeserver.h"
#include "main.h"
#include "commands.h"
-#include "protocolinterface.h"
/**
* Creates FMODE messages, used only when syncing channels