...even if they aren't in the channel. In TNGameServer.cs when processing Packet.RequestSetChannelData
// Forward the packet to everyone in this channel
for (int i = 0; i < mPlayerList.size; ++i)
{
TcpPlayer tp = mPlayerList[i];
tp.SendTcpPacket(buffer);
}
Should be more like this:
// Forward the packet to everyone in this channel
for (int i = 0; i < mPlayerList.size; ++i)
{
TcpPlayer tp = mPlayerList[i];
// Don't send it back to the player that made the request
if( player == tp )
continue;
// Only send to players in this channel
if( tp.IsInChannel(ch.id) == false )
continue;
tp.SendTcpPacket(buffer);
}
It is handled client side (ignored), but can show up in a race condition when connecting. You could get a ResponseSetChannelData before ResponseID which causes the connection to fail. I haven't seen that happen, but it happened to a different custom packet that follows the same logic.