plural in script setting change message

This commit is contained in:
Steffen Schröder 2013-12-31 16:14:28 +01:00
parent 0be745e042
commit 7016332b0d

View File

@ -280,10 +280,10 @@ class ScriptSettings implements ConfiguratorMenu, CallbackListener {
}
// Notifications
$title = $this->maniaControl->authenticationManager->getAuthLevelName($player->authLevel);
$chatMessage = '$ff0' . $title . ' $<' . $player->nickname . '$> set ScriptSetting ';
$settingsCount = count($newSettings);
$settingIndex = 0;
$title = $this->maniaControl->authenticationManager->getAuthLevelName($player->authLevel);
$chatMessage = '$ff0' . $title . ' $<' . $player->nickname . '$> set ScriptSetting' . ($settingsCount > 1 ? 's' : '') . ' ';
foreach ($newSettings as $setting => $value) {
$chatMessage .= '$<' . '$fff' . preg_replace('/^S_/', '', $setting) . '$z$s$ff0 ';
$chatMessage .= 'to $fff' . $this->parseSettingValue($value) . '$>';