projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
40310b1
)
more fixes to bbs syntax
author
minima
<minima>
Wed, 3 Oct 2001 11:17:03 +0000
(11:17 +0000)
committer
minima
<minima>
Wed, 3 Oct 2001 11:17:03 +0000
(11:17 +0000)
cmd/send.pl
patch
|
blob
|
history
perl/DXMsg.pm
patch
|
blob
|
history
diff --git
a/cmd/send.pl
b/cmd/send.pl
index 59b535f73fae60da27fe6388345d4dfa9723752c..71cea2bc7f7d0616ac8234516dcda53597e9069e 100644
(file)
--- a/
cmd/send.pl
+++ b/
cmd/send.pl
@@
-33,7
+33,8
@@
$loc->{rrreq} = '0';
if ($self->state eq "prompt") {
my @f = split /\b/, $line;
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;
# any thing after send?
return (1, $self->msg('e6')) if !@f;
@@
-94,14
+95,14
@@
if ($self->state eq "prompt") {
$loc->{rrreq} = '1';
} elsif ($f eq '<' && @f) { # this is bbs syntax for from call
$loc->{from} = uc shift @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;
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 ?
} else {
# callsign ?
@@
-140,6
+141,11
@@
if ($self->state eq "prompt") {
delete $self->{loc};
return (1, $self->msg('e6'));
}
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
# find me and set the state and the function on my state variable to
# keep calling me for every line until I relinquish control
diff --git
a/perl/DXMsg.pm
b/perl/DXMsg.pm
index 3d83359d350e911eef0a374f4dc109c568e84d09..54a2c6f3c04768f9584de08f62d879e5deb90cf4 100644
(file)
--- a/
perl/DXMsg.pm
+++ b/
perl/DXMsg.pm
@@
-1208,6
+1208,8
@@
sub import_one
# first line;
my $line = shift @$ref;
my @f = split /\b/, $line;
# 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');
unless (@f && $f[0] =~ /^(:?S|SP|SB|SEND)$/ ) {
my $m = "invalid first line in import '$line'";
dbg($m) if isdbg('msg');
@@
-1224,16
+1226,16
@@
sub import_one
;
} elsif ($notincalls && ($f eq 'RR')) {
$rr = '1';
;
} 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;
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 ?
} else {
# callsign ?