summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
authorRobin Burchell <viroteck@viroteck.net>2012-06-01 01:07:36 -0700
committerRobin Burchell <viroteck@viroteck.net>2012-06-01 01:07:36 -0700
commit3af9c3f8950f864bcf9cdd56127cd4014827dece (patch)
tree4462b3d8f34171527d5dc9f7d9df15f6262fea52 /src/modules/m_spanningtree
parenteb591031a2403e53829d146ed8cf18acdf004ed7 (diff)
parent0428951093c38d0c3ba1ae69b8167be51a02236b (diff)
Merge pull request #179 from attilamolnar/insp20+desyncfix
[2.0] Fix desyncs caused by m_autoop and broken spanningtree routing logic
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/postcommand.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/m_spanningtree/postcommand.cpp b/src/modules/m_spanningtree/postcommand.cpp
index 6afe8e2c9..b08f60925 100644
--- a/src/modules/m_spanningtree/postcommand.cpp
+++ b/src/modules/m_spanningtree/postcommand.cpp
@@ -52,15 +52,15 @@ void SpanningTreeUtilities::RouteCommand(TreeServer* origin, const std::string &
if (routing.type == ROUTE_TYPE_LOCALONLY)
{
- Module* srcmodule = thiscmd->creator;
- Version ver = srcmodule->GetVersion();
+ /* Broadcast when it's a core command with the default route descriptor and the source is a
+ * remote user or a remote server
+ */
- if ((ver.Flags & VF_CORE) && !IS_LOCAL(user))
- routing = ROUTE_BROADCAST;
- else
- return;
- if (IS_SERVER(user) && user != ServerInstance->FakeClient)
+ Version ver = thiscmd->creator->GetVersion();
+ if ((!(ver.Flags & VF_CORE)) || (IS_LOCAL(user)) || (IS_SERVER(user) == ServerInstance->FakeClient))
return;
+
+ routing = ROUTE_BROADCAST;
}
else if (routing.type == ROUTE_TYPE_OPT_BCAST)
{