]> scm.dxcluster.org Git - spider.git/blob - cmd/pc.pl
nospawnify the rest of the known commands
[spider.git] / cmd / pc.pl
1 #
2 # send a manual PC protocol (or other) message to the callsign
3 #
4 # Copyright (c) 1998 Dirk Koopman G1TLH
5 #
6 #
7 #
8 my $self = shift;
9 my $line = shift;
10 my @f = split /\s+/, $line;
11
12 return (1, $self->msg('e5')) if $self->priv < 8 || $self->remotecmd || $self->inscript;
13
14 my $call = uc shift @f;
15 my $dxchan = DXChannel::get($call);
16 return (1, $self->msg('e10', $call)) if !$dxchan;
17 return (1, $self->msg('e8')) if @f <= 0;
18
19 $line =~ s/$call\s+//i;   # remove callsign and space
20 $dxchan->send($line);
21
22 return (1);