X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Froute.pl;h=04eecd868ad399d3264e255622c11cfbfc21b414;hb=f493dbf120a0a175a7788ee51c9928377b0f4c50;hp=4ebebde3242dd799c8568afc2b348af6ff355aa1;hpb=3fb77aefcc75a7b465d94273adec2f14bfc8adb8;p=spider.git diff --git a/cmd/show/route.pl b/cmd/show/route.pl index 4ebebde3..04eecd86 100644 --- a/cmd/show/route.pl +++ b/cmd/show/route.pl @@ -3,7 +3,7 @@ # # Copyright (c) 2001 Dirk Koopman G1TLH # -# $Id$ +# # my ($self, $line) = @_; @@ -12,15 +12,24 @@ my @out; return (1, $self->msg('e6')) unless @list; +use RouteDB; + my $l; foreach $l (@list) { my $ref = Route::get($l); if ($ref) { my $parents = $ref->isa('Route::Node') ? $l : join(',', $ref->parents); - push @out, $self->msg('route', $l, $parents, join(',', map {$_->call} $ref->alldxchan)); + push @out, $self->msg('route', $l, $parents, join(',', map {$_->call} Route::findroutes($l))); } else { push @out, $self->msg('e7', $l); } + my @in = RouteDB::_sorted($l); + if (@in) { + push @out, "Learned Routes:"; + for (@in) { + push @out, "$l via $_->{call} count: $_->{count} last heard: " . atime($_->{t}); + } + } } return (1, @out);