Disable rejoin for players who have been kicked.

This commit is contained in:
lotodore
2011-11-13 14:28:54 +00:00
parent 982b6ec686
commit edef79e9d1
7 changed files with 62 additions and 16 deletions
+13 -11
View File
@@ -905,7 +905,7 @@ ServerLobbyThread::HandlePacket(boost::shared_ptr<SessionData> session, boost::s
else if (packet->GetMsg()->present == PokerTHMessage_PR_avatarRequestMessage)
HandleNetPacketRetrieveAvatar(session, packet->GetMsg()->choice.avatarRequestMessage);
else if (packet->GetMsg()->present == PokerTHMessage_PR_resetTimeoutMessage)
{}
{}
else if (packet->GetMsg()->present == PokerTHMessage_PR_subscriptionRequestMessage) {
SubscriptionRequestMessage_t *subscriptionRequest = &packet->GetMsg()->choice.subscriptionRequestMessage;
if (subscriptionRequest->subscriptionAction == subscriptionAction_resubscribeGameList)
@@ -2207,17 +2207,19 @@ u_int32_t
ServerLobbyThread::GetRejoinGameIdForPlayer(const std::string &playerName, const std::string &guid, unsigned &outPlayerUniqueId)
{
u_int32_t retGameId = 0;
GameMap::iterator i = m_gameMap.begin();
GameMap::iterator end = m_gameMap.end();
while (i != end) {
boost::shared_ptr<ServerGame> tmpGame = i->second;
boost::shared_ptr<PlayerInterface> tmpPlayer = tmpGame->GetPlayerInterfaceFromGame(playerName);
if (tmpPlayer && tmpPlayer->getMyGuid() == guid) {
retGameId = tmpGame->GetId();
outPlayerUniqueId = tmpPlayer->getMyUniqueID();
break;
if (!guid.empty()) {
GameMap::iterator i = m_gameMap.begin();
GameMap::iterator end = m_gameMap.end();
while (i != end) {
boost::shared_ptr<ServerGame> tmpGame = i->second;
boost::shared_ptr<PlayerInterface> tmpPlayer = tmpGame->GetPlayerInterfaceFromGame(playerName);
if (tmpPlayer && tmpPlayer->getMyGuid() == guid) {
retGameId = tmpGame->GetId();
outPlayerUniqueId = tmpPlayer->getMyUniqueID();
break;
}
++i;
}
++i;
}
return retGameId;
}