Refactoring of Code, Comments and Spelling
This commit is contained in:
		@@ -52,7 +52,7 @@ class Map {
 | 
			
		||||
		if (!$rpc_infos) {
 | 
			
		||||
			return;
 | 
			
		||||
		}
 | 
			
		||||
		$this->name = $rpc_infos['Name']; // in aseco stripped new lines on name
 | 
			
		||||
		$this->name = $rpc_infos['Name'];
 | 
			
		||||
		$this->uid = $rpc_infos['UId'];
 | 
			
		||||
		$this->fileName = $rpc_infos['FileName'];
 | 
			
		||||
		$this->authorLogin = $rpc_infos['Author'];
 | 
			
		||||
@@ -69,7 +69,7 @@ class Map {
 | 
			
		||||
			try {
 | 
			
		||||
				$this->mapFetcher->processFile($mapsDirectory . $this->fileName);
 | 
			
		||||
			}
 | 
			
		||||
			catch (Exception $e) {
 | 
			
		||||
			catch (\Exception $e) {
 | 
			
		||||
				trigger_error($e->getMessage(), E_USER_WARNING);
 | 
			
		||||
			}
 | 
			
		||||
			$this->authorNick = $this->mapFetcher->authorNick;
 | 
			
		||||
 
 | 
			
		||||
@@ -73,7 +73,7 @@ class MapCommands implements CommandListener {
 | 
			
		||||
			$this->maniaControl->authenticationManager->sendNotAllowed($player);
 | 
			
		||||
			return false;
 | 
			
		||||
		}
 | 
			
		||||
		// TODO: mx fetcher nutzen?
 | 
			
		||||
		// TODO: user mx fetcher
 | 
			
		||||
		$params = explode(' ', $chatCallback[1][2], 2);
 | 
			
		||||
		if (count($params) < 2) {
 | 
			
		||||
			$this->maniaControl->chat->sendUsageInfo('Usage example: //addmap 1234', $player->login);
 | 
			
		||||
@@ -138,7 +138,7 @@ class MapCommands implements CommandListener {
 | 
			
		||||
			}
 | 
			
		||||
			$response = $this->maniaControl->client->getResponse();
 | 
			
		||||
			if (!$response) {
 | 
			
		||||
				// Inalid map type
 | 
			
		||||
				// Invalid map type
 | 
			
		||||
				$this->maniaControl->chat->sendError("Invalid map type.", $player->login);
 | 
			
		||||
				return false;
 | 
			
		||||
			}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user