usage reporter update
This commit is contained in:
parent
c9987c80e6
commit
d0bd5b40c3
@ -56,11 +56,17 @@ class UsageReporter implements TimerListener {
|
|||||||
$properties['PlayerCount'] = $this->maniaControl->playerManager->getPlayerCount();
|
$properties['PlayerCount'] = $this->maniaControl->playerManager->getPlayerCount();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$maxPlayers = $this->maniaControl->client->getMaxPlayers();
|
$maxPlayers = $this->maniaControl->client->getMaxPlayers();
|
||||||
$properties['MaxPlayers'] = $maxPlayers["CurrentValue"];
|
$properties['MaxPlayers'] = $maxPlayers["CurrentValue"];
|
||||||
$properties['ScriptName'] = $this->maniaControl->client->getScriptName();
|
|
||||||
} catch(\Exception $e) {
|
} catch(\Exception $e) {
|
||||||
//do nothing
|
$properties['MaxPlayers'] = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$scriptName = $this->maniaControl->client->getScriptName();
|
||||||
|
$properties['ScriptName'] = $scriptName["CurrentValue"];
|
||||||
|
} catch(\Exception $e) {
|
||||||
|
$properties['ScriptName'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$json = json_encode($properties);
|
$json = json_encode($properties);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user