This worked perfectly.
If anyone wants to do this, here are the instructions:
Download and install (compile):
http://turkeyfiles.escapedturkey.net/misc/hl1andhl2/rcon-hl2-0.02.tar.gz
Download and run:
http://turkeyfiles.escapedturkey.net/misc/hl1andhl2/hl2rcon.pl
Open hl2rcon.pl for instructions:
# This script requires the installation of: rcon-hl2-0.02.tar.gz
# Example, if the IP address is 123.123.123.123, port is 27015, and rcon
password is bob, and you want to list the players:
# ./hl2rcon.pl --ipaddress "123.123.123.123" --port "27015" --pass "bob"
--command "status"
Have fun! =)
Nolan Hurlburt wrote:
--
[ Picked text/plain from multipart/alternative ]
use Getopt::Long;
my $ipaddress;
my $port;
my $pass;
my $command;
$result = GetOptions ("ipaddress|i=s" => \$ipaddress,
"port|p=s" => \$port,
"pass|x=s" => \$pass,
"command|c=s" => \$command );
Getops::Long full documentation here:
http://perldoc.perl.org/Getopt/Long.html
Hope this helps
On 9/22/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Using this installed:
http://turkeyfiles.escapedturkey.net/misc/scripts/root/rcon-hl2-0.02.tar.gz
trying to make a script that reads parameters (hl2rcon.pl):
#!/usr/bin/perl
my $rcon = Rcon::HL2->new(
hostname => "$ipaddress:$port",
password => "$pass",
timeout => 3,
);
$rcon->run("$command");
print $rcon->response();
# end
I just need to add a portion to this script to do the following (so I
can pass on parameters to it):
./hl2rcon.pl -ip -port -pass -command
Example:
./hl2rcon.pl -ip 72.5.249.2 -port 20715 -pass whatever -command
"status"
Thank you. =)
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux
--
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux