From b2e852cfe75a418d97c147d3c03fe1e03b6b5779 Mon Sep 17 00:00:00 2001 From: minima Date: Wed, 1 Nov 2000 21:53:34 +0000 Subject: [PATCH] put a check for an empty filter command line --- cmd/accept/spots.pl | 2 ++ cmd/reject/spots.pl | 2 ++ perl/Messages | 1 + 3 files changed, 5 insertions(+) diff --git a/cmd/accept/spots.pl b/cmd/accept/spots.pl index a76e3b34..1c06dbe3 100644 --- a/cmd/accept/spots.pl +++ b/cmd/accept/spots.pl @@ -9,6 +9,8 @@ my ($self, $line) = @_; my $sort = 'accept'; +return (0, $self->msg('filter5')) unless $line; + my ($r, $filter, $fno, $user, $s) = $Spot::filterdef->parse($self, $line); return (0, $filter) if $r; diff --git a/cmd/reject/spots.pl b/cmd/reject/spots.pl index 0a3f77ec..b0749321 100644 --- a/cmd/reject/spots.pl +++ b/cmd/reject/spots.pl @@ -9,6 +9,8 @@ my ($self, $line) = @_; my $sort = 'reject'; +return (0, $self->msg('filter5')) unless $line; + my ($r, $filter, $fno, $user, $s) = $Spot::filterdef->parse($self, $line); return (0, $filter) if $r; diff --git a/perl/Messages b/perl/Messages index e20e0d29..09c6b4eb 100644 --- a/perl/Messages +++ b/perl/Messages @@ -80,6 +80,7 @@ package DXM; filter2 => 'Need a value for $_[0]', filter3 => 'No filters defined for $_[0]', filter4 => '$_[0]$_[1] Filter $_[2] deleted for $_[3]', + filter5 => 'need some filter commands...', grids => 'DX Grid flag set on $_[0]', gridu => 'DX Grid flag unset on $_[0]', helpe1 => 'Help system unavailable, tell sysop', -- 2.43.0