cherry pick maniaplanet lib 6.1

This commit is contained in:
Beu
2024-08-25 22:30:06 +02:00
parent 3044e466b9
commit c8bbb3d7c6
18 changed files with 1626 additions and 1698 deletions

View File

@ -299,7 +299,6 @@ class ManiaControl implements CallbackListener, CommandListener, TimerListener,
}
// Delete client
Connection::delete($this->getClient());
$this->client = null;
}
@ -722,7 +721,7 @@ class ManiaControl implements CallbackListener, CommandListener, TimerListener,
Logger::log("Connecting to Server at {$serverConfig->host}:{$serverConfig->port}...");
try {
$this->client = Connection::factory($serverConfig->host, $serverConfig->port, self::SCRIPT_TIMEOUT, $serverConfig->user, $serverConfig->pass, self::API_VERSION);
$this->client = new Connection($serverConfig->host, $serverConfig->port, self::SCRIPT_TIMEOUT, $serverConfig->user, $serverConfig->pass, self::API_VERSION);
} catch (TransportException $exception) {
$message = "Couldn't connect to the server: '{$exception->getMessage()}'";
$this->quit($message, true);