mirror of
https://github.com/gamedig/node-gamedig.git
synced 2024-11-18 17:50:37 +01:00
47 lines
2.3 KiB
Text
47 lines
2.3 KiB
Text
|
|
|||
|
/*----------------------------------------------------------------------------------------------------------\
|
|||
|
| |
|
|||
|
| [ LIVE GAME SERVER LIST ] [ <20> RICHARD PERRY FROM GREYCUBE.COM ] |
|
|||
|
| |
|
|||
|
| Released under the terms and conditions of the GNU General Public License Version 3 (http://gnu.org) |
|
|||
|
| |
|
|||
|
\-----------------------------------------------------------------------------------------------------------*/
|
|||
|
|
|||
|
|
|||
|
//------------------------------------------------------------------------------------------------------------+
|
|||
|
//------------------------------------------------------------------------------------------------------------+
|
|||
|
|
|||
|
function lgsl_query_18(&$server, &$lgsl_need, &$lgsl_fp)
|
|||
|
{
|
|||
|
//---------------------------------------------------------+
|
|||
|
// REFERENCE: http://masterserver.savage2.s2games.com
|
|||
|
|
|||
|
fwrite($lgsl_fp, "\x01");
|
|||
|
|
|||
|
$buffer = fread($lgsl_fp, 4096);
|
|||
|
|
|||
|
if (!$buffer) { return FALSE; }
|
|||
|
|
|||
|
//---------------------------------------------------------+
|
|||
|
|
|||
|
$buffer = substr($buffer, 12); // REMOVE HEADER
|
|||
|
|
|||
|
$server['s']['name'] = lgsl_cut_string($buffer);
|
|||
|
$server['s']['players'] = ord(lgsl_cut_byte($buffer, 1));
|
|||
|
$server['s']['playersmax'] = ord(lgsl_cut_byte($buffer, 1));
|
|||
|
$server['e']['time'] = lgsl_cut_string($buffer);
|
|||
|
$server['s']['map'] = lgsl_cut_string($buffer);
|
|||
|
$server['e']['nextmap'] = lgsl_cut_string($buffer);
|
|||
|
$server['e']['location'] = lgsl_cut_string($buffer);
|
|||
|
$server['e']['minimum_players'] = ord(lgsl_cut_string($buffer));
|
|||
|
$server['e']['gamemode'] = lgsl_cut_string($buffer);
|
|||
|
$server['e']['version'] = lgsl_cut_string($buffer);
|
|||
|
$server['e']['minimum_level'] = ord(lgsl_cut_byte($buffer, 1));
|
|||
|
|
|||
|
// DOES NOT RETURN PLAYER INFORMATION
|
|||
|
|
|||
|
//---------------------------------------------------------+
|
|||
|
|
|||
|
return TRUE;
|
|||
|
}
|