1. Made the telnet thing work a bit better. It still will not work reliably to
[spider.git] / cmd / pc.pl
diff --git a/cmd/pc.pl b/cmd/pc.pl
new file mode 100644 (file)
index 0000000..cfb8f9e
--- /dev/null
+++ b/cmd/pc.pl
@@ -0,0 +1,22 @@
+#
+# send a manual PC protocol (or other) message to the callsign
+#
+# Copyright (c) 1998 Dirk Koopman G1TLH
+#
+# $Id$
+#
+my $self = shift;
+my $line = shift;
+my @f = split /\s+/, $line;
+
+return (1, $self->msg('e5')) if $self->priv < 8;
+
+my $call = uc shift @f;
+my $dxchan = DXChannel->get($call);
+return (1, $self->msg('e10', $call)) if !$dxchan;
+return (1, $self->msg('e8')) if @f <= 0;
+
+$line =~ s/$call\s+//i;   # remove callsign and space
+$dxchan->send($line);
+
+return (1);