summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-30 22:20:06 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-30 22:20:06 +0000
commit0fff50fdd786eb1a3ca0ab69cbaa73dac21f385d (patch)
tree9aa417a1143af240d448577e9cea39071505d8e1 /src/modules/m_spanningtree.cpp
parentba405e61c71f2c2f45d5ea4ef34569c7ce6114b6 (diff)
Added new event into m_spanningtree, event id send_metadata, which allows arbitary posting of metadata outside of the netburst
see line 529 of m_ssl_gnutls for an example of how to use it. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2990 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree.cpp')
-rw-r--r--src/modules/m_spanningtree.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 747bcd7b7..da617c871 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -3251,6 +3251,18 @@ class ModuleSpanningTree : public Module
}
}
+ virtual void OnEvent(Event* event)
+ {
+ if (event->GetEventID() == "send_metadata")
+ {
+ std::deque<std::string>* params = (std::deque<std::string>*)event->GetData();
+ if (params->size() < 3)
+ return;
+ (*params)[2] = ":" + (*params)[2];
+ DoOneToMany(Srv->GetServerName(),"METADATA ",*params);
+ }
+ }
+
virtual ~ModuleSpanningTree()
{
}
@@ -3268,7 +3280,7 @@ class ModuleSpanningTree : public Module
List[I_OnUserQuit] = List[I_OnUserPostNick] = List[I_OnUserKick] = List[I_OnRemoteKill] = List[I_OnRehash] = 1;
List[I_OnOper] = List[I_OnAddGLine] = List[I_OnAddZLine] = List[I_OnAddQLine] = List[I_OnAddELine] = 1;
List[I_OnDelGLine] = List[I_OnDelZLine] = List[I_OnDelQLine] = List[I_OnDelELine] = List[I_ProtoSendMode] = List[I_OnMode] = 1;
- List[I_OnStats] = List[I_ProtoSendMetaData] = 1;
+ List[I_OnStats] = List[I_ProtoSendMetaData] = List[I_OnEvent] = 1;
}
/* It is IMPORTANT that m_spanningtree is the last module in the chain