X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fshow%2Froute.pl;h=768c3961e7976e0113db2d530961db3975746a08;hb=refs%2Fheads%2Fstaging;hp=95497d2d9d02c96806e332def3ff97a84b92126d;hpb=955db8c44f956cb6e0e3624061c9168e5a0cc93f;p=spider.git diff --git a/cmd/show/route.pl b/cmd/show/route.pl index 95497d2d..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) = @_; @@ -14,9 +14,12 @@ return (1, $self->msg('e6')) unless @list; my $l; foreach $l (@list) { - my $ref = DXCluster->get_exact($l); + my $ref = Route::get($l); if ($ref) { - push @out, $self->msg('route', $l, $ref->mynode->call, $ref->dxchan->call); + my $parents = $ref->isa('Route::Node') ? $l : join(',', $ref->parents); + 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); }