Pass on admin state if the admin leaves the network game, so that someone else can start the game.

This commit is contained in:
lotodore
2007-10-03 13:36:47 +00:00
parent 8385b2e28d
commit 076d44b0ae
19 changed files with 239 additions and 49 deletions
+7 -3
View File
@@ -312,10 +312,14 @@ ServerGameStateInit::InternalProcess(ServerGameThread &server, SessionWrapper se
}
else if (packet->ToNetPacketKickPlayer())
{
NetPacketKickPlayer::Data kickPlayerData;
packet->ToNetPacketKickPlayer()->GetData(kickPlayerData);
// Only admins are allowed to kick.
if (session.playerData->GetRights() == PLAYER_RIGHTS_ADMIN)
{
NetPacketKickPlayer::Data kickPlayerData;
packet->ToNetPacketKickPlayer()->GetData(kickPlayerData);
server.InternalKickPlayer(kickPlayerData.playerId);
server.InternalKickPlayer(kickPlayerData.playerId);
}
}
else
{