From 54cf862217630b0491a2f76fe1436a1d55d1ac3d Mon Sep 17 00:00:00 2001 From: lotodore Date: Sun, 8 Jan 2012 17:10:21 +0000 Subject: [PATCH] Allow chat after end of game for muted players (for now). --- src/net/common/servergamestate.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/net/common/servergamestate.cpp b/src/net/common/servergamestate.cpp index 6fcefde3..edf14e91 100644 --- a/src/net/common/servergamestate.cpp +++ b/src/net/common/servergamestate.cpp @@ -267,7 +267,9 @@ AbstractServerGameStateReceiving::ProcessPacket(boost::shared_ptr se } } else if (netChatRequest->chatRequestType.present == chatRequestType_PR_chatRequestTypeGame) { boost::shared_ptr tmpPlayer (server->GetPlayerInterfaceFromGame(session->GetPlayerData()->GetUniqueId())); - if (tmpPlayer && !tmpPlayer->isMuted()) { + // If we did not find the player, then the game did not start yet. Allow chat for now. + // Otherwise, check whether the player is muted. + if (!tmpPlayer || !tmpPlayer->isMuted()) { boost::shared_ptr packet(new NetPacket(NetPacket::Alloc)); packet->GetMsg()->present = PokerTHMessage_PR_chatMessage; ChatMessage_t *netChat = &packet->GetMsg()->choice.chatMessage;