usage reporter update

This commit is contained in:
kremsy authored and Steffen Schröder committed 2014-05-01 17:35:15 +02:00
1 parent c9987c80e6
commit d0bd5b40c3
1 file changed
+8 -2
+8 -2
View File
@@ -58,9 +58,15 @@ class UsageReporter implements TimerListener {
try {
$maxPlayers = $this->maniaControl->client->getMaxPlayers();
$properties['MaxPlayers'] = $maxPlayers["CurrentValue"];
$properties['ScriptName'] = $this->maniaControl->client->getScriptName();
} 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);