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

Guests: 32

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 dilbertplus
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 dilbertplus
46.229.x.x forum
5.188.x.x forum
54.221.x.x forum
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 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 dilbertplus
54.36.x.x dilbertplus
54.36.x.x dilbertplus
54.36.x.x forum
54.36.x.x dilbertplus
66.249.x.x forum

Last Seen

tltneon Wed 17:22
Nouton^ Wed 20:07
mrstipfan Wed 10:54
Wussie Mon 01:59
Dodgeitorelse Mon 16:49

Newest Members

Forums
Battalion 1944
EFiNST0RM
Sun Feb 18 2018, 11:35AM
Posts: 12
Joined: Tue Jul 01 2008, 05:21AM
Registered Member #4189
Hi,

Was wondering if someone can help with getting Battalion's query right since its using a modded source query.

I was wondering how I can force these so the server name and player count would be accurate.


$server['s']['name']  = $server['e']['bat_name_s']; 
$server['s']['players']     = $server['e']['bat_player_count_s'];
$server['s']['playersmax']  = $server['e']['bat_max_players_i'];
$server['s']['password']    = $server['e']['bat_has_password_s'];


PS If you need any ip's to test.
https://www.gametracker.com/search/battalion1944/

Thank You.
Wussie
Mon Feb 19 2018, 07:14PM

Posts: 437
Joined: Sun Mar 22 2009, 06:53AM
Registered Member #4938
Hello.
This would be the complete solution. In lgsl_protocol.php find
"bfbc2" => "Battlefield Bad Company 2",
and BEFORE it insert
"btl44" => "Battalion 1944",

Then find
"callofduty" => "02",
and BEFORE it insert
"btl44" => "05",

Then find
"callofduty" => "qtracker://{IP}:{S_PORT}?game=CallOfDuty&action=show",
and BEFORE it insert
"btl44" => "qtracker://{IP}:{S_PORT}?game=HalfLife2&action=show",

Then find
case "cube" : $c_to_q = 1; $c_def = 28785; $q_def = 28786; $c_to_s = 0; break;
and BEFORE it insert
case "btl44" : $c_to_q = 3; $c_def = 7777; $q_def = 7780; $c_to_s = 0; break;

Then, under "function lgsl_query_05(..." find
$server['e']['version'] = lgsl_cut_string($buffer);
and AFTER that insert
if ($server['b']['type'] == 'btl44') $lgsl_need['e'] = true;

Then find
elseif ($response_type == "E") // SOURCE AND HALF-LIFE 1 RULES
{
$returned = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");

while ($buffer)
{
$item_key = strtolower(lgsl_cut_string($buffer));
$item_value = lgsl_cut_string($buffer);

$server['e'][$item_key] = $item_value;
}
}
and REPLACE with
elseif ($response_type == "E") // SOURCE AND HALF-LIFE 1 RULES
{
$total = lgsl_unpack(lgsl_cut_byte($buffer, 2), "S");
$i = 0;

while ($buffer && $i < $total) {
$item_key = strtolower(lgsl_cut_string($buffer));
$server['e'][$item_key] = lgsl_cut_string($buffer);
$i++;
}
if ($server['s']['game'] == 'rekoil' && isset($server['e']['playercount'])) $server['s']['players'] = $server['e']['playercount'];
elseif ($server['b']['type'] == 'btl44' && isset($server['e']['bat_name_s'])) {
$server['s']['name'] = $server['e']['bat_name_s'];
$server['s']['players'] = $server['e']['bat_player_count_s'];
$server['s']['playersmax'] = $server['e']['bat_max_players_i'];
if ($server['e']['bat_has_password_s'] == 'Y') $server['s']['password'] = 1;
}
}


There is no player list in the server response for the time being. Please check if the current map is reported correctly and get back to me.
Looks like once again we are one step ahead of gametracker

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
Dodgeitorelse
Mon Feb 19 2018, 07:59PM
Posts: 246
Joined: Sun Dec 12 2010, 09:16AM
Registered Member #6457


lack of effort on your part requires less effort on my part
Website
EFiNST0RM
Mon Feb 19 2018, 09:29PM
Posts: 12
Joined: Tue Jul 01 2008, 05:21AM
Registered Member #4189
Wussie wrote ...

There is no player list in the server response for the time being. Please check if the current map is reported correctly and get back to me.
Looks like once again we are one step ahead of gametracker


Works perfectly fine thanks for the help. Also the map names are correct!
 

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