X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Froute.pl;h=6d1c194c2f65b27dfe0aa3ff558303f571b53992;hb=f35f0015904ecac74bd6e2ecf9cac79df0c00aaf;hp=dda65bd9944caf6ab350e587ba30be92f8d42290;hpb=9516ccc97c92ca802204b059a9a4baab04ff3b65;p=spider.git diff --git a/cmd/show/route.pl b/cmd/show/route.pl index dda65bd9..6d1c194c 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 = $ref->isa('Route::Node') ? $l : join(',', $ref->parents); - my $dxchan = $ref->dxchan; - push @out, $self->msg('route', $l, $parents, $dxchan->call); + 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);