descr change

This commit is contained in:
kremsy 2014-01-10 12:06:47 +01:00
parent c8d45a14a4
commit a925f423a8

View File

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