X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Froute.pl;h=768c3961e7976e0113db2d530961db3975746a08;hb=0e26aa78a0b6a5dbcdf780a406335e94ddcd2f93;hp=6d1c194c2f65b27dfe0aa3ff558303f571b53992;hpb=916f0deef0e085647471d5959a55c2ddb815a044;p=spider.git diff --git a/cmd/show/route.pl b/cmd/show/route.pl index 6d1c194c..768c3961 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,24 +12,17 @@ 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} Route::findroutes($l))); + my @n = map { $_->[1]->call . '(' . (100 - $_->[0]) . ')' } Route::findroutes($l); + @n = (@n[0,1,2,3],'...') if @n > 4; + push @out, $self->msg('route', $l, $parents, join(',', @n)); } 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);