From b43b1f5339cd3e7482c432bad642509bad6c27ff Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Mon, 2 May 2022 15:31:28 -0500 Subject: [PATCH] Use console utils --- scripts/server/developer.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/server/developer.js b/scripts/server/developer.js index cea10b8e..6b54fa26 100644 --- a/scripts/server/developer.js +++ b/scripts/server/developer.js @@ -325,7 +325,7 @@ function executeServerCodeCommand(command, params, client) { messagePlayerSuccess(client, "Server code executed!"); messagePlayerNormal(client, `Code: ${params}`, COLOUR_YELLOW); messagePlayerNormal(client, `Returns: ${returnValue}`, COLOUR_YELLOW); - console.log(returnValue); + logToConsole(LOG_INFO, `Server code executed by ${getPlayerDisplayForConsole(client)}: ${params}`); return true; } @@ -453,7 +453,14 @@ function saveServerDataCommand(command, params, client) { // =========================================================================== function testEmailCommand(command, params, client) { - sendEmail(params, "Player", "Test email", "Just testing the SMTP module for the server!"); + try { + messagePlayerAlert(client, `Sending test email to ${params}`); + sendEmail(params, "Player", "Test email", "Just testing the SMTP module for the server!"); + } catch(error) { + messagePlayerError(client, "The email could not be sent! Error: ${error}"); + return false; + } + return true; }