stores datadirectory of server

This commit is contained in:
kremsy 2014-01-11 11:01:42 +01:00 committed by Steffen Schröder
parent 45be144ccc
commit 0b6a8b3912

View File

@ -30,6 +30,7 @@ class Server implements CallbackListener {
public $p2pPort = -1;
public $login = null;
public $titleId = null;
public $dataDirectory = '';
public $serverCommands = null;
/**
@ -130,11 +131,14 @@ class Server implements CallbackListener {
* @return string
*/
public function getDataDirectory() {
if($this->dataDirectory == '') {
if(!$this->maniaControl->client->query('GameDataDirectory')) {
trigger_error("Couldn't get data directory. " . $this->maniaControl->getClientErrorText());
return null;
}
return $this->maniaControl->client->getResponse();
$this->dataDirectory = $this->maniaControl->client->getResponse();
}
return $this->dataDirectory;
}
/**