- std::deque<std::string> param_list;
- if (Utils->AnnounceTSChange && chan)
- chan->WriteChannelWithServ(Instance->Config->ServerName, "NOTICE %s :TS for %s changed from %lu to %lu", chan->name, chan->name, (unsigned long) ourTS, (unsigned long) TS);
- ourTS = TS;
- if (!created)
+ chan = new Channel(channel, TS);
+ ServerInstance->SNO->WriteToSnoMask('d', "Creation FJOIN received for %s, timestamp: %lu", chan->name.c_str(), (unsigned long)TS);
+ }
+ else
+ {
+ time_t ourTS = chan->age;
+
+ if (TS != ourTS)
+ ServerInstance->SNO->WriteToSnoMask('d', "Merge FJOIN received for %s, ourTS: %lu, TS: %lu, difference: %lu",
+ chan->name.c_str(), (unsigned long)ourTS, (unsigned long)TS, (unsigned long)(ourTS - TS));
+ /* If our TS is less than theirs, we dont accept their modes */
+ if (ourTS < TS)
+ {
+ ServerInstance->SNO->WriteToSnoMask('d', "NOT Applying modes from other side");
+ apply_other_sides_modes = false;
+ }
+ else if (ourTS > TS)