jukebox on mx add fix
This commit is contained in:
		@@ -18,6 +18,7 @@ use ManiaControl\Admin\AuthenticationManager;
 | 
				
			|||||||
use ManiaControl\Callbacks\CallbackListener;
 | 
					use ManiaControl\Callbacks\CallbackListener;
 | 
				
			||||||
use ManiaControl\Callbacks\CallbackManager;
 | 
					use ManiaControl\Callbacks\CallbackManager;
 | 
				
			||||||
use ManiaControl\ColorUtil;
 | 
					use ManiaControl\ColorUtil;
 | 
				
			||||||
 | 
					use ManiaControl\Formatter;
 | 
				
			||||||
use ManiaControl\Manialinks\ManialinkManager;
 | 
					use ManiaControl\Manialinks\ManialinkManager;
 | 
				
			||||||
use ManiaControl\Manialinks\ManialinkPageAnswerListener;
 | 
					use ManiaControl\Manialinks\ManialinkPageAnswerListener;
 | 
				
			||||||
use FML\Controls\Frame;
 | 
					use FML\Controls\Frame;
 | 
				
			||||||
@@ -469,7 +470,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
 | 
				
			|||||||
			$mapList = $this->maniaControl->mapManager->getMapList();
 | 
								$mapList = $this->maniaControl->mapManager->getMapList();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			$this->maniaControl->chat->sendSuccess('Map switched to $z$<' . $mapList[$actionArray[2]]->name . '$>!'); //TODO specified message, who done it?
 | 
								$this->maniaControl->chat->sendSuccess('Map switched to $z$<' . $mapList[$actionArray[2]]->name . '$>!'); //TODO specified message, who done it?
 | 
				
			||||||
			$this->maniaControl->log('Skipped to $z$<' . $mapList[$actionArray[2]]->name . '$>!');
 | 
								$this->maniaControl->log(Formatter::stripCodes('Skipped to $z$<' . $mapList[$actionArray[2]]->name . '$>!'));
 | 
				
			||||||
		}else if($jukeMap){
 | 
							}else if($jukeMap){
 | 
				
			||||||
			$this->maniaControl->mapManager->jukebox->addMapToJukebox($callback[1][1], $actionArray[2]);
 | 
								$this->maniaControl->mapManager->jukebox->addMapToJukebox($callback[1][1], $actionArray[2]);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,6 +6,7 @@ require_once __DIR__ . '/Map.php';
 | 
				
			|||||||
require_once __DIR__ . '/MapCommands.php';
 | 
					require_once __DIR__ . '/MapCommands.php';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use ManiaControl\FileUtil;
 | 
					use ManiaControl\FileUtil;
 | 
				
			||||||
 | 
					use ManiaControl\Formatter;
 | 
				
			||||||
use ManiaControl\ManiaControl;
 | 
					use ManiaControl\ManiaControl;
 | 
				
			||||||
use ManiaControl\Callbacks\CallbackListener;
 | 
					use ManiaControl\Callbacks\CallbackListener;
 | 
				
			||||||
use ManiaControl\Callbacks\CallbackManager;
 | 
					use ManiaControl\Callbacks\CallbackManager;
 | 
				
			||||||
@@ -145,7 +146,7 @@ class MapManager implements CallbackListener {
 | 
				
			|||||||
		$map = $this->mapListUids[$uid];
 | 
							$map = $this->mapListUids[$uid];
 | 
				
			||||||
		$this->maniaControl->client->query('RemoveMap', $map->fileName);
 | 
							$this->maniaControl->client->query('RemoveMap', $map->fileName);
 | 
				
			||||||
		$this->maniaControl->chat->sendSuccess('Map $<' . $map->name . '$> removed!'); //TODO specified message, who done it?
 | 
							$this->maniaControl->chat->sendSuccess('Map $<' . $map->name . '$> removed!'); //TODO specified message, who done it?
 | 
				
			||||||
		$this->maniaControl->log('Map $<' . $map->name . '$> removed!');
 | 
							$this->maniaControl->log(Formatter::stripCodes('Map $<' . $map->name . '$> removed!'));
 | 
				
			||||||
		unset($this->mapListUids[$uid]);
 | 
							unset($this->mapListUids[$uid]);
 | 
				
			||||||
		unset($this->mapList[$id]);
 | 
							unset($this->mapList[$id]);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -342,7 +343,7 @@ class MapManager implements CallbackListener {
 | 
				
			|||||||
			$this->updateFullMapList();
 | 
								$this->updateFullMapList();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			//Juke requested Map
 | 
								//Juke requested Map
 | 
				
			||||||
			$this->maniaControl->mapManager->jukebox->addMapToJukebox($login, $mapId);
 | 
								$this->maniaControl->mapManager->jukebox->addMapToJukebox($login, $mapInfo['MapUID']);
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		// TODO: add local map by filename
 | 
							// TODO: add local map by filename
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user