Copyright (C) 2004 Richard 'wabz' Nelson

Version: 0.1
Email: wabz@optusnet.com.au
Site: http://www.whatsbeef.net/wabz/wabzcon/

This module is *extremely* minimal, and possibly broken.
It makes almost no use of the features of this protocol.
Commands block, there is no queue system. That said,
it Does What I Want It To Do(tm), and the protocol implemented by
CS:S is a bit buggy at the moment.

Have a look at
http://www.whatsbeef.net/wabz/wabzcon/
or example.pl for a usage example.

Some details:
This rcon protocol uses TCP, on the same port as the
server runs on. An auth packet is sent first, with the rcon 
password. The following commands contain the rcon 
command specified. This module sends the auth command as 
soon as new() is done, so you can check for a bad rcon
pass (get_error()) or timeout straight after this.

For more details on the source rcon protocol:
http://wikki.kquery.net/index.php/Other:SourceRcon

This module is based on the 'radcon' module, written by
Matthew 'Gumby' Lees and myself.

Usage:
$rcon = new wabzcon(Host=>"127.0.0.1", Port=>27015, Password=>"rconpassword");
This creates a new wabzcon object, AND AUTHENTICATES WITH THE SERVER.
You can immediately check for an error:

$rcon->get_error();
which returns a string with the error message.

$rcon->get_players();
returns an array with two elements, references to hashes, the first containing
player details indexed by their slot number, the second containing
server information (map, current player, max players etc).

$rcon->do("something");
sends the "something" command to the server and returns the string which
the server returns.
