* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2008 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ * InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
*
* This program is free but copyrighted software; see
* the file COPYING for details.
if (created)
{
- ServerInstance->SNO->WriteToSnoMask('d', "Creation FJOIN recieved for %s, timestamp: %lu", chan->name.c_str(), (unsigned long)TS);
chan = new Channel(ServerInstance, channel, TS);
+ ServerInstance->SNO->WriteToSnoMask('d', "Creation FJOIN recieved for %s, timestamp: %lu", chan->name.c_str(), (unsigned long)TS);
}
else
{
time_t ourTS = chan->age;
- ServerInstance->SNO->WriteToSnoMask('d', "Merge FJOIN recieved for %s, ourTS: %lu, TS: %lu", chan->name.c_str(), (unsigned long)TS, (unsigned long)TS);
+ if (TS != ourTS)
+ ServerInstance->SNO->WriteToSnoMask('d', "Merge FJOIN recieved 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)
{
/* First up, apply their modes if they won the TS war */
if (apply_other_sides_modes)
{
- ServerInstance->SNO->WriteToSnoMask('d', "Applying remote modestring for %s", params[0]);
unsigned int idx = 2;
std::vector<std::string> modelist;
modelist.push_back(params[idx]);
}
- this->ServerInstance->SendMode(modelist, this->ServerInstance->FakeClient);
+ this->ServerInstance->SendMode(modelist, Utils->ServerUser);
}
/* Now, process every 'modes,nick' pair */
for (std::string::iterator x = modes.begin(); x != modes.end(); ++x)
modestack.Push(*x, who->nick);
- Channel::JoinUser(this->ServerInstance, who, channel.c_str(), true, "", true, TS);
+ Channel::JoinUser(this->ServerInstance, who, channel.c_str(), true, "", route_back_again->bursting, TS);
}
else
{
while (modestack.GetStackedLine(stackresult))
{
- for (size_t j = 0; j < stackresult.size(); j++)
- {
- mode_junk.push_back(stackresult[j]);
- }
- ServerInstance->SendMode(mode_junk, ServerInstance->FakeClient);
+ mode_junk.insert(mode_junk.end(), stackresult.begin(), stackresult.end());
+ ServerInstance->SendMode(mode_junk, Utils->ServerUser);
+ mode_junk.erase(mode_junk.begin() + 1, mode_junk.end());
}
}
while (stack.GetStackedLine(stackresult))
{
- for (size_t j = 0; j < stackresult.size(); j++)
- mode_junk.push_back(stackresult[j]);
-
- ServerInstance->SendMode(mode_junk, ServerInstance->FakeClient);
+ mode_junk.insert(mode_junk.end(), stackresult.begin(), stackresult.end());
+ ServerInstance->SendMode(mode_junk, Utils->ServerUser);
+ mode_junk.erase(mode_junk.begin() + 1, mode_junk.end());
}
}
return true;