4 # Copyright (c) 1998 Dirk Koopman G1TLH
9 my ($self, $line) = @_;
10 my @argv = split /\s+/, $line; # generate an argv
13 my $from = $self->call();
16 # have we a callsign and some text?
17 return (1, $self->msg('e8')) if @argv < 2;
19 if ($argv[1] eq '>') {
21 $line =~ s/^$argv[0]\s+>\s+$argv[2]\s*//;
23 $line =~ s/^$argv[0]\s*//;
26 my $call = $via ? $via : $to;
27 my $ref = DXCluster->get($call);
29 # if we haven't got an explicit via and we can't see them, try their node
30 unless ($ref || $via) {
31 my $user = DXUser->get($call);
32 $ref = DXCluster->get_exact($user->node);
35 push @out, "trying via $via..";
38 return (1, "$call not visible on the cluster") if !$ref;
40 # change ^ into : for transmission
43 my $dxchan = DXCommandmode->get($to); # is it for us?
44 if ($dxchan && $dxchan->is_user) {
45 $dxchan->send("$to de $from $line");
46 Log('talk', $to, $from, $main::mycall, $line);
48 $line =~ s/\^//og; # remove any ^ characters
49 my $prot = DXProt::pc10($from, $to, $via, $line);
50 DXProt::route($via?$via:$to, $prot);
51 Log('talk', $to, $from, $via?$via:$main::mycall, $line);