From e3eb2b0aa852f7879abd9fd45d494f847f56154f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Tue, 31 Dec 2013 13:59:37 +0100 Subject: [PATCH] Improved script setting change message --- application/core/Configurators/ScriptSettings.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/application/core/Configurators/ScriptSettings.php b/application/core/Configurators/ScriptSettings.php index 8061c790..35a978c1 100644 --- a/application/core/Configurators/ScriptSettings.php +++ b/application/core/Configurators/ScriptSettings.php @@ -291,12 +291,11 @@ class ScriptSettings implements ConfiguratorMenu, CallbackListener { } $valString = ($newSetting[$setting]) ? 'true' : 'false'; - $chatMessage = '$FFF' . $setting . '$z$s$FF0 to $FFF' . $valString; - $chatMessage = str_replace("S_", "", $chatMessage); + $chatMessage = '$FFF' . preg_replace('/^S_/', '', $setting) . '$z$s$FF0 to $FFF' . $valString; $title = $this->maniaControl->authenticationManager->getAuthLevelName($player->authLevel); $this->maniaControl->chat->sendInformation( - '$ff0' . $title . ' $<' . $player->nickname . '$> set Scriptsetting $<' . $chatMessage . '$>!'); + '$ff0' . $title . ' $<' . $player->nickname . '$> set ScriptSetting $<' . $chatMessage . '$>!'); // log console message $this->maniaControl->log(Formatter::stripCodes($title . ' ' . $player->nickname . ' set Scriptsetting ' . $chatMessage . '!'));