stores datadirectory of server
This commit is contained in:
parent
45be144ccc
commit
0b6a8b3912
@ -30,6 +30,7 @@ class Server implements CallbackListener {
|
|||||||
public $p2pPort = -1;
|
public $p2pPort = -1;
|
||||||
public $login = null;
|
public $login = null;
|
||||||
public $titleId = null;
|
public $titleId = null;
|
||||||
|
public $dataDirectory = '';
|
||||||
public $serverCommands = null;
|
public $serverCommands = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -130,11 +131,14 @@ class Server implements CallbackListener {
|
|||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getDataDirectory() {
|
public function getDataDirectory() {
|
||||||
if(!$this->maniaControl->client->query('GameDataDirectory')) {
|
if($this->dataDirectory == '') {
|
||||||
trigger_error("Couldn't get data directory. " . $this->maniaControl->getClientErrorText());
|
if(!$this->maniaControl->client->query('GameDataDirectory')) {
|
||||||
return null;
|
trigger_error("Couldn't get data directory. " . $this->maniaControl->getClientErrorText());
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
$this->dataDirectory = $this->maniaControl->client->getResponse();
|
||||||
}
|
}
|
||||||
return $this->maniaControl->client->getResponse();
|
return $this->dataDirectory;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user