From: minima Date: Wed, 1 Nov 2000 21:53:34 +0000 (+0000) Subject: put a check for an empty filter command line X-Git-Tag: R_1_45~61 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=b2e852cfe75a418d97c147d3c03fe1e03b6b5779;p=spider.git put a check for an empty filter command line --- 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',