diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-03-13 16:41:44 +0100 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-03-20 18:23:44 +0100 |
commit | f658270c83cbd99196c3a233ccab60fa8de6e806 (patch) | |
tree | 0fbbf3945e2d85ebb694d664485f9bfc32483cb1 /src/modules/m_spanningtree | |
parent | 31de5a7e8f3ed680df6293f96f6b52c1c3a345ef (diff) |
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
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r-- | src/modules/m_spanningtree/fjoin.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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<std::string>& 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. } |