X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FSpot.pm;h=4c7ab06e3bd94b15b7f6be5afcc4a6f5085244f2;hb=211b54d504170a8c9dad2bf25b9ed686d5eeac11;hp=c9178ddb13b3f8668d25676544d69a6365218512;hpb=0ee845aaebeeb0f5a7232021d9c633a0ef2fff80;p=spider.git diff --git a/perl/Spot.pm b/perl/Spot.pm index c9178ddb..4c7ab06e 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -53,14 +53,18 @@ sub decodefreq my $f; foreach $f (@f) { - my ($a, $b) = $f =~ m{^(\d+)/(\d+)$}; - if ($a && $b) { - push @out, $a, $b; + my ($a, $b); + if (m{^\d+/\d+$}) { + push @out, $f; } elsif (($a, $b) = $f =~ m{^(\w+)(?:/(\w+))?$}) { $b = lc $b if $b; my @fr = Bands::get_freq(lc $a, $b); if (@fr) { - push @out, @fr; # add these to the list + while (@fr) { + $a = shift @fr; + $b = shift @fr; + push @out, "$a/$b"; # add them as ranges + } } else { return ('dfreq', $dxchan->msg('dfreq1', $f)); }