X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Ffjoin.cpp;h=0879e730a0551616533178ebfab4ce0ff798fc8b;hb=2c51a2bf17b6c377f0207f3d89b4b3f399fc0178;hp=25c1f66781f5716b1eabbbbe790f0fd8e5622cf1;hpb=0ec19b7ac91eedc83b31c3da733e237bfe28fc48;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/fjoin.cpp b/src/modules/m_spanningtree/fjoin.cpp index 25c1f6678..0879e730a 100644 --- a/src/modules/m_spanningtree/fjoin.cpp +++ b/src/modules/m_spanningtree/fjoin.cpp @@ -129,8 +129,8 @@ CmdResult CommandFJoin::Handle(User* srcuser, std::vector& params) 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)); + ServerInstance->SNO->WriteToSnoMask('d', "Merge FJOIN received for %s, ourTS: %lu, TS: %lu, difference: %ld", + chan->name.c_str(), (unsigned long)ourTS, (unsigned long)TS, (long)(ourTS - TS)); /* If our TS is less than theirs, we dont accept their modes */ if (ourTS < TS) { @@ -152,7 +152,7 @@ CmdResult CommandFJoin::Handle(User* srcuser, std::vector& params) } } - /* First up, apply their channel modes if they won the TS war */ + // Apply their channel modes if we have to Modes::ChangeList modechangelist; if (apply_other_sides_modes) { @@ -168,7 +168,7 @@ CmdResult CommandFJoin::Handle(User* srcuser, std::vector& params) // after applying theirs. If they lost, the prefix modes from their message are not forwarded. FwdFJoinBuilder fwdfjoin(chan, sourceserver); - /* Now, process every 'modes,uuid' pair */ + // Process every member in the message irc::tokenstream users(params.back()); std::string item; Modes::ChangeList* modechangelistptr = (apply_other_sides_modes ? &modechangelist : NULL); @@ -256,10 +256,7 @@ void CommandFJoin::RemoveStatus(Channel* c) { ModeHandler* mh = i->second; - /* Passing a pointer to a modestacker here causes the mode to be put onto the mode stack, - * rather than applied immediately. Module unloads require this to be done immediately, - * for this function we require tidyness instead. Fixes bug #493 - */ + // Add the removal of this mode to the changelist. This handles all kinds of modes, including prefix modes. mh->RemoveMode(c, changelist); } @@ -275,9 +272,6 @@ void CommandFJoin::LowerTS(Channel* chan, time_t TS, const std::string& newname) chan->name = newname; chan->age = TS; - // Remove all pending invites - chan->ClearInvites(); - // Clear all modes CommandFJoin::RemoveStatus(chan);