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