fix console.pl max scroll depth
[spider.git] / cmd / load / keps.pl
1 #
2 # load the the keps file after changing it
3 #
4 my ($self, $line) = @_;
5 return (1, $self->msg('e5')) if $self->priv < 5;
6
7 if ($line =~ /^(\d+)$/) {
8         my $msgno = $1;
9         my $mref = DXMsg::get($msgno);
10         return (1, $self->msg('m4', $msgno)) unless $mref;
11         return (1, $self->msg('sat5')) unless $mref->subject =~ /\b\d{3,6}\.AMSAT\b/i;
12         my $fn = DXMsg::filename($msgno);
13         my $fh = new IO::File "$main::root/perl/convkeps.pl $fn |";
14         my @in = <$fh>;
15         $fh->close;
16         return (1, @in) if @in;
17 }
18 my @out = Sun::load($self);
19 @out = ($self->msg('ok')) if !@out;
20 return (1, @out);