From: attilamolnar Date: Thu, 31 May 2012 18:09:24 +0000 (+0200) Subject: m_spanningtree Fix desync issue #37 reported by @Joah - part 2 X-Git-Tag: v2.0.23~717^2 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=0428951093c38d0c3ba1ae69b8167be51a02236b;p=user%2Fhenk%2Fcode%2Finspircd.git m_spanningtree Fix desync issue #37 reported by @Joah - part 2 --- 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) {