From c5d1e3bcb7afc68ba20f85c4e530b29a56bee57b Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 12 Nov 2006 15:41:43 +0000 Subject: Allow normal MODE from a server prefix git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5704 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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) -- cgit v1.2.3