From f658270c83cbd99196c3a233ccab60fa8de6e806 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Wed, 13 Mar 2013 16:41:44 +0100 Subject: m_spanningtree Fix incoming channel modes being lost for 0-user permanent channels on the losing side of a netmerge This did not affect listmodes --- src/modules/m_spanningtree/fjoin.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/modules/m_spanningtree/fjoin.cpp b/src/modules/m_spanningtree/fjoin.cpp index 71d837b28..c0475613a 100644 --- a/src/modules/m_spanningtree/fjoin.cpp +++ b/src/modules/m_spanningtree/fjoin.cpp @@ -106,6 +106,14 @@ CmdResult CommandFJoin::Handle(const std::vector& params, User *src chan->ClearInvites(); param_list.push_back(channel); this->RemoveStatus(ServerInstance->FakeClient, param_list); + + // XXX: If the channel does not exist in the chan hash at this point, create it so the remote modes can be applied on it. + // This happens to 0-user permanent channels on the losing side, because those are removed (from the chan hash, then + // deleted later) as soon as the permchan mode is removed from them. + if (ServerInstance->FindChan(channel) == NULL) + { + chan = new Channel(channel, TS); + } } // The silent case here is ourTS == TS, we don't need to remove modes here, just to merge them later on. } -- cgit v1.2.3