2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

fixed welcomemessage error

This commit is contained in:
Tim Wulkau 2010-10-02 23:33:29 +02:00 committed by Steve Schnepp
parent d92232de0c
commit e3c3aae254

View File

@ -7,6 +7,8 @@
#
# by Tim Wulkau - www.wulkau.de
#
# 02.10.10 - v0.3
# -fixed welcomemessage error
# 31.01.10 - v0.2
# -fixed multiserver support
# -corrected usercount
@ -41,10 +43,10 @@ if(exists $ARGV[0] and $ARGV[0] eq "config")
else
{
my $telnet = new Net::Telnet(Timeout=>5, Errmode=>"return", Prompt=>"/\r/");
if ($telnet->open(Host=>$hostname, Port=>$port) != 1) {
if (!$telnet->open(Host=>$hostname, Port=>$port)) {
die exit;
}
$telnet->waitfor("/TS3/");
}
$telnet->waitfor("/Welcome to the TeamSpeak 3 ServerQuery interface/");
foreach my $server (@serverids)
{
$telnet->cmd("use sid=$server");