diff options
author | attilamolnar <attilamolnar@hush.com> | 2012-05-31 20:09:24 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2012-05-31 20:09:24 +0200 |
commit | 0428951093c38d0c3ba1ae69b8167be51a02236b (patch) | |
tree | 56d52c7460cfa8ee6a0a9c02191a7290140c8789 | |
parent | 1debdd986a562c2dc4053c7ade8b6c5fdf567e73 (diff) |
m_spanningtree Fix desync issue #37 reported by @Joah - part 2
-rw-r--r-- | src/modules/m_spanningtree/postcommand.cpp | 14 |
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) { |