MatchMakingLobby/Services/MatchMakingService.php
function registerMatch($serverLogin, Match $match, $scriptName, $titleIdString, $lobbyLogin)
	{
		$this->db->execute('BEGIN');
		try
		{
			$this->db->execute(
				'INSERT INTO Matches (creationDate, state, matchServerLogin, scriptName, titleIdString, lobbyLogin) '.
				'VALUES (NOW(), -1, %s, %s, %s, %s)',
				$this->db->quote($serverLogin),
				$this->db->quote($scriptName),
				$this->db->quote($titleIdString),
				$this->db->quote($lobbyLogin)
			);
			$matchId = $this->db->insertID();

			$this->updateServerCurrentMatchId($matchId, $serverLogin, $scriptName, $titleIdString);

			foreach($match->players as $player)
			{
				$this->addMatchPlayer($matchId, $player, $match->getTeam($player));
			}
			$this->db->execute('COMMIT');
		}
		catch(\Exception $e)
		{
			$this->db->execute('ROLLBACK');
			throw $e;
		}

		return $matchId;
	}
function registerMatch($serverLogin, Match $match, $scriptName, $titleIdString, $lobbyLogin)
	{
		$this->db->execute('BEGIN');
		try
		{
			$this->db->execute(
				'INSERT INTO Matches (creationDate, state, matchServerLogin, scriptName, titleIdString, lobbyLogin) '.
				'VALUES (NOW(), -1, %s, %s, %s, %s)',
				$this->db->quote($serverLogin),
				$this->db->quote($scriptName),
				$this->db->quote($titleIdString),
				$this->db->quote($lobbyLogin)
			);
			$matchId = $this->db->insertID();

			$this->updateServerCurrentMatchId($matchId, $serverLogin, $scriptName, $titleIdString);

			foreach($match->players as $player)
			{
				$this->addMatchPlayer($matchId, $player, $match->getTeam($player));
			}
			$this->db->execute('COMMIT');
		}
		catch(\Exception $e)
		{
			$this->db->execute('ROLLBACK');
			throw $e;
		}

		return $matchId;
	}
function registerMatch ( $ serverLogin , Match $ match , $ scriptName , $ titleIdString , $ lobbyLogin ) { $ this -> db -> execute ( 'BEGIN' ) ; try { $ this -> db -> execute ( 'INSERT INTO Matches (creationDate, state, matchServerLogin, scriptName, titleIdString, lobbyLogin) ' . 'VALUES (NOW(), -1, %s, %s, %s, %s)' , $ this -> db -> quote ( $ serverLogin ) , $ this -> db -> quote ( $ scriptName ) , $ this -> db -> quote ( $ titleIdString ) , $ this -> db -> quote ( $ lobbyLogin ) ) ; $ matchId = $ this -> db -> insertID ( ) ; $ this -> updateServerCurrentMatchId ( $ matchId , $ serverLogin , $ scriptName , $ titleIdString ) ; foreach ( $ match -> players as $ player ) { $ this -> addMatchPlayer ( $ matchId , $ player , $ match -> getTeam ( $ player ) ) ; } $ this -> db -> execute ( 'COMMIT' ) ; } catch ( \ Exception $ e ) { $ this -> db -> execute ( 'ROLLBACK' ) ; throw $ e ; } return $ matchId ; }
Register a match in database, the match Server will use this to ready up
@param string $serverLogin
@param \ManiaLivePlugins\MatchMakingLobby\Services\Match $match
@param string $scriptName
@param string $titleIdString
@return int $matchId
Register a match in database the match Server will use this to ready up