mirror of
https://github.com/tribufu/node-gamedig
synced 2026-06-01 09:42:41 +00:00
Super epic commit 3
Move everything around Add another 50 or so games *** 'port' option should now be CONNECT port, not query port *** add reference for many missing games
This commit is contained in:
parent
8488cdcca9
commit
bc6b5c9225
64 changed files with 2071 additions and 430 deletions
40
reference/gtr2.txt
Normal file
40
reference/gtr2.txt
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
|
||||
/*----------------------------------------------------------------------------------------------------------\
|
||||
| |
|
||||
| [ LIVE GAME SERVER LIST ] [ © 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_15(&$server, &$lgsl_need, &$lgsl_fp)
|
||||
{
|
||||
//---------------------------------------------------------+
|
||||
|
||||
fwrite($lgsl_fp, "GTR2_Direct_IP_Search\x00");
|
||||
|
||||
$buffer = fread($lgsl_fp, 4096);
|
||||
|
||||
if (!$buffer) { return FALSE; }
|
||||
|
||||
//---------------------------------------------------------+
|
||||
|
||||
$buffer = str_replace("\xFE", "\xFF", $buffer);
|
||||
$buffer = explode("\xFF", $buffer);
|
||||
|
||||
$server['s']['name'] = $buffer[3];
|
||||
$server['s']['game'] = $buffer[7];
|
||||
$server['e']['version'] = $buffer[11];
|
||||
$server['e']['hostport'] = $buffer[15];
|
||||
$server['s']['map'] = $buffer[19];
|
||||
$server['s']['players'] = $buffer[25];
|
||||
$server['s']['playersmax'] = $buffer[27];
|
||||
$server['e']['gamemode'] = $buffer[31];
|
||||
|
||||
// DOES NOT RETURN PLAYER INFORMATION
|
||||
|
||||
//---------------------------------------------------------+
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue