changelog from 0.2a to 0.2b:
Added more checks on the validity of the command line.
Changed the way the command-line is parsed so options can be passed after the +mode instruction. They could only be passed before in previous versions. This does not apply to +q mode, obviously, as everything after +q is seen as part as the query, to avoid the need to use quotes around queries with spaces.
added option -netport, which sets the local port QCmd uses.This is useful when you need to go through a proxy or firewall, and want to know which port to open.
added option -netporter (as in Netport Error Recovery), which defines the policy the program must follow when it fails to open the requested netport. The possible policies are Abort: display an error message and quit; Warn: display an error message and find another port, then continue as if nothing happened; Ignore: find another port and continue as if nothing happened, without informing the user.
added options -exsingle and -exmulti, which enforce the selected connection mode (or exchange mode) with the Quake3 server for everything but the messenger mode (which has its own sockets).
In SINGLE mode, QCmd expects only one datagram from the server in answer to its queries. This was the only mode available in previous versions. This is enough most of the time, but some queries, such as RCon Status, Dir, Quit etc, return several packets. Trouble is, there is no way to guess how many, nor which is last. Therefore, a socket timeout is inevitable. Which brings us to the MULTI mode.
In MULTI mode, QCmd reads every packet the server sends. This systematically introduces a delay, since the only way to know nothing else has been sent is to let the socket time out (I thought that strange too, but I'm not the only one to have run into that problem), but this allows multiline commands to be read correctly.
Each QCmd mode uses by default the exchange mode which is most suitable: that is: RCon mode uses MULTI, while every other mode uses SINGLE.
So basically, on linux, rcon status and such now work as expected:
Code: Select all
________________________________________________________________________________
# status
map: the_academy_v3
num score ping name lastmsg address qport rate
--- ----- ---- --------------- ------- --------------------- ----- -----
0 0 0 ^3{<� ^1Bot Idi 50 bot 0 16384
1 13 0 ^3{<� ^1Bot B�t 50 bot 0 16384
8 0 CNCT ^2# ^5QCmd MSG 3150 99.66.97.20:-29071 29506 3000
________________________________________________________________________________
***
WINDOWS USERS: The MULTI mode is buggy on Windows. So is timeout, by the way. So every mode uses SINGLE by default. You can always use these options to enforce MULTI mode, though.
***
This bug will need to be fixed before I release the source code