Send locale ID if account exists, otherwise send default
This commit is contained in:
@@ -1167,7 +1167,6 @@ function initClient(client) {
|
|||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
if(client != null) {
|
if(client != null) {
|
||||||
|
|
||||||
clearChatBox(client);
|
clearChatBox(client);
|
||||||
let tempAccountData = loadAccountFromName(getPlayerName(client), true);
|
let tempAccountData = loadAccountFromName(getPlayerName(client), true);
|
||||||
let tempSubAccounts = loadSubAccountsFromAccount(tempAccountData.databaseId);
|
let tempSubAccounts = loadSubAccountsFromAccount(tempAccountData.databaseId);
|
||||||
@@ -1179,6 +1178,7 @@ function initClient(client) {
|
|||||||
requestClientInfo(client);
|
requestClientInfo(client);
|
||||||
|
|
||||||
if(tempAccountData != false) {
|
if(tempAccountData != false) {
|
||||||
|
sendPlayerLocaleId(client, getPlayerData(client).accountData.locale);
|
||||||
if(isAccountAutoIPLoginEnabled(tempAccountData) && getPlayerData(client).accountData.ipAddress == getPlayerIP(client)) {
|
if(isAccountAutoIPLoginEnabled(tempAccountData) && getPlayerData(client).accountData.ipAddress == getPlayerIP(client)) {
|
||||||
messagePlayerAlert(client, getLocaleString(client, "AutoLoggedInIP"));
|
messagePlayerAlert(client, getLocaleString(client, "AutoLoggedInIP"));
|
||||||
loginSuccess(client);
|
loginSuccess(client);
|
||||||
@@ -1200,6 +1200,7 @@ function initClient(client) {
|
|||||||
playRadioStreamForPlayer(client, getServerIntroMusicURL(), true, getPlayerStreamingRadioVolume(client));
|
playRadioStreamForPlayer(client, getServerIntroMusicURL(), true, getPlayerStreamingRadioVolume(client));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
sendPlayerLocaleId(client, 0);
|
||||||
if(doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
|
if(doesServerHaveGUIEnabled() && doesPlayerHaveGUIEnabled(client)) {
|
||||||
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the register GUI.`);
|
logToConsole(LOG_DEBUG, `[VRR.Account] ${getPlayerDisplayForConsole(client)} is being shown the register GUI.`);
|
||||||
showPlayerRegistrationGUI(client);
|
showPlayerRegistrationGUI(client);
|
||||||
@@ -1212,7 +1213,10 @@ function initClient(client) {
|
|||||||
|
|
||||||
getServerData().clients[getPlayerId(client)].keyBinds = loadAccountKeybindsFromDatabase(getServerData().clients[getPlayerId(client)].accountData.databaseId);
|
getServerData().clients[getPlayerId(client)].keyBinds = loadAccountKeybindsFromDatabase(getServerData().clients[getPlayerId(client)].accountData.databaseId);
|
||||||
sendAccountKeyBindsToClient(client);
|
sendAccountKeyBindsToClient(client);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}, 2500);
|
}, 2500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user