summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-25 17:09:19 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-25 17:09:19 +0000
commit94b92f6ea5be0ed5939ea705ba3cec2cf54dbe9a (patch)
tree93c84cac4296bd6c404ad79e4abb00515ab3e8e5 /src/modules
parent7161d05543bac9e75b5cf1ab71af940455dbe0f3 (diff)
Add send_topic event, lets you send a topic for a channel, set by a server
(internally this translates as FTOPIC in this protocol) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5322 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_spanningtree.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 77d09ae3e..2651b4f90 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -4821,17 +4821,26 @@ class ModuleSpanningTree : public Module
virtual void OnEvent(Event* event)
{
+ std::deque<std::string>* params = (std::deque<std::string>*)event->GetData();
+
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(ServerInstance->Config->ServerName,"METADATA",*params);
}
+ else if (event->GetEventID() == "send_topic")
+ {
+ if (params->size() < 2)
+ return;
+ (*params)[1] = ":" + (*params)[1];
+ params->insert(params->begin() + 1,ServerInstance->Config->ServerName);
+ params->insert(params->begin() + 1,ConvToStr(ServerInstance->Time()));
+ DoOneToMany(ServerInstance->Config->ServerName,"FTOPIC",*params);
+ }
else if (event->GetEventID() == "send_mode")
{
- std::deque<std::string>* params = (std::deque<std::string>*)event->GetData();
if (params->size() < 2)
return;
// Insert the TS value of the object, either userrec or chanrec