change error on adding map
This commit is contained in:
parent
15c488f821
commit
1beb6ca74d
@ -548,16 +548,10 @@ class MapManager implements CallbackListener {
|
|||||||
$mapFileName = $downloadDirectory . '/' . $fileName;
|
$mapFileName = $downloadDirectory . '/' . $fileName;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$response = $this->maniaControl->client->checkMapForCurrentServerParams($mapFileName);
|
$this->maniaControl->client->checkMapForCurrentServerParams($mapFileName);
|
||||||
} catch(Exception $e) {
|
} catch(Exception $e) {
|
||||||
trigger_error("Couldn't check if map is valid ('{$mapFileName}'). " . $e->getMessage());
|
trigger_error("Couldn't check if map is valid ('{$mapFileName}'). " . $e->getMessage());
|
||||||
$this->maniaControl->chat->sendError('Error checking map!', $login);
|
$this->maniaControl->chat->sendError('Wrong MapType or not validated!', $login);
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!$response) {
|
|
||||||
// Invalid map type
|
|
||||||
$this->maniaControl->chat->sendError("Invalid map type.", $login);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user