From e071bd88391e00e4d3b0104ada985e08a9eb3210 Mon Sep 17 00:00:00 2001 From: danieldg Date: Sat, 6 Feb 2010 04:08:18 +0000 Subject: Send module load/unload notifications so that services can learn of new features without splitting git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12382 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/main.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/modules/m_spanningtree') diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 9026d9d02..0c221a9f4 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -743,12 +743,21 @@ void ModuleSpanningTree::OnRehash(User* user) void ModuleSpanningTree::OnLoadModule(Module* mod) { - // TODO notify other servers? + std::string data; + data.push_back('+'); + data.append(mod->ModuleSourceFile); + Version v = mod->GetVersion(); + if (!v.link_data.empty()) + { + data.push_back('='); + data.append(v.link_data); + } + ServerInstance->PI->SendMetaData(NULL, "modules", data); } void ModuleSpanningTree::OnUnloadModule(Module* mod) { - // TODO notify other servers? + ServerInstance->PI->SendMetaData(NULL, "modules", "-" + mod->ModuleSourceFile); unsigned int items = Utils->TreeRoot->ChildCount(); for(unsigned int x = 0; x < items; x++) -- cgit v1.2.3