summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-06 04:08:18 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-06 04:08:18 +0000
commite071bd88391e00e4d3b0104ada985e08a9eb3210 (patch)
tree874565a76d291e639ef78c92cf37deda9a584505 /src
parentd560adec9e578c40f786a0849e3a15f99e738b56 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree/main.cpp13
1 files changed, 11 insertions, 2 deletions
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++)