un poco turbio

This commit is contained in:
mynah
2018-07-27 16:45:29 -05:00
parent a2567e8936
commit 6811b19471
16 changed files with 229 additions and 49 deletions

View File

@@ -51,25 +51,25 @@ sub candy{
sub isOn{return grep(/\s$server_name/,sendT("host:list()"))? 1:0; }
sub sendT{
sub sendT{
commandT(shift);
my @r = $t->getlines(All=>0);
return @r
}
sub connectT{
}
sub connectT{
$t = new Net::Telnet ( Port=>5582, Timeout=>1, Errmode=>'return' );
# $t = new Net::Telnet ( Port=>5582, Timeout=>1, Errmode=>'die' );
return 1 if $t->open();
return 0;
}
sub commandT{
}
sub commandT{
$t->getlines(All=>0);#empty buffer
$t->print(shift); #run istruction
}
sub disconnectT{ $t->close();}
}
sub disconnectT{ $t->close();}
#=========================================================
1
1;
__END__