/* 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);