summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-12 15:41:43 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-12 15:41:43 +0000
commitc5d1e3bcb7afc68ba20f85c4e530b29a56bee57b (patch)
treeb851a92d7417f22ce9247f17e310d50d7f8f43ce /src/modules/m_spanningtree.cpp
parent199a7e055c62703eec7358f2736cf35d626a4066 (diff)
Allow normal MODE from a server prefix
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5704 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree.cpp')
-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)