X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Froute.pl;h=d4120e0c484a5244774388a81ca3aba357e68c4f;hb=611e9ea5204765638eceecbd8e1dd04a4f10a1be;hp=45214003ac22165ebfefc2079935b5e4ba257113;hpb=6624dcdf07d628e8d6a16fc6549edf40be25b7b2;p=spider.git diff --git a/cmd/show/route.pl b/cmd/show/route.pl index 45214003..d4120e0c 100644 --- a/cmd/show/route.pl +++ b/cmd/show/route.pl @@ -12,16 +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 = join ',', $ref->parents; - my $dxchan = $ref->dxchan; - push @out, $self->msg('route', $l, $parents, $dxchan->call); + my $parents = $ref->isa('Route::Node') ? $l : join(',', $ref->parents); + push @out, $self->msg('route', $l, $parents, join(',', map {$_->call} $ref->alldxchan)); } 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);