View Full Version : Enemy Territory: QUAKE Wars Server Feed
badman
07-13-2007, 02:22 PM
If you're looking to build server browser applications for Enemy Territory: QUAKE Wars, the server feed has now been switched over to its permanent address, and is available at http://etqw-ipgetter.demonware.net/ipgetter/.
A simple http request such as
GET /ipgetter/ HTTP/1.0 Host: etqw-ipgetter.demonware.net
to etqw-ipgetter.demonware.net:80 will return you all the IP/port tuples for currently active ETQW Public Beta servers.
The demo server feed is also available at http://etqwdemo-ipgetter.demonware.net/ipgetter/.
Please note that in ETQW 1.4, the client block data has changed into the following:
The player data blocks are now:
short ping;
char name[32]; // NULL-terminated
byte clanTagPosition; // 0: prefix, 1: suffix
char clanTag[32]; // NULL-terminated
byte isBot;
The block after the players is:
int osMask;
byte isRanked;
int timeLeft;
byte gameState;
byte serverType; // 0 for regular server, 1 for tv server
After this, the next block depends on the server type.
For regular servers:
byte numInterestedClients; // number of clients considering joining this server
For tv servers:
int numConnectedClients; // number of clients on the tv server
int maxClients; // max clients that the tv server supports
sponge
07-13-2007, 04:08 PM
For querying the servers, the protocol should be similar to Doom3 with a few different fields. I've got a little server-browser I've been working on, will see if I can get it updated and out, so you can all bask at my shitty amateur C# code.
Sonyfan
07-13-2007, 04:36 PM
Yeah!
Its in our site implemented! http://etqw.splatterladder.com/?mod=serverlist
We have now a actual serverlist with all settings. You can use a permanentfilter for a personal defined serverlist. BTW.... Clans can register a clantag and players can reserve a playername with serverfavorites.
Thanks Badman/SD!:)
Sebultura
07-13-2007, 05:55 PM
Nice news !
Stektr33
07-13-2007, 06:59 PM
i'm writing a server browser as well (.net3.5, c#, sqlce)... i started a codeplex site for it at: http://www.codeplex.com/gameoracle
i've re-written this thing so many times it's not even funny, but after i'm done with my current home project now, i'll be full-speed ahead with my browser.
if anyone's interested for whatever reason, feel free to drop me a line.
and one more thing, my plan for my browser is to combine ase and xfire functionality :)
ApocTGC
07-15-2007, 02:38 PM
Anybody willing to share their code so it can be implemented in ETQW.com?
Stektr33
07-16-2007, 11:52 PM
not quite just yet, but my browser will be open source. i decided to drop my current project and start working on my browser... so i hope i can churn out a beta soon.
dmschaos
07-17-2007, 12:02 AM
I would also love this for burial-grounds.com ;)
codethief
07-18-2007, 02:46 PM
Any native server browser for Linux planned yet? (I'd appreciate a browser for both, ETQW and W:ET. =))
slider
07-18-2007, 04:05 PM
A real xml-feed or webservice with more details would have been nicer.
That way there would be no need for gameserver-query-code on the clientside.
Kamikazee
07-18-2007, 04:28 PM
Ok, a little more info would be nice, but you can't send all server info each time again without consuming loads of bandwidth.
There is some code here: http://jr.terragate.net/gsQuery/docs/
edit: to get the Doom 3 query code you need to get it out of their svn repos
jonny b
07-18-2007, 06:00 PM
id love to add this to www.globaldefenseforce.net
Tr33...
bebar
07-23-2007, 12:54 PM
http://gameq.sourceforge.net/ can query servers too
http://gameq.sourceforge.net/ can query servers too
That guy worked real well out of the box using the doom 3 query object.
TTK-Bandit
07-26-2007, 03:11 PM
Any native server browser for Linux planned yet? (I'd appreciate a browser for both, ETQW and W:ET. =))
I'd bet that XFQ will get ETQW support: http://www.linuxgames.com/xqf/index.shtml
edit: GameQ looks very interesting, thanx for the link.
TTK-Bandit
07-26-2007, 10:46 PM
can we have a detailed list what the game returns on a getinfo ?
I tried adapting the doom3 protocol of gameq, but I always get weird results on the first player.
ortega
07-30-2007, 01:16 AM
can we have a detailed list what the game returns on a getinfo ?
I tried adapting the doom3 protocol of gameq, but I always get weird results on the first player.
I'm the developer for GameQ (http://gameq.sf.net/), thought you'd like to know that it has proper support for Quakewars in the latest release.
I'm the developer for GameQ (http://gameq.sf.net/), thought you'd like to know that it has proper support for Quakewars in the latest release.
Sweet, I'll have to try it out.
TTK-Bandit
07-30-2007, 11:03 PM
nice ortega, going to try it later :)
wh0racle
08-04-2007, 03:51 AM
Can anyone give me an sample ascii request query, right now I'm using "˙˙˙˙getInfo........" but I'm not having any luck.
Sh4wn
08-04-2007, 05:37 PM
Here is de documentation of the doom3 protocol:
http://www.int64.org/docs/gamestat-protocols/doom3.html
I'm going to build a Server browser/manager for Linux. Open source of course.
iiyamamoto
08-05-2007, 12:31 AM
Can anyone give me an sample ascii request query, right now I'm using "˙˙˙˙getInfo........" but I'm not having any luck.
Its difficult to write null character so i think its better to make your request in hexadecimal. I use this request and it work :
\xFF\xFF\x67\x65\x74\x49\x6e\x66\x6f\x00\x07\x00\x 00\x00\x01\x00\x00\x00
Simple example in php to get information packet from the server :
$ip = '66.156.222.165';
$port = 27733;
$fp = fsockopen('udp://'.$ip, $port, $errno, $errstr, 5);
$data = "\xFF\xFF\x67\x65\x74\x49\x6e\x66\x6f\x00\x07\x00\x 00\x00\x01\x00\x00\x00";
fwrite($fp, $data, strlen($data));
$answer = fread($fp, 1024);
fclose($fp);
TTK-Bandit
08-05-2007, 03:48 AM
beta2 playerlist seems to be easier to read, just adapted the gameq protocol easily:
// Players
while ( ($id = $this->p->readInt8()) != 32) {
$this->r->addPlayer('id', $id);
$this->r->addPlayer('ping', $this->p->readInt16());
$this->r->addPlayer('rate', $this->p->readInt16());
// 2 unknown bytes
$this->p->skip();
$this->p->skip();
$this->r->addPlayer('name', $this->p->readString());
$this->r->addPlayer('isbot', $this->p->readInt8());
}
does anyone know about those 2 unknown bytes between rate and name ?
they seem to be 0 on all servers I tried.
wh0racle
08-05-2007, 05:09 AM
Awesome, thanks, that seems to work perfectly. I've included the C# query below, incase anyone is curious.
Also, I have to ask, does anyone know how to issue commands to the server, such as rcon commands?
udpSocket.Bind(new System.Net.IPEndPoint(System.Net.IPAddress.Any, 0));
udpSocket.Connect(endpoint);
udpSocket.SendTo(System.Text.Encoding.Default.GetB ytes("\xFF\xFF\x67\x65\x74\x49\x6e\x66\x6f\x00\x07\x00\x 00\x00\x01\x00\x00\x00"), endpoint);
udpSocket.ReceiveFrom(data, ref endpoint);
udpSocket.Close();
This will return common cvars: players, version, server os etc.
ortega
08-05-2007, 03:59 PM
does anyone know about those 2 unknown bytes between rate and name ?
they seem to be 0 on all servers I tried.
They're always 0 in replies from doom 3 / quake 4 servers as well. Might be some variable(s) they never implemented.
TTK-Bandit
08-05-2007, 07:30 PM
@wh0racle:
check gsQuery at least the q3a protocol has support for rcon commands.
@ortega:
Ok, Thx.
@all:
after a lot of problems with a too big serverlist using GameQ (it stopped working with more than 60ish servers), I wrote a Quakewars minibrowser on my own. Was inspired by GameQ though ;)
you can get it here:
http://gtr.quakedev.com/betagroup/qwminibrowser.zip
was only able to test it with xampp, since my server does not support udp, but if your server supports it, it should work fine.
It is only a very basic version, it checks all servers in the ipgetter list and adds them in a mysql database with a time, so it checks everytime if a serverinformation is older than x seconds (60 by default) it updates the serverinfo, or it updates it if you are only looking at one single server instead of the whole list.
it has html coloring for servername and playernames.
it's not finished yet, I still need to implement the sort and offset parameters, so it does not list all servers in one page.
Since it is only quakewars based there is not much code and you should be able to adapt it easily for your needs, If you have a little php &mysql knowledge..
you just need to adapt some settings in the config.php.inc and call the setup.php once (you can delete it after that)
ortega
08-06-2007, 09:47 AM
after a lot of problems with a too big serverlist using GameQ (it stopped working with more than 60ish servers), I wrote a Quakewars minibrowser on my own. Was inspired by GameQ though ;)
you can get it here:
http://gtr.quakedev.com/betagroup/qwminibrowser.zip
Yeah, this'll be fixed in the next version :)
I took a look at your script, thought you'd might like to know that the $loops variable in qwServerQuery::GetAnswers() is simply a sanity check for unresponsive sockets, it's not related to the number of server requests.
TTK-Bandit
08-06-2007, 11:16 AM
ah ic, thx =)
wh0racle
08-09-2007, 02:42 PM
Have any of you been able to successfully parse the returned server data? I know that Q3 used '\' as a delimiter, and ET:QW doesn't seem to use anything but spaces, which seems a bit odd...
I have come up with a class that grabs all the values, but it's definitely not the way it should be done. Any hints, suggestions or ideas?
TTK-Bandit
08-09-2007, 07:52 PM
yes, check out this code:
http://gtr.quakedev.com/betagroup/qwminibrowser.zip
except from a few unknown variables it is getting all data it should.
TTK-Bandit
08-12-2007, 02:33 AM
@ortega:
I just stepped on this peace of code in the q4 sdk:
typedef struct {
idStr nickname;
idStr clan;
short ping;
int rate;
} scannedClient_t;
so maybe the unknown bytes are for the clan.. since a lot players are not in a qw clan yet, this could explain why its always empty.
I just didn't have the time to test this, but thought this might interest you.
ortega
08-14-2007, 10:42 AM
@ortega:
I just stepped on this peace of code in the q4 sdk:
...
so maybe the unknown bytes are for the clan.. since a lot players are not in a qw clan yet, this could explain why its always empty.
I just didn't have the time to test this, but thought this might interest you.
Actually, it says there the rate is an int, while the ping is a short. The ping variable is currently 2 bytes, that would make the rate 4 bytes. That would indicate the two unknown bytes belong to the rate.
Here's a dump (since these are bots the ping is zero):
id ping rate playername isbot
69 65 73 00 00 00 00 00 00 50 c3 00 00 5e 31 4e ies..... .PĂ..^1N
6f 62 6f 64 79 00 01 01 00 00 50 c3 00 00 44 72 obody... ..PĂ..Dr
2e 20 54 61 73 74 79 00 01 02 00 00 50 c3 00 00 . Tasty. ....PĂ..
5e 32 45 54 51 57 20 4e 30 30 62 00 01 03 00 00 ^2ETQW N 00b.....
50 c3 00 00 4f 27 52 4c 59 00 01 04 00 00 50 c3 PĂ..O'RL Y.....PĂ
00 00 5e 31 46 75 6e 6e 79 20 4e 61 6d 65 20 48 ..^1Funn y Name H
65 72 65 00 01 05 00 00 50 c3 00 00 5e 33 4d 72 ere..... PĂ..^3Mr
2e 20 46 69 78 49 74 21 00 01 06 00 00 50 c3 00 . FixIt! .....PĂ.
00 5e 34 42 61 62 79 20 53 6f 6c 64 61 74 00 01 .^4Baby Soldat..
07 00 00 50 c3 00 00 5e 31 5b 69 64 5d 5e 35 4d ...PĂ..^ 1[id]^5M
I do wonder where/if they left clan info if this is the case.
sponge
08-16-2007, 07:09 AM
ui_clantag is just part of the normal name. It is not treated any differently unlike in Q4. IIRC, there are a couple of extra entries for game mode, game state, time left when querying servers. It's not slash delimited or space delimited, I believe everything is null delimited.
RCon is unchanged from Doom3.
wh0racle
08-16-2007, 02:42 PM
I'm working on a personal weblog of all my code ramblings and just a bunch of random stuff like that. Here (http://wh0racle.com/wordpress/?page_id=4) is a link to the ETQW Query page that I'm working on.. it's still under development, but hopefully it can get someone started. Feel free to give feedback.
Also, if you guys have any ideas that would make it better, or more complete, please let me know: admin@wh0racle.com or comment.
highone
09-02-2007, 10:33 PM
you can get it here:
http://gtr.quakedev.com/betagroup/qwminibrowser.zip
Table qwBrowserDatabase created.
Creating Initial Database, this may take a while..
Fatal error: Call to undefined function: stream_socket_recvfrom() in /home/etqw/public_html/qwMiniBrowser.php on line 158
I get this error whenever I setup the config file and point to the setup.php ...
Any idea what might be wrong?
Line 158 is this:
$response = stream_socket_recvfrom($socket, 2048);
I'm nubbish to the code side of things so I'm not sure exactly what this is trying to tell me.
Thanks for any help... and so far you guys are doing great with this stuff...
Nice work... all of you
TTK-Bandit
09-03-2007, 07:21 PM
your server does not support udp message sending/receiving.
bDamage
09-04-2007, 11:11 PM
Thanks to this forum thread, I manage to update ETSV to support ETQW. :)
ETSV site (http://etsv.cludden.se)
hannes
09-05-2007, 07:20 PM
Any native server browser for Linux planned yet? (I'd appreciate a browser for both, ETQW and W:ET. =))
use xqf! (Placeholder due to too short message)
Thanks to this forum thread, I manage to update ETSV to support ETQW. :)
ETSV site (http://etsv.cludden.se)
could you maybe make the serverlist more userfriendly, with icon for ranked servers and how much bots and players are playing?
and then a filter for bots would be nice too..
thanks (maybe) :)
bDamage
09-09-2007, 05:35 PM
could you maybe make the serverlist more userfriendly, with icon for ranked servers and how much bots and players are playing?
and then a filter for bots would be nice too..
thanks (maybe) :)
Regarding ranked and filter for bots is already done for the upcomming release. Also Gametype filtering is fully implemented including some improvements to sort Punkbuster/Private/Ranked servers.
I will consider how to present number of bots in the main screen without confusing it to much.
Stektr33
09-10-2007, 07:03 PM
If you're looking to build server browser applications for Enemy Territory: QUAKE Wars, the server feed has now been switched over to its permanent address, and is available at http://etqwbeta-ipgetter.demonware.net/ipgetter/.
A simple http request such as
GET /ipgetter/ HTTP/1.0 Host: etqwbeta-ipgetter.demonware.net
to etqwbeta-ipgetter.demonware.net:80 will return you all the IP/port tuples for currently active ETQW Public Beta servers.
The demo and the retail version feeds will have slightly different feeds (more on those closer to release), but this one will work for the ETQW Public Beta.
is this url still valid for the newly released demo?
bDamage
09-10-2007, 11:21 PM
is this url still valid for the newly released demo?
Well not really for the moment (when posting this)... it worked for a short period earlier today.
As he wrote they are going to slighty change this. :o
Guwashi
09-11-2007, 04:33 PM
EDIT: nvm, that url works fine now. thx devs :D
EDIT2: nvm2, look at the post below :)
The demo server feed is now available here:
http://etqwdemo-ipgetter.demonware.net/ipgetter/
bDamage
09-11-2007, 06:29 PM
The demo server feed is now available here:
http://etqwdemo-ipgetter.demonware.net/ipgetter/
You are the MAN! :dance:
Stektr33
09-11-2007, 06:44 PM
danke, danke!!
Sonyfan
09-11-2007, 08:46 PM
We have the new masterserverlist in our database implemented: http://etqw.splatterladder.com/?mod=serverlist
]UBC[ McNite
09-11-2007, 09:08 PM
Nice work Sonyfan, saw u switch today :D
The data block for each client is:
struct client_t {
short ping;
int rate;
char name[32]; // NULL-terminated
byte isBot;
};
The data block following all 32 clients is:
struct serverInfo_t {
int osMask;
byte isRanked;
int timeLeft;
byte gameState;
};
gameState is a bitfield of the following possible items:
For all gametypes (these are three mutually-exclusive):
1 = Warmup/Warmup countdown
2 = Game in progress
4 = Game over, in review screen
For stopwatch:
8 = The return match is active (ie, the second play of the map)
Kamikazee
09-12-2007, 03:01 PM
Ah, that's great for the wiki.
bDamage
09-12-2007, 09:29 PM
The data block for each client is:
struct client_t {
short ping;
int rate;
char name[32]; // NULL-terminated
byte isBot;
};
The data block following all 32 clients is:
struct serverInfo_t {
int osMask;
byte isRanked;
int timeLeft;
byte gameState;
};
gameState is a bitfield of the following possible items:
For all gametypes (these are three mutually-exclusive):
1 = Warmup/Warmup countdown
2 = Game in progress
4 = Game over, in review screen
For stopwatch:
8 = The return match is active (ie, the second play of the map)
Again very useful info... :)
Pulverdings
09-26-2007, 01:09 PM
this should be the server feed for the full version:
http://etqw-ipgetter.demonware.net/ipgetter/
no warranty!
now the first post is updated for the retail version. i was right.
Plasma
10-17-2007, 02:35 AM
I have the code below taken for the SQuery doom3 protacol, could anyone modify this to work for etqw?
<?php
// Still a couple issues with fs_game and si_version to work out
if (isset($_GET['libpath']) || isset($_POST['libpath'])) {
//tampering detected
exit("Variable Override Detected");
}
include_once($libpath."q3a.php");
/**
* @brief Uses the Doom 3 protcol to communicate with the server
* @author Jeremias Reith (jr@gsquery.org)
* @version $Revision: 1.2 $
*
* Uses color code routines from q3a
*/
class doom3 extends q3a
{
function query_server($getPlayers=TRUE,$getRules=TRUE)
{
// flushing old data if necessary
if($this->online) {
$this->_init();
}
$command="\xFF\xFFgetInfo\x00\x00\x00\x00";
if(!($result=$this->_sendCommand($this->address,$this->queryport,$command))) {
$this->errstr='No reply received';
return FALSE;
}
// strip header
$noHeader = substr($result, strpos($result, "\x00\x00", 20)+2);
// $noHeader = substr($result, 23);
// find rules/players separator
$seperatorPos = strpos($noHeader, "\x00\x00");
// extract rule data
$ruleData = substr($noHeader, 0, $seperatorPos);
$rawdata=explode("\x00", $ruleData);
// get rules and basic infos
for($i=0;$i< count($rawdata);$i++) {
switch (strtolower($rawdata[$i++])) {
case 'si_gametype':
$this->gametype=$rawdata[$i];
case 'gamename':
$this->gamename=$rawdata[$i];
break;
case 'si_version':
$this->gameversion=$rawdata[$i];
break;
case 'si_name':
$this->servertitle=$rawdata[$i];
break;
case 'si_map':
$mapdata=explode("/",$rawdata[$i]);
$this->mapname=strtoupper($mapdata[2]);
break;
case 'si_maxplayers':
$this->maxplayers=$rawdata[$i];
break;
case 'si_usepass':
$this->password=$rawdata[$i];
break;
default:
$this->rules[strtolower($rawdata[$i-1])] = $rawdata[$i];
}
}
// game port is identical to query port
$this->hostport = $this->queryport;
$this->online =TRUE;
if(!$getPlayers) {
return TRUE;
}
// getting player data
$playerData = substr($noHeader, $seperatorPos+2);
// length of player data
$len = strlen($playerData)-8;
for($i=0;$i<$len;$i=$posNextPlayer) {
// unpacking ping and client rate
$curPlayer = unpack('@'.$i.'/x/nping/nrate', $playerData);
// finding start offset of next player
$posNextPlayer = strpos($playerData, "\x00", $i+8);
if($posNextPlayer == FALSE) { break; } // abort on bogus data
// extract player name
$curPlayer['name'] = substr($playerData, $i+8, $posNextPlayer-$i-8);
// add player to the list of players
$this->players[$this->numplayers++] = $curPlayer;
}
$this->playerkeys = array('name' => TRUE, 'ping' => TRUE, 'rate' => TRUE);
return TRUE;
}
/* this is for game specific cvar displays */
function docvars($gameserver)
{
switch(strtolower($gameserver->gamename))
{
case "basedoom-1":
$retval="<table cellspacing=0 cellpadding=0 width=\"100%\">"
. " <tr>"
. " <td class=\"row\">"
. " <table cellspacing=0 cellpadding=0>"
. " <tr><td style=\"padding-right: 5px;\">".checkmark()." <font class=\"color\">Spectators:</font></td><td>".($gameserver ->rules["si_spectators"]== 1 ? "Yes" : "No")."</td></tr>"
. " <tr><td style=\"padding-right: 5px;\">".checkmark()." <font class=\"color\">Time Limit:</font></td><td>".$gameserver ->rules["si_timelimit"]."</td></tr>"
. " <tr><td style=\"padding-right: 5px;\">".checkmark()." <font class=\"color\">Frag Limit:</font></td><td>".$gameserver ->rules["si_fraglimit"]."</td></tr>"
. " </table>"
. " </td>"
. " <td class=\"row\">"
. " <table cellspacing=0 cellpadding=0>"
. " <tr><td style=\"padding-right: 5px;\">".checkmark()." <font class=\"color\">Warmup:</font></td><td>".($gameserver ->rules["si_warmup"] == 1 ? "Yes" : "No")."</td></tr>"
. " <tr><td style=\"padding-right: 5px;\">".checkmark()." <font class=\"color\">Pure:</font></td><td>".($gameserver ->rules["si_pure"] == 1 ? "Yes" : "No")."</td></tr>"
. " <tr><td style=\"padding-right: 5px;\">".checkmark()." <font class=\"color\">Team Damage:</font></td><td>".($gameserver ->rules["si_teamdamage"] == 1 ? "Yes" : "No")."</td></tr>"
. " </table>"
. " </td>"
. " </tr>"
. " </table>";
break;
}
return $retval;
}
}
?>
Sh4wn
10-25-2007, 11:34 AM
Will the server feed change after 1.2? (That's what I read in the news article?)
RR2DO2
10-30-2007, 05:39 PM
For 1.2, the client block data has changed into:
short ping;
int rate;
char name[32]; // NULL-terminated
byte clanTagPosition; // 0: prefix, 1: suffix
char clanTag[32]; // NULL-terminated
byte isBot;
Homey
10-30-2007, 05:55 PM
For 1.2, the client block data has changed into:
short ping;
int rate;
char name[32]; // NULL-terminated
byte clanTagPosition; // 0: prefix, 1: suffix
char clanTag[32]; // NULL-terminated
byte isBot;
Exactly what I was looking for! You are my man! Thx dude! :dance:
Dirka_Dirka
10-30-2007, 09:26 PM
For 1.2, the client block data has changed into:
short ping;
int rate;
char name[32]; // NULL-terminated
byte clanTagPosition; // 0: prefix, 1: suffix
char clanTag[32]; // NULL-terminated
byte isBot;
any chance of getting the players score added to that in the future? and/or time played? its rather hit or miss when kicking someone for a slot via rcon if you cant tell which player is inactive or has a low score (either due to poor skill or new to server)
Kamikazee
10-31-2007, 12:20 AM
RCon is a whole different beast compared to server queries. You could make a server command which just sends you all player data.
Dirka_Dirka
11-01-2007, 02:44 AM
RCon is a whole different beast compared to server queries. You could make a server command which just sends you all player data.
the point is, knowing who is doing what before hand really helps. just getting a player listing w.o any info besides their name doesnt help much.
Kamikazee
11-01-2007, 12:58 PM
the point is, knowing who is doing what before hand really helps. just getting a player listing w.o any info besides their name doesnt help much.Well yes, but I don't see why you can't gather that info through RCon when you need to "RConnect" to the server to kick him anyway. (Granted that you are using an external tool.)
So the procedure would be:
- connect to the server using RCon
- list the players using a server-side command (this might not be available right now, but I take it PB commands can already give some info)
- kick that certain player
- disconnect
No server queries are involved here, and I believe that most players going through the server list don't have use of seeing who plays in what team or for how long they've been playing...
Sh4wn
11-01-2007, 02:29 PM
For 1.2, the client block data has changed into:
short ping;
int rate;
char name[32]; // NULL-terminated
byte clanTagPosition; // 0: prefix, 1: suffix
char clanTag[32]; // NULL-terminated
byte isBot;
Ok thanks, another question :D
How can we filter on master server level? Is it UDP based?
Thumper
11-01-2007, 11:51 PM
Has anyone got a new query string for the 1.2 update ?? :confused:
\xff\xff\xff\xffgetStatus\x0a
doesnt work properly anymore :(
Sh4wn
11-04-2007, 10:20 AM
I use this as the Query:
\xFF\xFFgetInfo\x00\x00\x00\x00\x00
gitman
11-08-2007, 02:04 PM
thanks for providing this information!
Sh4wn
11-08-2007, 05:14 PM
Well I researched the query protocol a bit, and found out that the protocol changed pretty damn much.
The request query for the server status is:
\xFF\xFFgetStatus\x00
Also to get the players, you'll need to send an other query, which will be probably \xFF\xFFgetPlayers\x00 but I haven't tested that.
paddxxxx
11-13-2007, 09:32 PM
anyone know's how to calculate timeleft?
i've got the 3 bytes, but i dont know how
dommafia
11-25-2007, 02:24 PM
anyone know's how to calculate timeleft?
i've got the 3 bytes, but i dont know how
According to this article (http://community.enemyterritory.com/forums/showthread.php?t=17976) the timeleft is in milliseconds so you have to divide it by 1000.
spirit
12-09-2007, 03:52 PM
I'm trying to query a game server (not master server!) atm and am a bit confused about the protocol. (This thread seems to mix queries to game servers and master servers.)
How do I know when I'm at the end of the player data? Is there always data for 32 clients, even if <32 are connected? It seems to me that there's data for si_maxPlayers players, but I'm not sure about that.
In other words: what's the delimiter (if any) between client data and the last struct serverInfo_t?
spirit
12-13-2007, 05:01 PM
Will the protocol change in version 1.4?
Sh4wn
12-25-2007, 03:14 PM
I'm trying to query a game server (not master server!) atm and am a bit confused about the protocol. (This thread seems to mix queries to game servers and master servers.)
How do I know when I'm at the end of the player data? Is there always data for 32 clients, even if <32 are connected? It seems to me that there's data for si_maxPlayers players, but I'm not sure about that.
In other words: what's the delimiter (if any) between client data and the last struct serverInfo_t?
as explained here (http://www.return1.net/site/news/read/13/), when parsing players, there'll always be an byte '20', which means player 32. That's the end of players byte.
digibob
01-15-2008, 05:30 PM
In 1.4:
The player data blocks are now:
short ping;
char name[32]; // NULL-terminated
byte clanTagPosition; // 0: prefix, 1: suffix
char clanTag[32]; // NULL-terminated
byte isBot;
The block after the players is:
int osMask;
byte isRanked;
int timeLeft;
byte gameState;
byte serverType; // 0 for regular server, 1 for tv server
After this, the next block depends on the server type.
For regular servers:
byte numInterestedClients; // number of clients considering joining this server
For tv servers:
int numConnectedClients; // number of clients on the tv server
int maxClients; // max clients that the tv server supports
Preparing server admins for 1.4 means it will be available soon? ;) ;) ;) ;) ;)
YeSSS ?? :confused: :confused: :D
edit: NVM is IS out already...
xydil
01-17-2008, 09:54 PM
I've noticed that SplatterLadder is able to pull the team and score information for players from the servers (ranked/unranked alike) somehow. This isn't in the player block. How are they doing this?
i have no idea if its just me beeing too stupid to parse the protocol but it apears to me that some things are just not working out.
This is the end of a scan packet i recieved from a qwtv server while i was on it:
05 00 00 00 | 00 | 00 00 00 00 | 01 | 01 | 00 00 00 00 | 32 00 00 00 |
| | | | | | |
os mask | time left | | num clients max clients
ranked state |
type
the num clients field contains 0 although i was active on the server, it should be 1
:confused:
EDIT:
additionally to that it gives me 11 players without nicks tags, or anything :p
00 00 00
01 00 00 00 00 00 00
02 00 00 00 00 00 00
03 00 00 00 00 00 00
04 00 00 00 00 00 00
05 00 00 00 00 00 00
06 00 00 00 00 00 00
07 00 00 00 00 00 00
08 00 00 00 00 00 00
09 00 00 00 00 00 00
0a 00 00 00 00 00 00
0b 00 00 00 00 00 00
20 05 00 00 00 00 00 00 00 00 01 01 00 00 00 00 32 00 00 00
digibob
01-18-2008, 04:07 PM
i have no idea if its just me beeing too stupid to parse the protocol but it apears to me that some things are just not working out.
This is the end of a scan packet i recieved from a qwtv server while i was on it:
05 00 00 00 | 00 | 00 00 00 00 | 01 | 01 | 00 00 00 00 | 32 00 00 00 |
| | | | | | |
os mask | time left | | num clients max clients
ranked state |
type
the num clients field contains 0 although i was active on the server, it should be 1
Were you on the server, or the repeater? The num clients and max clients are the settings for the repeater, not the server.
digibob
01-18-2008, 04:08 PM
For those of you wanting to get the extended data that splatterladder are using:
The string you should send instead of "getInfo" should be "getInfoEx", and the data is:
byte clientIndex; // 32 for end of list
float xp; // total xp
string teamName; // empty for spectator
int totalKills; // total players killed
int totalDeaths; // total times died
This appears at the end of the message, after all the data previously listed above.
EDIT: Note: this data is customizable by mods, so the data layout can change completely!
T-1000
01-18-2008, 04:17 PM
mmm it will be nice that some niceguy can patch gameq with the extended data
:D
mmm it will be nice that some niceguy can patch gameq with the extended data
:D
i'm still using an old version of gameq and a seperate scanner for qw because in the latest version the normaliser plugin seems to be broken (again)
anyone have a fully working one so i can upgrade, dont feel like fixing the normaliser (again) :p
@digibob
the server in question is a broadcaster as viewers (me) would connect to - it should indicate me as beeing on the server
what about the "empty" players as shown at the end of the post?
xydil
01-18-2008, 08:12 PM
For those of you wanting to get the extended data that splatterladder are using:
The string you should send instead of "getInfo" should be "getInfoEx" . . .
Bless you, my son!
darwinsGate
01-31-2008, 02:41 PM
Is the player rank stored anywhere in the server data stream?
tia, dG
Domipheus
02-01-2008, 10:38 PM
EDIT: Note: this data is customizable by mods, so the data layout can change completely!
Awesome!
hhhhhhh
Guwashi
02-04-2008, 02:00 PM
I wrote a patch of Qstat SVN rev.292 for ET:QW 1.4 (http://d3.jpn.org/gyaase/qstat2.svn.292.doom3.c.etqw.1.4.patch)
When did rate field disappear? 10.19 <= protocolver?
--- doom3.c.orig Mon Feb 4 21:01:02 2008
+++ doom3.c Mon Feb 4 22:04:32 2008
@@ -462,14 +462,21 @@
player->ping = ping;
ptr += 2;
- // Rate
- rate = swap_long_from_little(ptr);
+ if ( 5 == version && 0xa0013 <= protocolver ) // no rate since 10.19?
{
- char buf[16];
- snprintf(buf, sizeof(buf), "%u", rate);
- player_add_info(player, "rate", buf, NO_FLAGS);
+ rate = 25000; // dummy :P
+ }
+ else
+ {
+ // Rate
+ rate = swap_long_from_little(ptr);
+ {
+ char buf[16];
+ snprintf(buf, sizeof(buf), "%u", rate);
+ player_add_info(player, "rate", buf, NO_FLAGS);
+ }
+ ptr += 4;
}
- ptr += 4;
if ( 5 == version && ( ( 0xd0009 == protocolver || 0xd000a == protocolver ) && 0 != num_players ) ) // v13.9 or v13.10
{
Morix
02-04-2008, 07:00 PM
The best feature i my opinion could be: not a different protocol for every patch.
digibob
02-06-2008, 11:48 AM
I wrote a patch of Qstat SVN rev.292 for ET:QW 1.4 (http://d3.jpn.org/gyaase/qstat2.svn.292.doom3.c.etqw.1.4.patch)
When did rate field disappear? 10.19 <= protocolver?
It was removed in 1.4.
The best feature i my opinion could be: not a different protocol for every patch.
Since the clients are no longer compatible, it makes no sense for us to keep the protocol numbers the same.
RickDangerous
03-30-2008, 09:53 PM
http://etqw-ipgetter.demonware.net/ipgetter/
Gives me an error now causing my serverbrowser not to work. Ingame browser seems to work so I gather that one gets it's list somewhere else?
If browse to that address I get: error: could not retrieve data from table
Edit: master server has been fixed...
An_Old_Man
05-02-2008, 09:30 AM
Is it possible to get info from the feed, to see if the server is authenticated ?, if yes where do I look for the info?
Keep up the good work.
RickDangerous
05-02-2008, 06:45 PM
You have to poll the server itself and here's what it returns:
http://community.enemyterritory.com/forums/showpost.php?p=272619&postcount=72
An_Old_Man
05-03-2008, 08:40 AM
Those data are known to me, and this tells if the server is ranked, and stuff like that. The infomation im asking for is, when a server is (re)started, it reports something to some masterserver(s), linux console:
PunkBuster Server: Game Version [ETQW 1.4.12335.12335 linux-x86 Jan 15 2008 12:40:30]
hitch (64 msec)
Dedicated server signed in and is authenticated.
If the server is not authenticated, all connections are refused, the same applies for ranked server too. We are expriencing authentication is lost, both on my rented ranked server in germany 91.198.152.51:27733, and the server I'm running at a hosting center in DK 193.238.184.116:27733, and one running pro at 86.58.131.72:27733 @ a second hosting center i DK. If one of the servers has lost auth, then the other servers has lost it too. I tought it would be a very nice feature for admins, to be able to see status for auth, without connecting to the servers.
Regards
_KaszpiR_
05-27-2008, 02:44 PM
Guwashi, of course your patch works flawlessly with Qstat SVN 2.12 (2008.05.27), below a patch
--- doom3.c 2008-05-27 15:39:37.000000000 +0200
+++ doom3.c.orig 2008-05-27 14:57:50.000000000 +0200
@@ -458,12 +458,7 @@
player->ping = ping;
ptr += 2;
- if ( 5 == version && 0xa0013 <= protocolver ) // no rate since 10.19?
- {
- // Rate
- rate = 25000; // dummy :P
- }
- else
+ if ( 5 != version || 0xa0013 < protocolver )
{
// Rate
rate = swap_long_from_little(ptr);
Guwashi
08-01-2008, 03:51 PM
hmm, http://etqwdemo-ipgetter.demonware.net/ipgetter/ returns only 2 servers...
Has URL of the demo servers been changed?
timestar
08-11-2008, 11:59 AM
Maybe there are only two demo servers now?
LighT_Sh4v0r
08-11-2008, 12:32 PM
I would expect more demo servers, but maybe there really are just 2?
Dilireus
11-09-2008, 05:28 PM
I'm writing an open source multi-protocol game browser in Java and am working on the ETQW protocol at the moment. Can anyone tell me what bytes 17-32 represent in the response to a 'getInfoEx' query? How about the bytes immediately following the gameState byte and before the extended player data? Also, what are the various bits in the osMask field?
http://i118.photobucket.com/albums/o95/dilireus/AKMonETQW.png
Guwashi
11-29-2008, 10:08 AM
both of these url are not working now...
http://etqw-ipgetter.demonware.net/ipgetter/
http://etqwdemo-ipgetter.demonware.net/ipgetter/
looks id software lose their interest about ET:QW. btw, I don't care :P
Dilireus
12-01-2008, 09:49 PM
both of these url are not working now...
http://etqw-ipgetter.demonware.net/ipgetter/
http://etqwdemo-ipgetter.demonware.net/ipgetter/
Yes, I noticed this as well. Database error perhaps?