loads of changes and added things
[spider.git] / cmd / show / bands.pl
1 #
2 # display the band data
3 #
4
5 #$DB::single = 1;
6
7 my ($self, $line) = @_;
8 my @f = split /\s+/, $line;
9 my @bands;
10 my $band;
11 my @out;
12
13 if (!$line) {
14   @bands = sort { Bands::get($a)->band->[0] <=> Bands::get($b)->band->[0] } Bands::get_keys();
15   push @out, "Bands Available:-";
16   foreach $band (@bands) {
17     my $ref = Bands::get($band)->band;
18     my $from = $ref->[0];
19     my $to = $ref->[1];
20     push @out, sprintf "%10s: %d -> %d", $band, $from, $to;
21   } 
22   push @out, "Regions Available:-";
23   @bands = Bands::get_region_keys();
24   foreach $band (@bands) {
25     my $ref = Bands::get_region($band);
26     my $s = sprintf("%10s: ", $band ) . join(' ', @{$ref}); 
27     push @out, $s;
28   }
29 }
30
31 return (1, @out);