Fix Chat::formatMessage issues after tests

This commit is contained in:
Alexander Nell
2020-06-22 04:53:31 +02:00
parent 9abadac932
commit 566f77801f
4 changed files with 36 additions and 34 deletions

View File

@ -119,7 +119,7 @@ class MapQueue implements CallbackListener, CommandListener, UsageInformationAbl
return;
}
$messagePrefix = $this->maniaControl->getSettingManager()->initSetting($this, self::SETTING_MESSAGE_FORMAT);
$messagePrefix = $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_MESSAGE_FORMAT);
if ($admin && empty($this->queuedMaps)) {
$this->maniaControl->getChat()->sendError($messagePrefix . 'There are no maps in the jukebox!', $admin);
return;
@ -131,8 +131,7 @@ class MapQueue implements CallbackListener, CommandListener, UsageInformationAbl
if ($admin) {
$title = $admin->getAuthLevelName();
$message = $this->maniaControl->getChat()->formatMessage(
$messagePrefix . '%s %s cleared the Map-Queue!',
$title,
"{$messagePrefix}{$title} %s cleared the Map-Queue!",
$admin
);
$this->maniaControl->getChat()->sendInformation($message);