show all the routes
[spider.git] / cmd / show / route.pl
index 95497d2d9d02c96806e332def3ff97a84b92126d..4ebebde3242dd799c8568afc2b348af6ff355aa1 100644 (file)
@@ -14,9 +14,10 @@ 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);
+               push @out, $self->msg('route', $l, $parents,  join(',', map {$_->call} $ref->alldxchan));
        } else {
                push @out, $self->msg('e7', $l);
        }