descr change
This commit is contained in:
		| @@ -3,12 +3,11 @@ | ||||
| namespace ManiaControl\Server; | ||||
|  | ||||
| use FML\Controls\Quads\Quad_Icons128x32_1; | ||||
| use FML\Controls\Quads\Quad_Icons64x64_1; | ||||
| use ManiaControl\ManiaControl; | ||||
| use ManiaControl\Admin\AuthenticationManager; | ||||
| use ManiaControl\Callbacks\CallbackListener; | ||||
| use ManiaControl\Callbacks\CallbackManager; | ||||
| use ManiaControl\Commands\CommandListener; | ||||
| use ManiaControl\ManiaControl; | ||||
| use ManiaControl\Manialinks\ManialinkPageAnswerListener; | ||||
| use ManiaControl\Players\Player; | ||||
|  | ||||
| @@ -64,19 +63,21 @@ class ServerCommands implements CallbackListener, CommandListener, ManialinkPage | ||||
| 		$itemQuad = new Quad_Icons128x32_1(); //TODO check if mode supports it | ||||
| 		$itemQuad->setSubStyle($itemQuad::SUBSTYLE_ManiaLinkSwitch); | ||||
| 		$itemQuad->setAction(self::ACTION_SET_PAUSE); | ||||
| 		$this->maniaControl->actionsMenu->addAdminMenuItem($itemQuad, 1, 'Pauses the current map.'); | ||||
| 		$this->maniaControl->actionsMenu->addAdminMenuItem($itemQuad, 1, 'Pauses the current game.'); | ||||
|  | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Breaks the current game | ||||
| 	 * | ||||
| 	 * @param array $callback | ||||
| 	 */ | ||||
| 	public function setPause(array $callback) { | ||||
| 		$this->maniaControl->client->query('SendModeScriptCommands', array('Command_ForceWarmUp' => True)); | ||||
| 		$success = $this->maniaControl->client->getResponse(); | ||||
| 		if(!$success) | ||||
| 			$this->maniaControl->chat->sendError("Error while setting the break"); | ||||
| 		if(!$success) { | ||||
| 			$this->maniaControl->chat->sendError("Error while setting the pause"); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| @@ -114,8 +115,7 @@ class ServerCommands implements CallbackListener, CommandListener, ManialinkPage | ||||
| 			return; | ||||
| 		} | ||||
| 		$systemInfo = $this->maniaControl->server->getSystemInfo(); | ||||
| 		$message = 'SystemInfo: ip=' . $systemInfo['PublishedIp'] . ', port=' . $systemInfo['Port'] . ', p2pPort=' . | ||||
| 				 $systemInfo['P2PPort'] . ', title=' . $systemInfo['TitleId'] . ', login=' . $systemInfo['ServerLogin'] . '.'; | ||||
| 		$message    = 'SystemInfo: ip=' . $systemInfo['PublishedIp'] . ', port=' . $systemInfo['Port'] . ', p2pPort=' . $systemInfo['P2PPort'] . ', title=' . $systemInfo['TitleId'] . ', login=' . $systemInfo['ServerLogin'] . '.'; | ||||
| 		$this->maniaControl->chat->sendInformation($message, $player->login); | ||||
| 	} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user