Compare commits
	
		
			2 Commits
		
	
	
		
			9efa66ac5d
			...
			0352d96fdf
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						
						
							
						
						0352d96fdf
	
				 | 
					
					
						|||
| 
						
						
							
						
						ebecb7da73
	
				 | 
					
					
						
@@ -720,13 +720,14 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen
 | 
				
			|||||||
		$this->pauseon			 = false;
 | 
							$this->pauseon			 = false;
 | 
				
			||||||
		$this->pointstorecover	 = array();
 | 
							$this->pointstorecover	 = array();
 | 
				
			||||||
		$this->currentscore		 = array();
 | 
							$this->currentscore		 = array();
 | 
				
			||||||
 | 
							$this->currentteamsscore = array();
 | 
				
			||||||
		$this->preendroundscore	 = null;
 | 
							$this->preendroundscore	 = null;
 | 
				
			||||||
		$this->settingsloaded	 = false;
 | 
							$this->settingsloaded	 = false;
 | 
				
			||||||
		$this->mapsshuffled		 = false;
 | 
							$this->mapsshuffled		 = false;
 | 
				
			||||||
		$this->mapshidden		 = false;
 | 
							$this->mapshidden		 = false;
 | 
				
			||||||
		$this->hidenextmaps		 = false;
 | 
							$this->hidenextmaps		 = false;
 | 
				
			||||||
		$this->maps				 = array();
 | 
							$this->maps				 = array();
 | 
				
			||||||
		$this->postmatch		= true;
 | 
							$this->postmatch		 = false;
 | 
				
			||||||
		$this->matchid			 = "";
 | 
							$this->matchid			 = "";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		$this->settings_nbroundsbymap	= -1;
 | 
							$this->settings_nbroundsbymap	= -1;
 | 
				
			||||||
@@ -1138,6 +1139,8 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen
 | 
				
			|||||||
		if (!$this->canStartMatch()) return;
 | 
							if (!$this->canStartMatch()) return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		try {
 | 
							try {
 | 
				
			||||||
 | 
								$this->resetMatchVariables();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			$this->matchid = $this->maniaControl->getServer()->login . "-" . time();
 | 
								$this->matchid = $this->maniaControl->getServer()->login . "-" . time();
 | 
				
			||||||
			$this->currentgmbase = $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_MATCH_GAMEMODE_BASE);
 | 
								$this->currentgmbase = $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_MATCH_GAMEMODE_BASE);
 | 
				
			||||||
			$this->currentcustomgm = $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_MATCH_CUSTOM_GAMEMODE);
 | 
								$this->currentcustomgm = $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_MATCH_CUSTOM_GAMEMODE);
 | 
				
			||||||
@@ -1156,7 +1159,7 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen
 | 
				
			|||||||
					try {
 | 
										try {
 | 
				
			||||||
						$mapInfo = $this->maniaControl->getMapManager()->initializeMap($this->maniaControl->getClient()->getMapInfo($map));
 | 
											$mapInfo = $this->maniaControl->getMapManager()->initializeMap($this->maniaControl->getClient()->getMapInfo($map));
 | 
				
			||||||
					} catch (Exception $e) {
 | 
										} catch (Exception $e) {
 | 
				
			||||||
						throw new \Exception("Error with the map " . $map . ": " . $e->getMessage());
 | 
											throw new \Exception('Error with the Map to play "' . $map . '": ' . $e->getMessage());
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1172,7 +1175,11 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
				// Remove all maps
 | 
									// Remove all maps
 | 
				
			||||||
				foreach ($this->maniaControl->getMapManager()->getMaps() as $map) {
 | 
									foreach ($this->maniaControl->getMapManager()->getMaps() as $map) {
 | 
				
			||||||
 | 
										try {
 | 
				
			||||||
						$this->maniaControl->getClient()->removeMap($map->fileName);
 | 
											$this->maniaControl->getClient()->removeMap($map->fileName);
 | 
				
			||||||
 | 
										} catch (Exception $e) {
 | 
				
			||||||
 | 
											throw new \Exception('Error when removing map "' . $map->getEscapedName() . '" from the playlist: ' . $e->getMessage());
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				$this->maps = $maps;
 | 
									$this->maps = $maps;
 | 
				
			||||||
@@ -1359,11 +1366,9 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen
 | 
				
			|||||||
			$this->log("Match finished");
 | 
								$this->log("Match finished");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			$this->resetMatchVariables();
 | 
								$this->resetMatchVariables();
 | 
				
			||||||
 | 
								$this->postmatch = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			$this->updateAdminUIMenuItems();
 | 
								$this->updateAdminUIMenuItems();
 | 
				
			||||||
 | 
					 | 
				
			||||||
			// Teams Specifics variables
 | 
					 | 
				
			||||||
			$this->currentteamsscore = [];
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		} catch (Exception $e) {
 | 
							} catch (Exception $e) {
 | 
				
			||||||
			$this->maniaControl->getChat()->sendErrorToAdmins($this->chatprefix . "Can't finish the match: " . $e->getMessage());
 | 
								$this->maniaControl->getChat()->sendErrorToAdmins($this->chatprefix . "Can't finish the match: " . $e->getMessage());
 | 
				
			||||||
			$this->logError("Can't finish the match: ". $e->getMessage());
 | 
								$this->logError("Can't finish the match: ". $e->getMessage());
 | 
				
			||||||
@@ -1411,6 +1416,8 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen
 | 
				
			|||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			$this->resetMatchVariables();
 | 
								$this->resetMatchVariables();
 | 
				
			||||||
 | 
								$this->postmatch = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			$this->updateAdminUIMenuItems();
 | 
								$this->updateAdminUIMenuItems();
 | 
				
			||||||
		} catch (Exception $e) {
 | 
							} catch (Exception $e) {
 | 
				
			||||||
			$this->maniaControl->getChat()->sendErrorToAdmins($this->chatprefix . "Can't stop the match: " . $e->getMessage());
 | 
								$this->maniaControl->getChat()->sendErrorToAdmins($this->chatprefix . "Can't stop the match: " . $e->getMessage());
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user