Fixing issue #135: Double game invite no longer leads to kick (server side fix).

This commit is contained in:
lotodore
2012-06-08 21:21:44 +02:00
parent 4170a9a722
commit 546f8c7ab5
+4 -2
View File
@@ -1448,8 +1448,10 @@ ServerLobbyThread::HandleNetPacketRejectGameInvitation(boost::shared_ptr<Session
ServerGame &game = *pos->second;
unsigned tmpPlayerId = session->GetPlayerData()->GetUniqueId();
if (game.IsPlayerInvited(tmpPlayerId)) {
// If he rejects, he is no longer invited.
game.RemovePlayerInvitation(tmpPlayerId);
// If he actively rejects, he is no longer invited.
if (reject.myRejectReason == RejectGameInvReason_no) {
game.RemovePlayerInvitation(tmpPlayerId);
}
// Send reject notification.
boost::shared_ptr<NetPacket> packet(new NetPacket(NetPacket::Alloc));
packet->GetMsg()->present = PokerTHMessage_PR_rejectInvNotifyMessage;