original_string: protected function prepare($match)
  	{
  		\ManiaLive\Utilities\Logger::debug($match);
  		$this->players = array_fill_keys($match->players, Services\PlayerInfo::PLAYER_STATE_NOT_CONNECTED);
  		$this->match = $match;
  		$this->matchId = $match->id;
  		Label::EraseAll();
  
  		foreach($match->players as $login)
  		{
  			$this->connection->addGuest((string)$login, true);
  		}
  		$this->connection->restartMap(false, true);
  		$this->connection->executeMulticall();
  
  		$this->enableDedicatedEvents(
  			ServerEvent::ON_PLAYER_CONNECT |
  			ServerEvent::ON_PLAYER_DISCONNECT |
  			ServerEvent::ON_END_MATCH |
  			ServerEvent::ON_END_ROUND |
  			ServerEvent::ON_PLAYER_INFO_CHANGED |
  			ServerEvent::ON_MODE_SCRIPT_CALLBACK |
  			ServerEvent::ON_MODE_SCRIPT_CALLBACK_ARRAY
  		);
  
  		\ManiaLive\Utilities\Logger::debug(sprintf('Preparing match for %s (%s)',$this->lobby->login, implode(',', array_keys($this->players))));
  		$this->changeState(self::WAITING);
  		$this->waitingTime = 0;
  		$this->connection->setForcedTeams(true);
  	}
code: protected function prepare($match)
  	{
  		\ManiaLive\Utilities\Logger::debug($match);
  		$this->players = array_fill_keys($match->players, Services\PlayerInfo::PLAYER_STATE_NOT_CONNECTED);
  		$this->match = $match;
  		$this->matchId = $match->id;
  		Label::EraseAll();
  
  		foreach($match->players as $login)
  		{
  			$this->connection->addGuest((string)$login, true);
  		}
  		$this->connection->restartMap(false, true);
  		$this->connection->executeMulticall();
  
  		$this->enableDedicatedEvents(
  			ServerEvent::ON_PLAYER_CONNECT |
  			ServerEvent::ON_PLAYER_DISCONNECT |
  			ServerEvent::ON_END_MATCH |
  			ServerEvent::ON_END_ROUND |
  			ServerEvent::ON_PLAYER_INFO_CHANGED |
  			ServerEvent::ON_MODE_SCRIPT_CALLBACK |
  			ServerEvent::ON_MODE_SCRIPT_CALLBACK_ARRAY
  		);
  
  		\ManiaLive\Utilities\Logger::debug(sprintf('Preparing match for %s (%s)',$this->lobby->login, implode(',', array_keys($this->players))));
  		$this->changeState(self::WAITING);
  		$this->waitingTime = 0;
  		$this->connection->setForcedTeams(true);
  	}
code_tokens: protected function prepare ( $ match ) { \ ManiaLive \ Utilities \ Logger :: debug ( $ match ) ; $ this -> players = array_fill_keys ( $ match -> players , Services \ PlayerInfo :: PLAYER_STATE_NOT_CONNECTED ) ; $ this -> match = $ match ; $ this -> matchId = $ match -> id ; Label :: EraseAll ( ) ; foreach ( $ match -> players as $ login ) { $ this -> connection -> addGuest ( ( string ) $ login , true ) ; } $ this -> connection -> restartMap ( false , true ) ; $ this -> connection -> executeMulticall ( ) ; $ this -> enableDedicatedEvents ( ServerEvent :: ON_PLAYER_CONNECT | ServerEvent :: ON_PLAYER_DISCONNECT | ServerEvent :: ON_END_MATCH | ServerEvent :: ON_END_ROUND | ServerEvent :: ON_PLAYER_INFO_CHANGED | ServerEvent :: ON_MODE_SCRIPT_CALLBACK | ServerEvent :: ON_MODE_SCRIPT_CALLBACK_ARRAY ) ; \ ManiaLive \ Utilities \ Logger :: debug ( sprintf ( 'Preparing match for %s (%s)' , $ this -> lobby -> login , implode ( ',' , array_keys ( $ this -> players ) ) ) ) ; $ this -> changeState ( self :: WAITING ) ; $ this -> waitingTime = 0 ; $ this -> connection -> setForcedTeams ( true ) ; }
docstring: Prepare the server config to host a match
  Then wait players' connection
  @param Services\Match $match
docstring_tokens: Prepare the server config to host a match Then wait players connection