Username:    Password:        Click Here To Signup     Forgotten Password
Main Menu
Online
Members: 0

Guests: 34

167.86.x.x forum
178.255.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x dilbertplus
46.229.x.x forum
46.229.x.x forum
46.229.x.x dilbertplus
46.229.x.x forum
46.4.x.x forum
54.173.x.x forum
54.36.x.x user
54.36.x.x dilbertplus
54.36.x.x lgsl
54.36.x.x user
54.36.x.x forum
54.36.x.x forum
54.36.x.x top
54.36.x.x dilbertplus
54.36.x.x forum
54.36.x.x forum
54.36.x.x user
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum

Last Seen

4Rsercom Thu 21:49
Apophis01 Fri 10:15
Bommel Wed 09:39
frob Sat 21:14
ODDBALL118 Fri 17:07

Newest Members

Forums
Quake 1? NOT Quake World!
Hajas
Mon Jan 20 2014, 07:55PM
Posts: 4
Joined: Tue Jul 06 2010, 01:09PM
Registered Member #6136
Hello, any way to add Quake 1 on the LGSL? is not Quake World... tryed QW and other Quakes but nothing works, also gamespy...

the server can be query @ http://www.quake1.net/servers/?177.189.206.154

any ideas?

thanks!
Website
Wussie
Tue Jan 21 2014, 07:14PM

Posts: 437
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
Hi.
Looks like Quake 1 uses a different query protocol on port 26000 as default, unlike Quakeworld which uses 27500.

I managed to query a few servers and I'll try decoding the responses these days.
Anyone feel free to share any info on this matter or maybe an existing protocol which works with Quake 1.

Edit: just found some info about the network protocol at http://www.gamers.org/dEngine/quake/QDP/qnp.html and I'm working on a solution.

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
Wussie
Mon Jan 27 2014, 07:45PM

Posts: 437
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
Although this is quite an old game, I felt that the very first title in the celebrated Quake series definitely has it's place on LGSL's supported list, so it was about time someone wrote a protocol just for it. Why not me?
The function I wrote below does multiple queries in order to get all the info from servers, so it's slower than other protocols, but this seems to be the only way for quake 1 (netquake). By the way, I release this code under the GPL licensing conditions, so that nobody should have to pay for it.
You can start off with the original, unmodified lgsl_protocol.php and find
"quake2" => "Quake 2",
BEFORE this line you insert:
"quake" => "Quake",

Before
"quake2" => "02",
insert
"quake" => "37",

Before
"quake2" => "qtracker://{IP}:{S_PORT}?game=Quake2&action=show",
insert
"quake" => "http://en.wikipedia.org/wiki/Quake_(video_game)",

Then, somewhere before "function lgsl_query_feed(..." insert
//------------------------------------------------------------------------------------------------------------+

function lgsl_query_37(&$server, &$lgsl_need, &$lgsl_fp)
{
fwrite($lgsl_fp, "\x80\x00\x00\x0C\x02QUAKE\x00\x03"); // request status
$buffer = fread($lgsl_fp, 4096);
if (!$buffer) { return FALSE; }

$buffer = substr($buffer, 5, -1); lgsl_cut_string($buffer, 0, "\x00");
$server['s']['name'] = lgsl_cut_string($buffer, 0, "\x00");
$server['s']['map'] = lgsl_cut_string($buffer, 0, "\x00");
$server['s']['players'] = ord(substr($buffer, 0, 1));
$server['s']['playersmax'] = ord(substr($buffer, 1, 1));

if ($lgsl_need['p'] && $server['s']['players']) {
for ($i = 0; $i < $server['s']['players']; $i++) {
fwrite($lgsl_fp, "\x80\x00\x00\x06\x03".chr($i)); // request players
}
for ($i = 0; $i < $server['s']['players']; $i++) {
if (!$buffer = fread($lgsl_fp, 4096)) { break; }
$server['p'][$i]['name'] = lgsl_parse_color(lgsl_cut_string($buffer, 6, "\x00"), 'quakeworld');
$server['p'][$i]['frags'] = ord(substr($buffer, 4, 1));
if ($server['p'][$i]['frags'] > 128) { $server['p'][$i]['frags'] = $server['p'][$i]['frags']-256; }
$server['p'][$i]['time'] = lgsl_time(ord(substr($buffer, 8, 1))+256*ord(substr($buffer, 9, 1)));
}
}
if ($lgsl_need['e']) { $rule = '';
do { fwrite($lgsl_fp, "\x80\x00\x00".chr(strlen($rule)+6)."\x04{$rule}\x00"); // request rules
$buffer = fread($lgsl_fp, 4096);
$rule = lgsl_cut_string($buffer, 5, "\x00");
if (!$rule || $rule == 'cmdline') { break; }
$server['e'][$rule] = lgsl_cut_string($buffer, 0, "\x00");
}
while ($rule);
}
return TRUE;
}

//------------------------------------------------------------------------------------------------------------+

$q_port=$c_port and it's usually 26000.
Let me know if it's possible to make a password protected netquake server, so I can add support for showing the "online with password" flag (contact me so we can arrange a brief test for it). Enjoy!

Edit: updated the code above for a minor speed up of the query.

Not working for you?
Don't forget to share the IP/ports of the offending server so that people can do tests and help you.
Oh, and if you're using a modified lgsl_protocol.php, make sure you disable the feed or it may NOT work!
Website
 

Jump:     Back to top


You are not logged in - Click Here To Signup

Username:    Password:   

Mini Buttons

.... © GreyCube.com - Richard Perry - Powered by e107.org