X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fnospawn.pl;fp=cmd%2Fnospawn.pl;h=ad81feb6e5be533c30472f85aac92dc453128514;hb=f2c90f82509ae2be33216ebaed3bc9f8ea3f5f80;hp=0000000000000000000000000000000000000000;hpb=5fc4f15ca36b6926fac4a8b33b3944cc1f7cef49;p=spider.git diff --git a/cmd/nospawn.pl b/cmd/nospawn.pl new file mode 100644 index 00000000..ad81feb6 --- /dev/null +++ b/cmd/nospawn.pl @@ -0,0 +1,28 @@ +#!/usr/bin/perl +# +# pretend that you are another user, useful for reseting +# those silly things that people insist on getting wrong +# like set/homenode et al +# +# Copyright (c) 1999 Dirk Koopman G1TLH +# +my ($self, $line) = @_; + +my $mycall = $self->call; + + +if ($self->priv < 2) { + Log('DXCommand', "$mycall is trying to nospawn $line locally"); + return (1, $self->msg('e5')); +} +if ($self->remotecmd || $self->inscript) { + Log('DXCommand', "$mycall is trying to nospawn remotely"); + return (1, $self->msg('e5')); +} + +Log('DXCommand', "nospawn '$line' by $mycall"); +$self->{_nospawn} = 1; +my @out = $self->run_cmd($line); +delete $self->{_nospawn}; + +return (1, @out);