From c35089b8cfd108ccfb85077f74236e704ba7cf55 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Fri, 13 Jun 2014 15:59:37 +0200 Subject: Make the default ProtocolInterface instance part of class InspIRCd The protocol module no longer has to delete it on load and construct it on unload, only assign a new value to ServerInstance->PI --- src/modules/m_spanningtree/main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 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 8f0586923..2ab05e014 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -86,7 +86,6 @@ void ModuleSpanningTree::init() Utils->TreeRoot = new TreeServer; commands = new SpanningTreeCommands(this); - delete ServerInstance->PI; ServerInstance->PI = &protocolinterface; delete ServerInstance->FakeClient->server; @@ -758,7 +757,7 @@ CullResult ModuleSpanningTree::cull() ModuleSpanningTree::~ModuleSpanningTree() { - ServerInstance->PI = new ProtocolInterface; + ServerInstance->PI = &ServerInstance->DefaultProtocolInterface; Server* newsrv = new Server(ServerInstance->Config->ServerName, ServerInstance->Config->ServerDesc); SetLocalUsersServer(newsrv); -- cgit v1.2.3