projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1. Fixed DXBearing::is_qra so that it correctly detects full QRA locators
[spider.git]
/
cmd
/
talk.pl
diff --git
a/cmd/talk.pl
b/cmd/talk.pl
index 5b8cdaeedf137f7139628c6f81a03344946a1c3b..4002c82845e6cead2abae81d05fce91cf8e59846 100644
(file)
--- a/
cmd/talk.pl
+++ b/
cmd/talk.pl
@@
-1,6
+1,8
@@
#
# The talk command
#
#
# The talk command
#
+# Copyright (c) 1998 Dirk Koopman G1TLH
+#
# $Id$
#
# $Id$
#
@@
-10,24
+12,29
@@
my $to = uc $argv[0];
my $via;
my $from = $self->call();
my $via;
my $from = $self->call();
+# have we a callsign and some text?
+return (1, $self->msg('e8')) if @argv < 2;
+
if ($argv[1] eq '>') {
$via = uc $argv[2];
if ($argv[1] eq '>') {
$via = uc $argv[2];
-# print "argv[0] $argv[0] argv[2] $argv[2]\n";
- $line =~ s/^$argv[0]\s+>\s+$argv[2]\s*//o;
+ $line =~ s/^$argv[0]\s+>\s+$argv[2]\s*//;
} else {
} else {
-# print "argv[0] $argv[0]\n";
- $line =~ s/^$argv[0]\s*//o;
+ $line =~ s/^$argv[0]\s*//;
}
}
-#print "to=$to via=$via line=$line\n";
+my $call = $via ? $via : $to;
+my $ref = DXCluster->get($call);
+return (1, "$call not visible on the cluster") if !$ref;
+
my $dxchan = DXCommandmode->get($to); # is it for us?
if ($dxchan && $dxchan->is_user) {
$dxchan->send("$to de $from $line");
my $dxchan = DXCommandmode->get($to); # is it for us?
if ($dxchan && $dxchan->is_user) {
$dxchan->send("$to de $from $line");
+ Log('talk', $to, $from, $main::mycall, $line);
} else {
} else {
- my $prot = DXProt::pc10($self, $to, $via, $line);
-# print "prot=$prot\n";
-
+ $line =~ s/\^//og; # remove any ^ characters
+ my $prot = DXProt::pc10($from, $to, $via, $line);
DXProt::route($via?$via:$to, $prot);
DXProt::route($via?$via:$to, $prot);
+ Log('talk', $to, $from, $via?$via:$main::mycall, $line);
}
return (1, ());
}
return (1, ());