my $name = $dxchan->user->name || " ";
my $ping = $dxchan->is_node && $dxchan != $DXProt::me ? sprintf("%5.2f", $dxchan->pingave) : " ";
my $conn = $dxchan->conn;
- my $ip = $conn->{peerhost} || '' if $conn;
+ my $ip = '';
+ $ip = $conn->{peerhost} if $conn && $conn->{peerhost};
push @out, sprintf "%10s $type $sort $t %-10.10s $ping $ip", $call, $name;
}
my $conn = shift;
my $cmd = shift;
my $line = shift;
-
+
if ($line) {
my ($expect, $send) = $cmd =~ /^\s*\'(.*)\'\s+\'(.*)\'/;
if ($expect) {
if ($line =~ /$expect/i) {
dbg('connect', "got: \"$expect\" sending: \"$send\"");
$conn->send_later($send);
+ delete $conn->{msg}; # get rid any input if a match
return;
}
}