7 my ($self, $line) = @_;
8 my @list = split /\s+/, $line; # split the line up
14 my ($fromday, $today);
22 while ($f = shift @list) { # next field
23 print "f: $f list: ", join(',', @list), "\n";
25 ($from, $to) = $f =~ /^(\d+)-(\d+)$/o; # is it a from -> to count?
26 next if $from && $to > $from;
29 ($to) = $f =~ /^(\d+)$/o if !$to; # is it a to count?
32 if (lc $f eq 'on' && $list[0]) { # is it freq range?
34 my @r = split '/', $list[0];
35 print "r0: $r[0] r1: $r[1]\n";
36 @freq = Bands::get_freq($r[0], $r[1]);
37 if (@freq) { # yup, get rid of extranous param
38 print "freq: ", join(',', @freq), "\n";
43 if (lc $f eq 'day' && $list[0]) {
45 ($fromday, $today) = split '-', shift(@list);
48 if (lc $f eq 'info' && $list[0]) {
53 if (lc $f eq 'spotter' && $list[0]) {
54 print "got spotter\n";
55 $spotter = uc shift @list;
63 # first deal with the prefix
66 $pre =~ s|/|\\/|; # change the slashes to \/
74 $expr = "1"; # match anything
77 # now deal with any frequencies specified
79 $expr .= ($expr) ? " && (" : "(";
81 for ($i; $i < @freq; $i += 2) {
82 $expr .= "(\$f0 >= $freq[0] && \$f0 <= $freq[1]) ||";
91 $expr .= " && " if $expr;
93 $expr .= "\$f3 =~ /$info/io";
98 $expr .= " && " if $expr;
100 $expr .= "\$f4 =~ /$spotter/o";
103 print "expr: $expr from: $from to: $to fromday: $fromday today: $today\n";
106 my @res = Spot::search($expr, $fromday, $today, $from, $to);
109 foreach $ref (@res) {
111 my $t = ztime($dx[2]);
112 my $d = cldate($dx[2]);
113 push @out, sprintf "%9s %-12s %s %s %-28s <%s>", $dx[0], $dx[1], $d, $t, $dx[3], $dx[4];