added dedibuild to error and usage reporting
This commit is contained in:
@ -183,6 +183,8 @@ class ManiaControl implements CallbackListener, CommandListener, TimerListener,
|
||||
/** @var ModeScriptEventManager $modeScriptEventManager */
|
||||
private $modeScriptEventManager = null;
|
||||
|
||||
private $dedicatedServerBuildVersion = "";
|
||||
|
||||
/**
|
||||
* Construct a new ManiaControl instance
|
||||
*/
|
||||
@ -216,7 +218,6 @@ class ManiaControl implements CallbackListener, CommandListener, TimerListener,
|
||||
$this->pluginManager = new PluginManager($this);
|
||||
$this->updateManager = new UpdateManager($this);
|
||||
|
||||
|
||||
$this->getErrorHandler()->init();
|
||||
|
||||
// Permissions
|
||||
@ -565,6 +566,7 @@ class ManiaControl implements CallbackListener, CommandListener, TimerListener,
|
||||
$this->requestQuitMessage = $message;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Run ManiaControl
|
||||
*/
|
||||
@ -576,9 +578,10 @@ class ManiaControl implements CallbackListener, CommandListener, TimerListener,
|
||||
$this->connect();
|
||||
|
||||
// Check if the version of the server is high enough
|
||||
$version = $this->getClient()->getVersion();
|
||||
if ($version->build < self::MIN_DEDIVERSION) {
|
||||
$this->quit("The Server has Version '{$version->build}', while at least '" . self::MIN_DEDIVERSION . "' is required!", true);
|
||||
$version = $this->getClient()->getVersion();
|
||||
$this->dedicatedServerBuildVersion = $version->build;
|
||||
if ($this->dedicatedServerBuildVersion < self::MIN_DEDIVERSION) {
|
||||
$this->quit("The Server has Version '{$this->dedicatedServerBuildVersion}', while at least '" . self::MIN_DEDIVERSION . "' is required!", true);
|
||||
}
|
||||
|
||||
// Listen for shutdown
|
||||
@ -651,6 +654,16 @@ class ManiaControl implements CallbackListener, CommandListener, TimerListener,
|
||||
$this->getServer()->getScriptManager()->enableScriptCallbacks();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get The Build Version of the Dedicated Server
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDedicatedServerBuildVersion() {
|
||||
return $this->dedicatedServerBuildVersion;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the server
|
||||
*
|
||||
|
Reference in New Issue
Block a user