diff --git a/scripts/server/command.js b/scripts/server/command.js index 11285ea0..3c93a87c 100644 --- a/scripts/server/command.js +++ b/scripts/server/command.js @@ -215,9 +215,9 @@ function loadCommands() { commandData("saveall", saveAllServerDataCommand, "", getStaffFlagValue("Developer"), true, true), commandData("docmd", simulateCommandForPlayerCommand, " [params]", getStaffFlagValue("Developer"), true, true), commandData("docmdall", simulateCommandForAllPlayersCommand, " [params]", getStaffFlagValue("Developer"), true, true), - commandData("addloglvl", addServerLogLevelCommand, "", getStaffFlagValue("Developer"), true, true), - commandData("delloglvl", removeServerLogLevelCommand, "", getStaffFlagValue("Developer"), true, true), - commandData("loglvl", getServerLogLevelCommand, "", getStaffFlagValue("Developer"), true, true), + commandData("addloglvl", addLogLevelCommand, "", getStaffFlagValue("Developer"), true, true), + commandData("delloglvl", removeLogLevelCommand, "", getStaffFlagValue("Developer"), true, true), + commandData("loglvl", getLogLevelCommand, "", getStaffFlagValue("Developer"), true, true), commandData("nosave", togglePauseSavingToDatabaseCommand, "", getStaffFlagValue("Developer"), true, true), commandData("streamurlall", streamAudioURLToAllPlayersCommand, " ", getStaffFlagValue("Developer"), true, true), diff --git a/scripts/server/developer.js b/scripts/server/developer.js index 965be9c8..ce1d7444 100644 --- a/scripts/server/developer.js +++ b/scripts/server/developer.js @@ -119,7 +119,7 @@ function pvd(params) { // =========================================================================== -function addServerLogLevelCommand(command, params, client) { +function addLogLevelCommand(command, params, client) { if(areParamsEmpty(params)) { messagePlayerSyntax(client, getCommandSyntaxText(command)); return false; @@ -150,6 +150,8 @@ function addServerLogLevelCommand(command, params, client) { return; } + sendPlayerLogLevel(null, logLevel); + messageAdminAction(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}enabled log level {ALTCOLOUR}${toLowerCase(params)}`); return true; @@ -157,7 +159,7 @@ function addServerLogLevelCommand(command, params, client) { // =========================================================================== -function getServerLogLevelCommand(command, params, client) { +function getLogLevelCommand(command, params, client) { let logLevels = []; if(hasBitFlag(logLevel, LOG_DEBUG)) { @@ -187,7 +189,7 @@ function getServerLogLevelCommand(command, params, client) { // =========================================================================== -function removeServerLogLevelCommand(command, params, client) { +function removeLogLevelCommand(command, params, client) { if(areParamsEmpty(params)) { messagePlayerSyntax(client, getCommandSyntaxText(command)); return false; @@ -218,6 +220,8 @@ function removeServerLogLevelCommand(command, params, client) { return; } + sendPlayerLogLevel(null, logLevel); + messageAdminAction(`{ALTCOLOUR}${getPlayerName(client)} {MAINCOLOUR}disabled log level {ALTCOLOUR}${toLowerCase(params)}`); return true; @@ -372,8 +376,8 @@ function testEmailCommand(command, params, client) { // =========================================================================== function restartGameModeCommand(command, params, client) { - messagePlayerNormal(null, `{clanOrange}The server game mode is restarting!`, getColourByName("orange")); - consoleCommand("refresh"); + messagePlayerNormal(null, `The server game mode is restarting!`, getColourByName("orange")); + consoleCommand("/refresh"); thisResource.restart(); return true; }