Example #1
0
 function onPlayerCancelMatchStart($login)
 {
     \ManiaLive\Utilities\Logger::debug('Player cancel match start: ' . $login);
     $match = $this->matchMakingService->getPlayerCurrentMatch($login, $this->storage->serverLogin, $this->scriptName, $this->titleIdString);
     if ($match !== false && $match->state == Match::PREPARED && array_key_exists($match->id, $this->countDown) && $this->countDown[$match->id] > 0) {
         $this->cancelMatch($login, $match);
     } else {
         if ($match === false) {
             \ManiaLive\Utilities\Logger::debug(sprintf('error: player %s cancel unknown match start', $login));
         } else {
             \ManiaLive\Utilities\Logger::debug(sprintf('error: player %s cancel match start (%d) not in prepared mode', $login, $match->id));
         }
     }
 }