X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=cmd%2Ftalk.pl;h=a53b213e1f756a07e7e340dc32c7e22fe41b2e8a;hb=cce345b95c555a0b45218c5b452bc0f5f4f13bab;hp=21adc556b8bc1e98c173aae8172b32de6446b4d9;hpb=171a7a0bf86e9732a33c7829e808129ec01c51c2;p=spider.git diff --git a/cmd/talk.pl b/cmd/talk.pl index 21adc556..a53b213e 100644 --- a/cmd/talk.pl +++ b/cmd/talk.pl @@ -19,13 +19,19 @@ if ($argv[1] eq '>') { $line =~ s/^$argv[0]\s*//; } +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"); + Log('talk', $to, $from, $main::mycall, $line); } else { $line =~ s/\^//og; # remove any ^ characters my $prot = DXProt::pc10($from, $to, $via, $line); DXProt::route($via?$via:$to, $prot); + Log('talk', $to, $from, $via?$via:$main::mycall, $line); } return (1, ());