added unkown command to gamemodeexception
This commit is contained in:
		| @@ -226,7 +226,7 @@ class Commands implements CallbackListener, CommandListener, ManialinkPageAnswer | |||||||
| 		try { | 		try { | ||||||
| 			$this->maniaControl->getClient()->sendModeScriptCommands(array('Command_ForceWarmUp' => true)); | 			$this->maniaControl->getClient()->sendModeScriptCommands(array('Command_ForceWarmUp' => true)); | ||||||
| 			$this->maniaControl->getChat()->sendInformation($player->getEscapedNickname() . ' paused the Game!'); | 			$this->maniaControl->getChat()->sendInformation($player->getEscapedNickname() . ' paused the Game!'); | ||||||
| 		} catch (GameModeException | FaultException $e) { | 		} catch (GameModeException $e) { | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		try { | 		try { | ||||||
| @@ -242,7 +242,6 @@ class Commands implements CallbackListener, CommandListener, ManialinkPageAnswer | |||||||
| 		//TODO verify if not everything is replaced through the new pause | 		//TODO verify if not everything is replaced through the new pause | ||||||
| 		$this->maniaControl->getModeScriptEventManager()->startPause(); | 		$this->maniaControl->getModeScriptEventManager()->startPause(); | ||||||
| 		$this->maniaControl->getChat()->sendInformation('$f8fVote to $fffpause the current Game$f8f has been successful!'); | 		$this->maniaControl->getChat()->sendInformation('$f8fVote to $fffpause the current Game$f8f has been successful!'); | ||||||
|  |  | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
|   | |||||||
| @@ -96,6 +96,9 @@ class FaultException extends Exception { | |||||||
| 			case 'No map to export in playlist.': | 			case 'No map to export in playlist.': | ||||||
| 				return new FileException($faultString, $faultCode); | 				return new FileException($faultString, $faultCode); | ||||||
| 		} | 		} | ||||||
|  | 		if (preg_match('~^Unknown command \'.*\'\.$~iu', $faultString)) { | ||||||
|  | 			return new GameModeException($faultString, $faultCode); | ||||||
|  | 		} | ||||||
| 		if (preg_match('~^Unknown setting \'.*\'\.$~iu', $faultString)) { | 		if (preg_match('~^Unknown setting \'.*\'\.$~iu', $faultString)) { | ||||||
| 			return new GameModeException($faultString, $faultCode); | 			return new GameModeException($faultString, $faultCode); | ||||||
| 		} | 		} | ||||||
|   | |||||||
| @@ -525,7 +525,7 @@ class CustomVotesPlugin implements SidebarMenuEntryListener, CommandListener, Ca | |||||||
| 						//Gamemodes like Elite, Speedball | 						//Gamemodes like Elite, Speedball | ||||||
| 						$this->maniaControl->getClient()->sendModeScriptCommands(array('Command_ForceWarmUp' => true)); | 						$this->maniaControl->getClient()->sendModeScriptCommands(array('Command_ForceWarmUp' => true)); | ||||||
| 						$this->maniaControl->getChat()->sendInformation('$f8fVote to $fffpause the current Game$f8f has been successful!'); | 						$this->maniaControl->getChat()->sendInformation('$f8fVote to $fffpause the current Game$f8f has been successful!'); | ||||||
| 					} catch (GameModeException | FaultException $ex) { | 					} catch (GameModeException $ex) { | ||||||
| 					} | 					} | ||||||
|  |  | ||||||
| 					//TODO verify if not everything is replaced through the new pause | 					//TODO verify if not everything is replaced through the new pause | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user