3 # pretend that you are another user, useful for reseting
4 # those silly things that people insist on getting wrong
5 # like set/homenode et al
7 # Copyright (c) 1999 Dirk Koopman G1TLH
9 my ($self, $line) = @_;
11 my $mycall = $self->call;
12 my $myuser = $self->user;
13 my $mylang = $self->lang;
15 my ($call, $newline) = split /\s+/, $line, 2;
16 return (1, $self->msg('nodee1', $call)) if DXChannel::get($call);
18 if ($self->remotecmd || $self->inscript) {
19 Log('DXCommand', "$mycall is trying to spoof $call remotely");
20 return (1, $self->msg('e5'));
22 if ($self->priv < 9) {
23 Log('DXCommand', "$mycall is trying to spoof $call locally");
24 return (1, $self->msg('e5'));
29 my $user = DXUser::get_current($call);
31 $user = DXUser->new($call);
32 push @out, $self->msg('spf1', $call);
35 # set up basic environment
38 my $addr = $self->hostname || '127.0.0.1';
39 Log('cmd', "$self->{call}|$addr|spoof|$line");
40 my @in = $self->run_cmd($newline);
41 push @out, map {"spoof $call: $_"} @in;