- replaced logMessage() with ManiaControl->log

- Moved Chatlog DATE constant into plugin class
This commit is contained in:
Steffen Schröder
2013-12-31 18:24:40 +01:00
parent 35c1bf0c08
commit 2c4920ce8a
3 changed files with 7 additions and 7 deletions

View File

@ -287,14 +287,14 @@ class Server {
$waitBegin = time();
$maxWaitTime = 20;
$lastStatus = $response['Name'];
logMessage("Waiting for server to reach status {$statusCode}...");
logMessage("Current Status: {$lastStatus}");
$this->maniaControl->log("Waiting for server to reach status {$statusCode}...");
$this->maniaControl->log("Current Status: {$lastStatus}");
while ($response['Code'] !== 4) {
sleep(1);
$this->maniaControl->client->query('GetStatus');
$response = $this->maniaControl->client->getResponse();
if ($lastStatus !== $response['Name']) {
logMessage("New Status: " . $response['Name']);
$this->maniaControl->log("New Status: " . $response['Name']);
$lastStatus = $response['Name'];
}
if (time() - $maxWaitTime > $waitBegin) {