]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Use the remote channel's capitalization on a losing TS merge
authorDaniel De Graaf <danieldg@inspircd.org>
Wed, 4 Aug 2010 01:05:10 +0000 (21:05 -0400)
committerDaniel De Graaf <danieldg@inspircd.org>
Wed, 4 Aug 2010 01:05:37 +0000 (21:05 -0400)
src/modules/m_spanningtree/fjoin.cpp

index be32410ef7d55e7afbd1f604a8fedc890616605f..ea217b398e044e154e6c06ae5e9b7a0783ff5671 100644 (file)
@@ -91,9 +91,11 @@ CmdResult CommandFJoin::Handle(const std::vector<std::string>& params, User *src
                        /* Our TS greater than theirs, clear all our modes from the channel, accept theirs. */
                        ServerInstance->SNO->WriteToSnoMask('d', "Removing our modes, accepting remote");
                        parameterlist param_list;
-                       if (Utils->AnnounceTSChange && chan)
-                               chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :TS for %s changed from %lu to %lu", chan->name.c_str(), chan->name.c_str(), (unsigned long) ourTS, (unsigned long) TS);
+                       if (Utils->AnnounceTSChange)
+                               chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :TS for %s changed from %lu to %lu", chan->name.c_str(), channel.c_str(), (unsigned long) ourTS, (unsigned long) TS);
                        ourTS = TS;
+                       // while the name is equal in case-insensitive compare, it might differ in case; use the remote version
+                       chan->name = channel;
                        chan->age = TS;
                        param_list.push_back(channel);
                        this->RemoveStatus(ServerInstance->FakeClient, param_list);