added scripttitle to usage reporter
This commit is contained in:
parent
505b84169f
commit
2d18062bee
@ -54,9 +54,11 @@ class UsageReporter implements TimerListener {
|
|||||||
$properties['TitleId'] = $this->maniaControl->server->titleId;
|
$properties['TitleId'] = $this->maniaControl->server->titleId;
|
||||||
$properties['ServerName'] = $this->maniaControl->server->getName();
|
$properties['ServerName'] = $this->maniaControl->server->getName();
|
||||||
$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['ScriptTitle'] = $this->maniaControl->client->getScriptName();
|
||||||
} catch(\Exception $e) {
|
} catch(\Exception $e) {
|
||||||
//do nothing
|
//do nothing
|
||||||
}
|
}
|
||||||
@ -65,10 +67,10 @@ class UsageReporter implements TimerListener {
|
|||||||
$info = base64_encode($json);
|
$info = base64_encode($json);
|
||||||
|
|
||||||
$this->maniaControl->fileReader->loadFile(UpdateManager::URL_WEBSERVICE . "/usagereport?info=" . $info, function ($response, $error) {
|
$this->maniaControl->fileReader->loadFile(UpdateManager::URL_WEBSERVICE . "/usagereport?info=" . $info, function ($response, $error) {
|
||||||
$response = json_decode($response);
|
$response = json_decode($response);
|
||||||
if ($error || !$response) {
|
if ($error || !$response) {
|
||||||
$this->maniaControl->log("Error while Sending data: " . $error);
|
$this->maniaControl->log("Error while Sending data: " . $error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user