remove $Id$ strings from everywhere that I can find
[spider.git] / cmd / set / startup.pl
1 #
2 # create or replace a startup script
3 #
4 # Copyright (c) 2005 Dirk Koopman G1TLH
5 #
6 #
7 #
8 my ($self, $line) = @_;
9 return (1, $self->msg('e5')) if $self->remotecmd || $self->inscript;
10 return (1, $self->msg('e5')) if $line && $self->priv < 6;
11 return (1, $self->msg('e36')) unless $self->state =~ /^prompt/;
12
13 my @out;
14 my $loc = $self->{loc} = { call => ($line || $self->call),
15                                                    endaction => "store_startup_script",
16                                                    lines => [],
17                                                  };
18 # find me and set the state and the function on my state variable to
19 # keep calling me for every line until I relinquish control
20 $self->func("do_entry_stuff");
21 $self->state('enterbody');
22 push @out, $self->msg('m8');
23 return (1, @out);
24