diff --git a/application/core/Maps/MapManager.php b/application/core/Maps/MapManager.php index 56538238..c5bb0983 100644 --- a/application/core/Maps/MapManager.php +++ b/application/core/Maps/MapManager.php @@ -498,7 +498,7 @@ class MapManager implements CallbackListener { return; } - $serverInfo = $this->maniaControl->server->getSystemInfo(); + $serverInfo = $this->maniaControl->client->getSystemInfo(); $title = strtolower(substr($serverInfo->titleId, 0, 2)); $url = "http://{$title}.mania-exchange.com/tracks/download/{$mapInfo->id}"; diff --git a/application/core/Server/Server.php b/application/core/Server/Server.php index 0a710295..70854a15 100644 --- a/application/core/Server/Server.php +++ b/application/core/Server/Server.php @@ -66,7 +66,7 @@ class Server implements CallbackListener { */ private function updateProperties() { // System info - $systemInfo = $this->getSystemInfo(); + $systemInfo = $this->maniaControl->client->getSystemInfo(); $this->ip = $systemInfo->publishedIp; $this->port = $systemInfo->port; $this->p2pPort = $systemInfo->p2PPort; @@ -205,43 +205,6 @@ class Server implements CallbackListener { return $this->maniaControl->client->getMainServerPlayerInfo(); } - /** - * Get Server Options - * - * @return ServerOptions - */ - public function getOptions() { - return $this->maniaControl->client->getServerOptions(); - } - - /** - * Fetch current Server Name - * - * @return string - */ - public function getName() { - return $this->maniaControl->client->getServerName(); - } - - - /** - * Fetch Server Version - * - * @return Version - */ - public function getVersion() { - return $this->maniaControl->client->getVersion(); - } - - /** - * Fetch Server System Info - * - * @return SystemInfos - */ - public function getSystemInfo() { - return $this->maniaControl->client->getSystemInfo(); - } - /** * Fetch current Game Mode * diff --git a/application/core/Server/ServerCommands.php b/application/core/Server/ServerCommands.php index 45df4971..256535ac 100644 --- a/application/core/Server/ServerCommands.php +++ b/application/core/Server/ServerCommands.php @@ -257,7 +257,7 @@ class ServerCommands implements CallbackListener, CommandListener, ManialinkPage $this->maniaControl->authenticationManager->sendNotAllowed($player); return; } - $systemInfo = $this->maniaControl->server->getSystemInfo(); + $systemInfo = $this->maniaControl->client->getSystemInfo(); $message = 'SystemInfo: ip=' . $systemInfo->publishedIp . ', port=' . $systemInfo->port . ', p2pPort=' . $systemInfo->p2PPort . ', title=' . $systemInfo->titleId . ', login=' . $systemInfo->serverLogin . '.'; $this->maniaControl->chat->sendInformation($message, $player->login); } diff --git a/application/core/Server/UsageReporter.php b/application/core/Server/UsageReporter.php index f11dd5cb..adc6e14d 100644 --- a/application/core/Server/UsageReporter.php +++ b/application/core/Server/UsageReporter.php @@ -54,7 +54,7 @@ class UsageReporter implements TimerListener { $properties['PHPVersion'] = phpversion(); $properties['ServerLogin'] = $this->maniaControl->server->login; $properties['TitleId'] = $this->maniaControl->server->titleId; - $properties['ServerName'] = Formatter::stripDirtyCodes($this->maniaControl->server->getName()); + $properties['ServerName'] = Formatter::stripDirtyCodes($this->maniaControl->client->getServerName()); $properties['PlayerCount'] = $this->maniaControl->playerManager->getPlayerCount(); $maxPlayers = $this->maniaControl->client->getMaxPlayers(); diff --git a/application/plugins/Dedimania/Dedimania.php b/application/plugins/Dedimania/Dedimania.php index 6a0dedf2..5dddf8db 100644 --- a/application/plugins/Dedimania/Dedimania.php +++ b/application/plugins/Dedimania/Dedimania.php @@ -57,7 +57,7 @@ class Dedimania implements CallbackListener, TimerListener, Plugin { private function openDedimaniaSession($init = false) { // Open session $serverInfo = $this->maniaControl->server->getInfo(); - $serverVersion = $this->maniaControl->server->getVersion(); + $serverVersion = $this->maniaControl->client->getVersion(); $packMask = substr($this->maniaControl->server->titleId, 2); $this->dedimaniaData = new DedimaniaData("abc", "cde", $serverInfo->path, $packMask, $serverVersion); diff --git a/application/plugins/Donations.php b/application/plugins/Donations.php index 10733f1c..67920f95 100644 --- a/application/plugins/Donations.php +++ b/application/plugins/Donations.php @@ -316,7 +316,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin { $receiverName = ($receiverPlayer ? $receiverPlayer['NickName'] : $receiver); } else { $receiver = ''; - $receiverName = $this->maniaControl->server->getName(); + $receiverName = $this->maniaControl->client->getServerName(); } return $this->handleDonation($player, $amount, $receiver, $receiverName); @@ -330,7 +330,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin { */ private function handleDonation(Player $player, $amount, $receiver = '', $receiverName = false) { if (!$receiverName) { - $receiverName = $this->maniaControl->server->getName(); + $receiverName = $this->maniaControl->client->getServerName(); } $message = 'Donate ' . $amount . ' Planets to $<' . $receiverName . '$>?'; @@ -376,7 +376,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin { } else { $receiver = $player->login; } - $message = 'Payout from $<' . $this->maniaControl->server->getName() . '$>.'; + $message = 'Payout from $<' . $this->maniaControl->client->getServerName() . '$>.'; try { $bill = $this->maniaControl->client->pay($receiver, $amount, $message); diff --git a/application/plugins/WidgetPlugin.php b/application/plugins/WidgetPlugin.php index ae84f7ae..83671e87 100644 --- a/application/plugins/WidgetPlugin.php +++ b/application/plugins/WidgetPlugin.php @@ -306,7 +306,7 @@ class WidgetPlugin implements CallbackListener, TimerListener, Plugin { $maxSpectators = $this->maniaControl->client->getMaxSpectators(); - $serverName = $this->maniaControl->server->getName(); + $serverName = $this->maniaControl->client->getServerName(); $players = $this->maniaControl->playerManager->getPlayers(); $playerCount = 0;