summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_spanningtree.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index 0da933000..80b5cc504 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -3429,6 +3429,22 @@ class TreeSocket : public InspSocket
{
sourceserv = this->InboundServerName;
}
+ if ((!who) && (command == "MODE"))
+ {
+ if (Utils->IsServer(prefix))
+ {
+ const char* modelist[127];
+ for (size_t i = 0; i < params.size(); i++)
+ modelist[i] = params[i].c_str();
+
+ userrec* fake = new userrec(Instance);
+ fake->SetFd(FD_MAGIC_NUMBER);
+
+ this->Instance->SendMode(modelist, params.size(), fake);
+
+ delete fake;
+ }
+ }
if (who)
{
if ((command == "NICK") && (params.size() > 0))
@@ -5138,6 +5154,13 @@ class ModuleSpanningTree : public Module
params->insert(params->begin() + 1,ConvToStr(ourTS));
Utils->DoOneToMany(ServerInstance->Config->ServerName,"FMODE",*params);
}
+ else if (event->GetEventID() == "send_mode_explicit")
+ {
+ if (params->size() < 2)
+ return;
+ // Insert the TS value of the object, either userrec or chanrec
+ Utils->DoOneToMany(ServerInstance->Config->ServerName,"MODE",*params);
+ }
else if (event->GetEventID() == "send_push")
{
if (params->size() < 2)