add CTY-3304
[spider.git] / cmd / rcmd.pl
1 #
2 # rcmd command
3 #
4 # Copyright (c) 1998 Dirk Koopman G1TLH
5 #
6 #
7 #
8
9 my $self = shift;
10 my $line = shift; 
11 my ($call) = $line =~ /^\s*(\S+)/;
12 return (1, $self->msg('e5')) if $self->remotecmd;
13
14 # are we permitted?
15 return (1, $self->msg('e5')) if $self->priv < 6;
16
17 # is there a call?
18 return (1, $self->msg('e6')) unless $call;
19
20 # remove the callsign from the line
21 $line =~ s/^\s*$call\s+//;
22
23 # can we see it? Is it a node?
24 $call = uc $call;
25 my $noderef = Route::Node::get($call);
26 return (1, $self->msg('e7', $call)) unless $noderef;
27
28 # rcmd it
29 DXProt::addrcmd($self, $call, $line);
30
31 return (1, $self->msg('rcmdo', $line, $call));