diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-11-16 17:59:06 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-11-16 17:59:06 +0000 |
commit | 54fb0cd5aa7d090d5c3da5ab54988c86ba8a2e8e (patch) | |
tree | bc20ce6dca41b2d16349ae4c8212861c10e3685e /src/modules/m_spanningtree/main.cpp | |
parent | 3bfd0db65ff01c026e968af4de074cc1155a4061 (diff) |
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
Diffstat (limited to 'src/modules/m_spanningtree/main.cpp')
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 20 |
1 files changed, 2 insertions, 18 deletions
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(); } |