InspSocketHookRequest(this, (Module*)Utils->Creator, Hook).Send();
}
-TreeSocket::TreeSocket(SpanningTreeUtilities* Util, InspIRCd* SI, std::string host, int port, bool listening, unsigned long maxtime, std::string ServerName, Module* HookMod)
- : InspSocket(SI, host, port, listening, maxtime), Utils(Util), Hook(HookMod)
+TreeSocket::TreeSocket(SpanningTreeUtilities* Util, InspIRCd* SI, std::string host, int port, bool listening, unsigned long maxtime, const std::string &ServerName, const std::string &bindto, Module* HookMod)
+ : InspSocket(SI, host, port, listening, maxtime, bindto), Utils(Util), Hook(HookMod)
{
myhost = ServerName;
this->LinkState = CONNECTING;
who = this->Instance->FindNick(usr);
if (who)
{
- /* Did they get any modes? How many times? */
- strlcat(modestring, nm, MAXBUF);
- for (int k = 0; k < ntimes; k++)
- mode_users[modectr++] = strdup(usr);
- /* Free temporary buffer used for mode sequence */
- delete[] nm;
/* Check that the user's 'direction' is correct
* based on the server sending the FJOIN. We must
* check each nickname in turn, because the origin of
if ((!route_back_again) || (route_back_again->GetSocket() != this))
{
/* Oh dear oh dear. */
+ delete[] nm;
continue;
}
+
+ /* NOTE: Moved this below the fake direction check, so that modes
+ * arent put into the mode list for users that were collided, and
+ * may reconnect from the other side or our side before the split
+ * is completed!
+ */
+
+ /* Did they get any modes? How many times? */
+ strlcat(modestring, nm, MAXBUF);
+ for (int k = 0; k < ntimes; k++)
+ mode_users[modectr++] = strdup(usr);
+ /* Free temporary buffer used for mode sequence */
+ delete[] nm;
+
/* Finally, we can actually place the user into the channel.
* We're sure its right. Final answer, phone a friend.
*/
* in case somehow we're desynched, so that other users which might be able to see
* the nickname get their fair chance to process it.
*/
- Instance->Log(SPARSE,"Warning! Invalid user in FJOIN to channel %s IGNORED", channel.c_str());
+ Instance->Log(SPARSE,"Warning! Invalid user %s in FJOIN to channel %s IGNORED", usr, channel.c_str());
continue;
}
}