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_exact($call); # try an exact call
28 $ref = DXCluster->get($call) unless $ref; # try one ignoring SSID
29 $ref = DXChannel->get($call) unless $ref; # is it local?
31 # if we haven't got an explicit via and we can't see them, try their node
32 unless ($ref || $via) {
33 my $user = DXUser->get($call);
34 $ref = DXCluster->get_exact($user->node) if $user;
37 push @out, "trying via $via..";
40 return (1, "$call not visible on the cluster") if !$ref;
42 # change ^ into : for transmission
45 my $dxchan = DXCommandmode->get($to); # is it for us?
46 if ($dxchan && $dxchan->is_user) {
47 $dxchan->send("$to de $from $line") if $dxchan->talk;
48 Log('talk', $to, $from, $main::mycall, $line);
50 $line =~ s/\^//og; # remove any ^ characters
51 my $prot = DXProt::pc10($from, $to, $via, $line);
52 DXProt::route(undef,$via?$via:$to, $prot);
53 Log('talk', $to, $from, $via?$via:$main::mycall, $line);