Several serverquery bugs & their fixes.

General forum for discussions regarding UTStatsDB
Warden64
Posts: 8
Joined: Wed Feb 18, 2009 11:36 am

Several serverquery bugs & their fixes.

Postby Warden64 » Tue Jul 05, 2011 6:20 am

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).
Attachments
serverquery.php
My version of serverquery with described fixes.
(43.65 KiB) Downloaded 367 times

MasterIT
Posts: 1
Joined: Sun Jul 17, 2011 2:13 pm

Re: Several serverquery bugs & their fixes.

Postby MasterIT » Sun Jul 17, 2011 2:18 pm

Thx for Captcha repair.
Now I register successfully. ;)


Return to “UTStatsDB”