From 72abc79581db0f4c9d76594e084c10a5d726b17f Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Mon, 11 Jun 2012 19:24:03 +0200 Subject: m_spanningtree Fix desync issue #37 reported by @Joah --- src/modules/m_spanningtree/postcommand.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/modules/m_spanningtree/postcommand.cpp') diff --git a/src/modules/m_spanningtree/postcommand.cpp b/src/modules/m_spanningtree/postcommand.cpp index a0c38c8c6..769069f95 100644 --- a/src/modules/m_spanningtree/postcommand.cpp +++ b/src/modules/m_spanningtree/postcommand.cpp @@ -53,15 +53,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) { -- cgit v1.3.1-10-gc9f91