Fix disconnect util
This commit is contained in:
@@ -591,7 +591,7 @@ function loginSuccess(client) {
|
|||||||
if(!hasBitFlag(getPlayerData(client).accountData.flags.moderation, getModerationFlagValue("IsTester"))) {
|
if(!hasBitFlag(getPlayerData(client).accountData.flags.moderation, getModerationFlagValue("IsTester"))) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
getPlayerData(client).customDisconnectReason = "Kicked - Not a tester";
|
getPlayerData(client).customDisconnectReason = "Kicked - Not a tester";
|
||||||
disconnectPlayer();
|
disconnectPlayer(client);
|
||||||
}, 3500);
|
}, 3500);
|
||||||
|
|
||||||
if(doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
|
if(doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
|
||||||
@@ -804,7 +804,7 @@ function createAccount(name, password, email = "") {
|
|||||||
function checkLogin(client, password) {
|
function checkLogin(client, password) {
|
||||||
getPlayerData(client).loginAttemptsRemaining = getPlayerData(client).loginAttemptsRemaining-1;
|
getPlayerData(client).loginAttemptsRemaining = getPlayerData(client).loginAttemptsRemaining-1;
|
||||||
if(getPlayerData(client).loginAttemptsRemaining <= 0) {
|
if(getPlayerData(client).loginAttemptsRemaining <= 0) {
|
||||||
disconnectPlayer();
|
disconnectPlayer(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isPlayerLoggedIn(client)) {
|
if(isPlayerLoggedIn(client)) {
|
||||||
@@ -983,7 +983,7 @@ function checkRegistration(client, password, confirmPassword = "", emailAddress
|
|||||||
|
|
||||||
if(doesServerHaveTesterOnlyEnabled() && !isPlayerATester(client)) {
|
if(doesServerHaveTesterOnlyEnabled() && !isPlayerATester(client)) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
disconnectPlayer();
|
disconnectPlayer(client);
|
||||||
}, 5000);
|
}, 5000);
|
||||||
|
|
||||||
if(doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
|
if(doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user