added validation replay exception
This commit is contained in:
parent
602cae563f
commit
8a3184c224
@ -22,6 +22,7 @@ class FaultException extends Exception {
|
||||
case 'No map currently loaded.':
|
||||
case 'No replay to save':
|
||||
case 'Internal error.':
|
||||
case 'Unable to retrieve validation data. ':
|
||||
return new UnavailableFeatureException($faultString, $faultCode);
|
||||
case 'You must enable the callbacks to be able to do chat routing.':
|
||||
case 'Chat routing not enabled.':
|
||||
|
@ -22,6 +22,7 @@ use ManiaControl\Players\Player;
|
||||
use ManiaControl\Players\PlayerManager;
|
||||
use ManiaControl\Plugins\Plugin;
|
||||
use ManiaControl\Utils\Formatter;
|
||||
use Maniaplanet\DedicatedServer\Xmlrpc\UnavailableFeatureException;
|
||||
|
||||
/**
|
||||
* ManiaControl Dedimania Plugin
|
||||
@ -1096,11 +1097,17 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
||||
*/
|
||||
private function setRecordReplays(RecordData &$record) {
|
||||
// Set validation replay
|
||||
$validationReplay = $this->maniaControl->getServer()->getValidationReplay($record->login);
|
||||
if ($validationReplay) {
|
||||
$record->vReplay = $validationReplay;
|
||||
try{
|
||||
$validationReplay = $this->maniaControl->getServer()->getValidationReplay($record->login);
|
||||
if ($validationReplay) {
|
||||
$record->vReplay = $validationReplay;
|
||||
}
|
||||
|
||||
}catch (UnavailableFeatureException $e){
|
||||
Logger::logError("Unable to get Validation Replay from the Server");
|
||||
}
|
||||
|
||||
|
||||
// Set ghost replay
|
||||
if ($record->rank <= 1) {
|
||||
$dataDirectory = $this->maniaControl->getServer()->getDirectory()->getGameDataFolder();
|
||||
|
Loading…
Reference in New Issue
Block a user