From 54fb0cd5aa7d090d5c3da5ab54988c86ba8a2e8e Mon Sep 17 00:00:00 2001 From: danieldg Date: Mon, 16 Nov 2009 17:59:06 +0000 Subject: Use ServiceProvider for inter-module dependencies This will stop dependency chains from preventing module reloads when it is not actually needed; however, it removes some failsafes that will need to be reimplemented in order to avoid unmapped vtables. This deprecates Request as an inter-module signaling mechanism, although SQL still uses it. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12140 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/main.cpp | 20 ++------------------ 1 file changed, 2 insertions(+), 18 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 fe2cfe9b6..0ed9b28ac 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -33,7 +33,6 @@ ModuleSpanningTree::ModuleSpanningTree() : max_local(0), max_global(0) { - ServerInstance->Modules->UseInterface("BufferedSocketHook"); Utils = new SpanningTreeUtilities(this); command_rconnect = new CommandRConnect(this, Utils); ServerInstance->AddCommand(command_rconnect); @@ -781,30 +780,16 @@ void ModuleSpanningTree::OnRehash(User* user) void ModuleSpanningTree::OnLoadModule(Module* mod) { - this->RedoConfig(mod); + // TODO notify other servers? } void ModuleSpanningTree::OnUnloadModule(Module* mod) { - this->RedoConfig(mod); + // TODO notify other servers? } void ModuleSpanningTree::RedoConfig(Module* mod) { - /* If m_sha256.so is loaded (we use this for HMAC) or any module implementing a BufferedSocket interface is loaded, - * then we need to re-read our config again taking this into account. - */ - modulelist* ml = ServerInstance->Modules->FindInterface("BufferedSocketHook"); - bool IsBufferSocketModule = false; - - /* Did we find any modules? */ - if (ml && std::find(ml->begin(), ml->end(), mod) != ml->end()) - IsBufferSocketModule = true; - - if (mod->ModuleSourceFile == "m_sha256.so" || IsBufferSocketModule) - { - Utils->ReadConfiguration(); - } } // note: the protocol does not allow direct umode +o except @@ -955,7 +940,6 @@ CullResult ModuleSpanningTree::cull() { Utils->cull(); ServerInstance->Timers->DelTimer(RefreshTimer); - ServerInstance->Modules->DoneWithInterface("BufferedSocketHook"); return this->Module::cull(); } -- cgit v1.3.1-10-gc9f91