From 5f69db2da9a938ad1565566459727a83c3250e65 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Sun, 15 May 2022 04:18:17 -0500 Subject: [PATCH] Send locale ID if account exists, otherwise send default --- scripts/server/account.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/server/account.js b/scripts/server/account.js index 8245f989..0527c908 100644 --- a/scripts/server/account.js +++ b/scripts/server/account.js @@ -1167,7 +1167,6 @@ function initClient(client) { setTimeout(function() { if(client != null) { - clearChatBox(client); let tempAccountData = loadAccountFromName(getPlayerName(client), true); let tempSubAccounts = loadSubAccountsFromAccount(tempAccountData.databaseId); @@ -1179,6 +1178,7 @@ function initClient(client) { requestClientInfo(client); if(tempAccountData != false) { + sendPlayerLocaleId(client, getPlayerData(client).accountData.locale); if(isAccountAutoIPLoginEnabled(tempAccountData) && getPlayerData(client).accountData.ipAddress == getPlayerIP(client)) { messagePlayerAlert(client, getLocaleString(client, "AutoLoggedInIP")); loginSuccess(client); @@ -1200,6 +1200,7 @@ function initClient(client) { playRadioStreamForPlayer(client, getServerIntroMusicURL(), true, getPlayerStreamingRadioVolume(client)); } } else { + sendPlayerLocaleId(client, 0); if(doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) { logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the register GUI.`); showPlayerRegistrationGUI(client); @@ -1212,7 +1213,10 @@ function initClient(client) { getServerData().clients[getPlayerId(client)].keyBinds = loadAccountKeybindsFromDatabase(getServerData().clients[getPlayerId(client)].accountData.databaseId); sendAccountKeyBindsToClient(client); + + } + }, 2500); }