Last modification: 07/01/12 5:13 PM (EDT)
No syntax errors detected in maprot.php

#!/usr/bin/php
<?php
$maps=array("map1.aamap.xml","map2.aamap.xml");
while ( !feof( STDIN ) ) {
	$line = rtrim(fgets(STDIN, 1024));
	if ( preg_match( "/^ROUND_COMMENCING/", $line ) ){
		$keywords = preg_split("/ /", $line);
		$map = rand (0 , count($maps )-1);
		echo "MAP_FILE ".$maps[$map]."\n";
		echo "WAIT_FOR_EXTERNAL_SCRIPT 0\n";
		sleep(6);
		echo "WAIT_FOR_EXTERNAL_SCRIPT 1\n";
	}
}
?>