Page 1 of 1

Several serverquery bugs & their fixes.

Posted: Tue Jul 05, 2011 6:20 am
by Warden64
1. Not a bug, but useful information: if your server couldn't query by "Unreal" query type (and also it doesn't appears at gametracker.com) - check you settings in server.ini:

Code: Select all

[IpDrv.MasterServerUplink] DoUplink=True UplinkToGamespy=True

2. How to add filter for special chars in "Unreal" type query (if you use servercolor mut - there will appear non-ASCII chars in server name):
In serverquery.php after line 735 (websvn version of serverquery) where placed this text:

Code: Select all

case "hostport": $val = intval($val); break;
Add those lines:

Code: Select all

case "hostname": $val = stripspecialchars ($val); break;

3. Real bug with tables in extended serverquery (it show team info, ServerExt is required there). It reproduces if team contains only bots. As you can see at screenshot after team info, script close not only current table, but also outer one.
Image
To fix it need to find in serverquery.php loop "foreach ($sq_bot as $bot)" (line 1568 in websvn version) and change text below, from:

Code: Select all

if (!$header) { if (!$teamnum) { echo <<<EOF <tr> <td> <table class="status" cellspacing="0" cellpadding="1" width="100%"> <tr> <td class="statustitle" align="center" colspan="$ncol">
To:

Code: Select all

if (!$header) { echo <<<EOF <tr> <td> <table class="status" cellspacing="0" cellpadding="1" width="100%"> EOF; if (!$teamnum) { echo <<<EOF <tr> <td class="dark" align="center" colspan="$ncol">

PS. Many thanks to Warden64 for account, because now is impossible to register due to broken captcha verification.

My current version of serverquery.php also attached (it based on v3.06 release serverquery.php file).

Re: Several serverquery bugs & their fixes.

Posted: Sun Jul 17, 2011 2:18 pm
by MasterIT
Thx for Captcha repair.
Now I register successfully. ;)