Q3Tool -- Java Quake3 Server Utility

q3tool is a simple Java command line utility for querying and sending commands to a Quake 3 (test) server. It can be used to get some basic information on a server you don't administrate, or it can be used to send commands ('rcon's) to a server which you've set a rcon password on.

Download: q3tool-1.0.0.tar.gz

Or, for non-Unix users, you can browse the files here.

Usage:

                q3tool [-rcon remote-command] [-passwd server-password]
                       [-host remote-host] [-port port-number]

Example use:
# java q3tool -rcon "kick Jim" -passwd testing -host penn.netroedge.com
Server Status:
statusResponse
\gamedate\May 10 1999\gamename\baseq3\sv_privateClients\0\mapname\Q3TEST2\protocol\36\version\Q3T 1.05 linux-i386 May 10
1999\teamflags\0\nohealth\0\sv_maxclients\2\timelimit\0\fraglimit\20\dmflags\1\sv_hostname\www.lm-sensors.nu\cheats\0


Length: 258 bytes.
Server Info:
infoResponse
\protocol\36\hostname\www.lm-sensors.nu\mapname\Q3TEST2\clients\0\sv_maxclients\2

Length: 98 bytes.
Hex output:
70 72 69 6e 74 0a 55 73 65 72 20 4a 
69 6d 20 69 73 20 6e 6f 74 20 6f 6e 20 74 68 65 
20 73 65 72 76 65 72 0a 

Length: 40 bytes.


ASCII output:
print
User Jim is not on the server


Length: 40 bytes.

findclosest.pl -- Related to this is a little Perl script I wrote which tries to find the closest Quake3Test server. What is does is fetches Id's server list page (using 'lynx'), parses the output to pick out the IPs and other info, and pings each one to show how 'far' away it is. From the listing, you can pick out a server with a short ping time, the level you wish to play, and the number of users. Potentially, it would be easy to combine this along with q3tool to find a particular player on the servers you want to play against (pretty cool, ey? :'). Download

Example output (after piping through 'sort -n'):

31.6ms --> 209.43.135.111:27960 q3test1,  5 /  16
33.0ms --> 209.43.135.111:27961 q3test2,  5 /  16
46.9ms --> 216.65.31.130:27960 q3test1,  7 /  16
47.4ms --> 134.121.16.82:27960 q3test2,  0 /  16
49.8ms --> 207.88.6.21:27960 q3test1,  5 /  9
50.5ms --> 207.181.222.40:27960 q3test2,  2 /  16
50.5ms --> 209.1.109.150:27960 q3test2,  5 /  8
50.5ms --> 4.21.32.45:27960 q3test1,  4 /  16
50.6ms --> 207.20.49.49:27960 q3test1,  0 /  11
51.5ms --> 208.213.56.113:27960 q3test1,  10 /  16
55.0ms --> 209.63.173.4:27960 q3test1,  0 /  10
56.8ms --> 208.232.0.174:27960 q3test2,  0 /  10
57.3ms --> 216.39.128.10:27960 q3test1,  8 /  8
[...]
Oh, and depending on your system, you may need to adjust the script if your ping is different from mine (I imagine they are pretty much from the same source nowadays), and the script will definitely need to be fixed if Id changes the web page formatting on their server listing page.

NEWS:

  • I just noticed a similar tool at http://q3go.q3center.net/. Check it out!
  • Here's a Q3T hack I found on the net: mv demoq3 to baseq3, mv the pakfile to temp.zip, unzip it. Now you can see all the files in the pak.
  • Great resources: http://www.moneychair.demon.co.uk/quake3/, http://www.linuxquake.com/
  • Q3Tool was written shortly after Id released some tech info on how to do server communication via UDP in Java to a Q3T server. The page is here: http://www.quake3arena.com/tech/ServerCommandsHowto.html


    Written and copywritten by Philip Edelbrock (phil@netroedge.com), 1999.