]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
m_spanningtree Fix desync issue #37 reported by @Joah - part 2
authorattilamolnar <attilamolnar@hush.com>
Thu, 31 May 2012 18:09:24 +0000 (20:09 +0200)
committerattilamolnar <attilamolnar@hush.com>
Thu, 31 May 2012 18:09:24 +0000 (20:09 +0200)
src/modules/m_spanningtree/postcommand.cpp

index 6afe8e2c9c1fe808adf9176a7c26037b0a8a1206..b08f60925007da5be065c65758a16eed062a153b 100644 (file)
@@ -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)
        {