From: minima Date: Tue, 13 Mar 2001 22:16:35 +0000 (+0000) Subject: fix who X-Git-Tag: R_1_47~129 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=87bc0b65c4d43cf3100c2f66cbc6f5e3f45f99fe;p=spider.git fix who --- diff --git a/cmd/who.pl b/cmd/who.pl index 1ccf9ca8..ecb45d70 100644 --- a/cmd/who.pl +++ b/cmd/who.pl @@ -28,7 +28,8 @@ foreach $dxchan ( sort {$a->call cmp $b->call} DXChannel::get_all ) { 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; } diff --git a/perl/ExtMsg.pm b/perl/ExtMsg.pm index ee2ad231..01a30924 100644 --- a/perl/ExtMsg.pm +++ b/perl/ExtMsg.pm @@ -247,7 +247,7 @@ sub _dochat my $conn = shift; my $cmd = shift; my $line = shift; - + if ($line) { my ($expect, $send) = $cmd =~ /^\s*\'(.*)\'\s+\'(.*)\'/; if ($expect) { @@ -261,6 +261,7 @@ sub _dochat 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; } }