diff options
author | Robin Burchell <viroteck@viroteck.net> | 2012-06-01 01:07:36 -0700 |
---|---|---|
committer | Robin Burchell <viroteck@viroteck.net> | 2012-06-01 01:07:36 -0700 |
commit | 3af9c3f8950f864bcf9cdd56127cd4014827dece (patch) | |
tree | 4462b3d8f34171527d5dc9f7d9df15f6262fea52 /src | |
parent | eb591031a2403e53829d146ed8cf18acdf004ed7 (diff) | |
parent | 0428951093c38d0c3ba1ae69b8167be51a02236b (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')
-rw-r--r-- | src/modules/m_autoop.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_spanningtree/postcommand.cpp | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/modules/m_autoop.cpp b/src/modules/m_autoop.cpp index f239773e9..40a57d7c3 100644 --- a/src/modules/m_autoop.cpp +++ b/src/modules/m_autoop.cpp @@ -119,7 +119,7 @@ public: for(std::string::size_type i = modeline.length(); i > 1; --i) // we use "i > 1" instead of "i" so we skip the + modechange.push_back(memb->user->nick); if(modechange.size() >= 3) - ServerInstance->SendMode(modechange,ServerInstance->FakeClient); + ServerInstance->SendGlobalMode(modechange, ServerInstance->FakeClient); } } 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) { |