-if ($line) {
- my @pref = split /[\s,]+/, $line;
- push @dxcc, Prefix::to_ciz('nc', @pref);
- return (1, $self->msg('e27', $line)) unless @dxcc;
-} else {
- push @dxcc, (61..67) if $self->dxcc >= 61 && $self->dxcc < 67;
- push @dxcc, $self->dxcc unless @dxcc;
+while (@f) {
+ my $f = shift @f;
+
+ if ($f =~ /^\d+$/ && $f < 366) { # no of days
+ $days = $f;
+ next;
+ }
+ if (my $utime = Date::Parse::str2time($f)) { # is it a parseable date?
+ $utime += 3600;
+ $now = Julian::Day->new($utime);
+ $date = cldate($utime);
+ next;
+ }
+ $f = uc $f;
+ if (is_callsign($f)) {
+ push @dxcc, [$f, 0];
+ push @pref, $f;
+ } else {
+ if ($f eq 'ALL' ) {
+ $all++;
+ push @pref, $f;
+ next;
+ }
+ if (my @ciz = Prefix::to_ciz('nc', $f)) {
+ push @dxcc, map {[$_, 2]} @ciz;
+ push @pref, $f;
+ } else {
+ push @out, $self->msg('e27', $f);
+ }
+ }