From b355c2093f0be25093c7f4773ef9960ac66e833e Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Sat, 23 Apr 2022 15:12:52 -0500 Subject: [PATCH] Use locale string --- scripts/server/account.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/server/account.js b/scripts/server/account.js index d44c3b88..2d378264 100644 --- a/scripts/server/account.js +++ b/scripts/server/account.js @@ -619,10 +619,14 @@ function loginSuccess(client) { } getPlayerData(client).accountData.ipAddress = getPlayerIP(client); - sendPlayerChatScrollLines(client, getPlayerData(client).accountData.chatScrollLines); - messagePlayerNormal(null, `👋 ${getPlayerName(client)} has joined the server`, getColourByName("softYellow")); + messageDiscordChatChannel(`👋 ${getPlayerName(client)} has joined the server`); + + let clients = getClients(); + for(let i in clients) { + messagePlayerNormal(clients[i], getLocaleString(clients[i], "PlayerJoined", `{ALTCOLOUR}${getPlayerName(client)}{MAINCOLOUR}`), getColourByName("softYellow")); + } } // =========================================================================== @@ -1089,7 +1093,7 @@ function isValidEmailAddress(emailAddress) { // =========================================================================== -function savePlayersToDatabase() { +function saveAllPlayersToDatabase() { logToConsole(LOG_DEBUG, "[VRR.Account]: Saving all clients to database ..."); getClients().forEach(function(client) { savePlayerToDatabase(client);