Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

kollesofthome

Pinging and getting info from a Quake 3 OSP server.

This topic is 5885 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I can''t find any information about pinging and getting info such as current map, players and scores from a Quake 3 OSP server. You know those things that are displayed in eg GameSpy. I''m going to write a small server tool but can''t find any information. All resources, hints and sample code (c++) are appriciated.

Share this post


Link to post
Share on other sites
Advertisement
Sure. First make sure you're communicating with UDP packets.

Simply send this over to the server:


ÿÿÿÿgetstatus


Easy, eh? Now, it will reply to you with a packet that looks just like so..


ÿÿÿÿstatusResponse
\g_needpass\0\gamename\baseq3\bot_minplayers\0
\sv_privateClients\0\mapname\Q3DM3\protocol\43\g_gametype\0
\version\Q3 1.16n win-x86 Mar 14 2000\g_maxGameClients\0
\capturelimit\0\sv_maxclients\8\timelimit\0\fraglimit\0\dmflags\0
\sv_hostname\noname\sv_maxRate\0\sv_floodProtect\1\sv_minPing\0
\sv_maxPing\0
19 0 "Mynx"
77 0 "Orbb"
61 0 "Crash"
139 0 "Hunter"
83 0 "Lucy"
87 0 "Grunt"
81 0 "Lucy"


Just parse up the info parameters until the last \0, then parse the user list. I believe the names at the end are setup like so..

PING SCORE NAME

Where as for the first item, Mynx is the player's name, 19 is the ping, and 0 is the score.

If that isn't the case, then its

SCORE PING NAME

I honestly don't remember. Query a few servers and judge for yourself based on the results.


[edited by - munkie on August 11, 2002 11:18:43 AM]

Share this post


Link to post
Share on other sites
Oh, to correct myself, do not parse up to the last \0, because that is a variable number. Parse up to the next linebreak, because that whole first block of information does not contain line breaks, I merely inserted them in there so I didn''t screw up the formatting of the forums.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!