mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-21 06:42:41 -08:00
improved code for automatic joining of persistent games; disconnecting + reconnecting works as it should with ISL
This commit is contained in:
@@ -1578,3 +1578,11 @@ void Server_Player::setUserInterface(Server_AbstractUserInterface *_userInterfac
|
||||
ges.enqueueGameEvent(event, playerId);
|
||||
ges.sendToGame(game);
|
||||
}
|
||||
|
||||
void Server_Player::disconnectClient()
|
||||
{
|
||||
if (!(userInfo->user_level() & ServerInfo_User::IsRegistered) || spectator)
|
||||
game->removePlayer(this);
|
||||
else
|
||||
setUserInterface(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user