Add login timeout (60 seconds)

This commit is contained in:
Vortrex
2022-07-07 22:16:50 -05:00
parent 2587ee6cdf
commit eb582a666d
4 changed files with 65 additions and 10 deletions

View File

@@ -125,13 +125,18 @@ function onPlayerQuit(event, client, quitReasonId) {
if (isPlayerLoggedIn(client)) {
savePlayerToDatabase(client);
resetClientStuff(client);
getServerData().clients[getPlayerId(client)] = null;
}
if (getPlayerData(client).loginTimeout != null) {
clearTimeout(getPlayerData(client).loginTimeout);
}
playerResourceReady[client.index] = false;
playerResourceStarted[client.index] = false;
playerInitialized[client.index] = false;
playerGUIReady[client.index] = false;
getServerData().clients[getPlayerId(client)] = null;
}
// ===========================================================================