if ($self->state eq "prompt") {
my @f = split /\b/, $line;
-
+ @f = map {s/\s+//g; length $_ ? $_ : ()} @f;
+
# any thing after send?
return (1, $self->msg('e6')) if !@f;
$loc->{rrreq} = '1';
} elsif ($f eq '<' && @f) { # this is bbs syntax for from call
$loc->{from} = uc shift @f;
- } elsif (($f =~ /^[\@\.\#]$/ || $f eq '.#') && @f) { # this is bbs syntax, for send it 'to node'
+ } elsif (($f =~ /^[\@\.\#\$]$/ || $f eq '.#') && @f) { # this is bbs syntax, for send it 'to node'
shift @f;
} elsif ($f =~ /^\$/) { # this is bbs syntax for a bid
next;
- } elsif ($f =~ /^<\S+/) { # this is bbs syntax for from call
- ($loc->{from}) = $f =~ /^<(\S+)$/;
- } elsif ($f =~ /^\@\S+/) { # this is bbs syntax for origin
- ($loc->{origin}) = $f =~ /^\@(\S+)$/;
+ } elsif ($f =~ /^<(\S+)/) { # this is bbs syntax for from call
+ $loc->{from} = $1;
+ } elsif ($f =~ /^\$\S+/) { # this is bbs syntax for bid
+ ;
} else {
# callsign ?
delete $self->{loc};
return (1, $self->msg('e6'));
}
+ $loc->{from} ||= $self->call;
+ unless (is_callsign($loc->{from})) {
+ delete $self->{loc};
+ return (1, $self->msg('e22', $loc->{from}));
+ }
# find me and set the state and the function on my state variable to
# keep calling me for every line until I relinquish control
# first line;
my $line = shift @$ref;
my @f = split /\b/, $line;
+ @f = map {s/\s+//g; length $_ ? $_ : ()} @f;
+
unless (@f && $f[0] =~ /^(:?S|SP|SB|SEND)$/ ) {
my $m = "invalid first line in import '$line'";
dbg($m) if isdbg('msg');
;
} elsif ($notincalls && ($f eq 'RR')) {
$rr = '1';
- } elsif (($f =~ /^[\@\.\#]$/ || $f eq '.#') && @f) { # this is bbs syntax, for AT
+ } elsif (($f =~ /^[\@\.\#\$]$/ || $f eq '.#') && @f) { # this is bbs syntax, for AT
shift @f;
} elsif ($f eq '<' && @f) { # this is bbs syntax for from call
$from = uc shift @f;
} elsif ($f =~ /^\$/) { # this is bbs syntax for a bid
next;
- } elsif ($f =~ /^<\S+/) { # this is bbs syntax for from call
- ($from) = $f =~ /^<(\S+)$/;
- } elsif ($f =~ /^\@\S+/) { # this is bbs syntax for origin
- ($origin) = $f =~ /^\@(\S+)$/;
+ } elsif ($f =~ /^<(\S+)/) { # this is bbs syntax for from call
+ $from = $1;
+ } elsif ($f =~ /^\$\S+/) { # this is bbs syntax for bid
+ ;
} else {
# callsign ?