mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-22 23:26:14 -08:00
drop disconnected spectators from games instead of keeping them alive
This commit is contained in:
@@ -35,7 +35,7 @@ Server_ProtocolHandler::~Server_ProtocolHandler()
|
|||||||
Server_Game *g = gameIterator.value().first;
|
Server_Game *g = gameIterator.value().first;
|
||||||
Server_Player *p = gameIterator.value().second;
|
Server_Player *p = gameIterator.value().second;
|
||||||
|
|
||||||
if (authState == UnknownUser)
|
if ((authState == UnknownUser) || p->getSpectator())
|
||||||
g->removePlayer(p);
|
g->removePlayer(p);
|
||||||
else
|
else
|
||||||
p->setProtocolHandler(0);
|
p->setProtocolHandler(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user