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;
14 my ($call, $newline) = split /\s+/, $line, 2;
15 return (1, $self->msg('nodee1', $call)) if DXChannel->get($call);
17 if ($self->remotecmd) {
18 Log('DXCommand', "$mycall is trying to spoof $call remotely");
19 return (1, $self->msg('e5'));
21 if ($self->priv < 9) {
22 Log('DXCommand', "$mycall is trying to spoof $call locally");
23 return (1, $self->msg('e5'));
28 my $user = DXUser->get($call);
30 $user = DXUser->new($call);
31 push @out, $self->msg('spf1', $call);
34 # set up basic environment
37 Log('DXCommand', "spoof '$newline' as $call by $mycall");
38 my @in = $self->run_cmd($newline);
39 push @out, map {"spoof $call: $_"} @in;