#
# Copyright (c) Dirk Koopman G1TLH
#
-# $Id$
+#
#
my ($self, $line) = @_;
-return (1, $self->msg('e5')) if $self->remotecmd;
+return (1, $self->msg('e5')) if $self->remotecmd || $self->inscript;
+return (1, $self->msg('e36')) unless $self->state =~ /^prompt/;
my @out;
my $loc = $self->{loc} = {};
# any thing after send?
return (1, $self->msg('e6')) if !@f;
- return (1, $self->msg('e28')) unless $self->registered || uc $f[0] eq $main::myalias;
+ return (1, $self->msg('e28')) unless $self->isregistered || uc $f[0] eq $main::myalias;
while (@f) {
my $f = uc shift @f;
# $DB::single = 1;
# is this callsign a distro?
- my $fn = "/spider/msg/distro/$f.pl";
- if (-e $fn) {
- my $fh = new IO::File $fn;
- if ($fh) {
- local $/ = undef;
- my $s = <$fh>;
- $fh->close;
- my @call;
- @call = eval $s;
- return (1, "Error in Distro $f.pl:", $@) if $@;
- if (@call > 0) {
- push @f, @call;
- next;
+ # but be careful about messages to 'sysop'
+ if ($self->priv < 5 && $f eq 'SYSOP') {
+ push @to, $main::myalias;
+ $loc->{private} = 1;
+ } else {
+ my $fn = "/spider/msg/distro/$f.pl";
+ if (-e $fn) {
+ my $fh = new IO::File $fn;
+ if ($fh) {
+ local $/ = undef;
+ my $s = <$fh>;
+ $fh->close;
+ my @call;
+ @call = eval $s;
+ return (1, "Error in Distro $f.pl:", $@) if $@;
+ if (@call > 0) {
+ push @f, @call;
+ next;
+ }
}
}
}