fix bug which broke turns if an admin disconnected while they had an indefinite turn
This commit is contained in:
@@ -162,6 +162,7 @@ export default class WSServer {
|
|||||||
|
|
||||||
private connectionClosed(user : User) {
|
private connectionClosed(user : User) {
|
||||||
if(user.IP.vote != null) user.IP.vote = null;
|
if(user.IP.vote != null) user.IP.vote = null;
|
||||||
|
if (this.indefiniteTurn === user) this.indefiniteTurn = null;
|
||||||
this.clients.splice(this.clients.indexOf(user), 1);
|
this.clients.splice(this.clients.indexOf(user), 1);
|
||||||
console.log(`[DISCONNECT] From ${user.IP.address}${user.username ? ` with username ${user.username}` : ""}`);
|
console.log(`[DISCONNECT] From ${user.IP.address}${user.username ? ` with username ${user.username}` : ""}`);
|
||||||
if (!user.username) return;
|
if (!user.username) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user