Use Chat::formatMessage in Main-Files
This commit is contained in:
parent
965ee220ba
commit
5717589588
@ -131,8 +131,12 @@ class ErrorHandler {
|
|||||||
|
|
||||||
if ($isFatalError) {
|
if ($isFatalError) {
|
||||||
$this->maniaControl->getPluginManager()->deactivatePlugin($sourceClass);
|
$this->maniaControl->getPluginManager()->deactivatePlugin($sourceClass);
|
||||||
$this->maniaControl->getChat()->sendError("Plugin " . $sourceClass . " has an Error -> The Plugin will be deactivated and ManiaControl restarted");
|
$message = $this->maniaControl->getChat()->formatMessage(
|
||||||
Logger::logError("Plugin " . $sourceClass . " has an Error -> The Plugin will be deactivated and ManiaControl restarted");
|
'Plugin %s has an Error -> The Plugin will be deactivated and ManiaControl restarted!',
|
||||||
|
$sourceClass
|
||||||
|
);
|
||||||
|
$this->maniaControl->getChat()->sendError($message);
|
||||||
|
Logger::logError("Plugin {$sourceClass} has an Error -> The Plugin will be deactivated and ManiaControl restarted!");
|
||||||
$isPluginError = true;
|
$isPluginError = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -482,8 +486,12 @@ class ErrorHandler {
|
|||||||
$report['PluginVersion'] = PluginManager::getPluginVersion($sourceClass);
|
$report['PluginVersion'] = PluginManager::getPluginVersion($sourceClass);
|
||||||
|
|
||||||
$this->maniaControl->getPluginManager()->deactivatePlugin($sourceClass);
|
$this->maniaControl->getPluginManager()->deactivatePlugin($sourceClass);
|
||||||
$this->maniaControl->getChat()->sendError("Plugin " . $sourceClass . " has an Error -> The Plugin will be deactivated and ManiaControl restarted");
|
$message = $this->maniaControl->getChat()->formatMessage(
|
||||||
Logger::logError("Plugin " . $sourceClass . " has an Error -> The Plugin will be deactivated and ManiaControl restarted");
|
'Plugin %s has an Error -> The Plugin will be deactivated and ManiaControl restarted!',
|
||||||
|
$sourceClass
|
||||||
|
);
|
||||||
|
$this->maniaControl->getChat()->sendError($message);
|
||||||
|
Logger::logError("Plugin {$sourceClass} has an Error -> The Plugin will be deactivated and ManiaControl restarted!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -561,7 +561,12 @@ class ManiaControl implements CallbackListener, CommandListener, TimerListener,
|
|||||||
$this->getAuthenticationManager()->sendNotAllowed($player);
|
$this->getAuthenticationManager()->sendNotAllowed($player);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$this->getChat()->sendError('The command //restart got disabled, reboot ManiaControl with //reboot instead', $player);
|
$message = $this->getChat()->formatMessage(
|
||||||
|
'The command %s got disabled, reboot ManiaControl with %s instead!',
|
||||||
|
'//restart',
|
||||||
|
'//reboot'
|
||||||
|
);
|
||||||
|
$this->getChat()->sendError($message, $player);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user