small dedimania improvements
This commit is contained in:
parent
fc02be2352
commit
86e0eeda67
@ -581,7 +581,6 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
||||
|
||||
$content = $this->encode_request(self::DEDIMANIA_CHECK_SESSION, array($this->dedimaniaData->sessionId));
|
||||
|
||||
//$this->maniaControl->fileReader->postDataTest($this->request, self::DEDIMANIA_URL, function ($data, $error) {
|
||||
$asyncHttpRequest = new AsyncHttpRequest($this->maniaControl, self::DEDIMANIA_URL);
|
||||
$asyncHttpRequest->setCallable(function ($data, $error) {
|
||||
if ($error) {
|
||||
@ -638,7 +637,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
||||
$asyncHttpRequest = new AsyncHttpRequest($this->maniaControl, self::DEDIMANIA_URL);
|
||||
$asyncHttpRequest->setCallable(function ($data, $error) use (&$player) {
|
||||
if ($error) {
|
||||
Logger::logError("Dedimania Error while player connect: " . $error);
|
||||
$this->openDedimaniaSession();
|
||||
}
|
||||
|
||||
$data = $this->decode($data);
|
||||
@ -690,7 +689,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
||||
$asyncHttpRequest = new AsyncHttpRequest($this->maniaControl, self::DEDIMANIA_URL);
|
||||
$asyncHttpRequest->setCallable(function ($data, $error) {
|
||||
if ($error) {
|
||||
Logger::logError("Dedimania Error while player disconnect: " . $error);
|
||||
$this->openDedimaniaSession();
|
||||
}
|
||||
|
||||
$data = $this->decode($data);
|
||||
@ -732,6 +731,9 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
||||
return;
|
||||
}
|
||||
|
||||
//Make Sure Dedimania Session is okay
|
||||
$this->checkDedimaniaSession();
|
||||
|
||||
// Send dedimania records
|
||||
$gameMode = $this->getGameModeString();
|
||||
$times = array();
|
||||
|
Loading…
Reference in New Issue
Block a user