bugfix
This commit is contained in:
parent
f5f4deb02c
commit
773ad12c1d
@ -9,7 +9,6 @@ use ManiaControl\FileUtil;
|
|||||||
use ManiaControl\Formatter;
|
use ManiaControl\Formatter;
|
||||||
use ManiaControl\ManiaControl;
|
use ManiaControl\ManiaControl;
|
||||||
use ManiaControl\Players\Player;
|
use ManiaControl\Players\Player;
|
||||||
use Maniaplanet\DedicatedServer\Xmlrpc\Exception;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Manager for Maps
|
* Manager for Maps
|
||||||
@ -207,7 +206,7 @@ class MapManager implements CallbackListener {
|
|||||||
// Remove map
|
// Remove map
|
||||||
try {
|
try {
|
||||||
$this->maniaControl->client->removeMap($map->fileName);
|
$this->maniaControl->client->removeMap($map->fileName);
|
||||||
} catch(Exception $e) {
|
} catch(\Exception $e) {
|
||||||
trigger_error("Couldn't remove current map. " . $e->getMessage());
|
trigger_error("Couldn't remove current map. " . $e->getMessage());
|
||||||
$this->maniaControl->chat->sendError("Couldn't remove map.", $admin);
|
$this->maniaControl->chat->sendError("Couldn't remove map.", $admin);
|
||||||
return;
|
return;
|
||||||
@ -253,7 +252,7 @@ class MapManager implements CallbackListener {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$this->maniaControl->client->chooseNextMapList($mapArray);
|
$this->maniaControl->client->chooseNextMapList($mapArray);
|
||||||
} catch(Exception $e) {
|
} catch(\Exception $e) {
|
||||||
trigger_error("Error while restructuring the Maplist. " . $e->getMessage());
|
trigger_error("Error while restructuring the Maplist. " . $e->getMessage());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -279,7 +278,7 @@ class MapManager implements CallbackListener {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$this->maniaControl->client->chooseNextMapList($mapArray);
|
$this->maniaControl->client->chooseNextMapList($mapArray);
|
||||||
} catch(Exception $e) {
|
} catch(\Exception $e) {
|
||||||
trigger_error("Couldn't shuffle mapList. " . $e->getMessage());
|
trigger_error("Couldn't shuffle mapList. " . $e->getMessage());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -330,7 +329,7 @@ class MapManager implements CallbackListener {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$maps = $this->maniaControl->client->getMapList(100, 0);
|
$maps = $this->maniaControl->client->getMapList(100, 0);
|
||||||
} catch(Exception $e) {
|
} catch(\Exception $e) {
|
||||||
trigger_error("Couldn't fetch mapList. " . $e->getMessage());
|
trigger_error("Couldn't fetch mapList. " . $e->getMessage());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -362,7 +361,7 @@ class MapManager implements CallbackListener {
|
|||||||
private function fetchCurrentMap() {
|
private function fetchCurrentMap() {
|
||||||
try {
|
try {
|
||||||
$rpcMap = $this->maniaControl->client->getCurrentMapInfo();
|
$rpcMap = $this->maniaControl->client->getCurrentMapInfo();
|
||||||
} catch(Exception $e) {
|
} catch(\Exception $e) {
|
||||||
trigger_error("Couldn't fetch map info. " . $e->getMessage());
|
trigger_error("Couldn't fetch map info. " . $e->getMessage());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -454,7 +453,6 @@ class MapManager implements CallbackListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function getMaps() {
|
public function getMaps() {
|
||||||
@ -485,7 +483,7 @@ class MapManager implements CallbackListener {
|
|||||||
// Check if ManiaControl can even write to the maps dir
|
// Check if ManiaControl can even write to the maps dir
|
||||||
try {
|
try {
|
||||||
$mapDir = $this->maniaControl->client->getMapsDirectory();
|
$mapDir = $this->maniaControl->client->getMapsDirectory();
|
||||||
} catch(Exception $e) {
|
} catch(\Exception $e) {
|
||||||
trigger_error("Couldn't get map directory. " . $e->getMessage());
|
trigger_error("Couldn't get map directory. " . $e->getMessage());
|
||||||
$this->maniaControl->chat->sendError("ManiaControl couldn't retrieve the maps directory.", $login);
|
$this->maniaControl->chat->sendError("ManiaControl couldn't retrieve the maps directory.", $login);
|
||||||
return;
|
return;
|
||||||
@ -550,7 +548,7 @@ class MapManager implements CallbackListener {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$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('Wrong MapType or not validated!', $login);
|
$this->maniaControl->chat->sendError('Wrong MapType or not validated!', $login);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user