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