1. added $actiondata to filter line to allow per action data such as no of hops
[spider.git] / cmd / talk.pl
index e94fd0250e30cf262671082438df449fe666cad4..2d647d0f68a635291149884fe504df29307ad83e 100644 (file)
@@ -29,7 +29,7 @@ my $ref = DXCluster->get($call);
 # if we haven't got an explicit via and we can't see them, try their node
 unless ($ref || $via) {
        my $user = DXUser->get($call);
-       $ref = DXCluster->get_exact($user->node);
+       $ref = DXCluster->get_exact($user->node) if $user;
        if ($ref) {
                $via = $user->node;
                push @out, "trying via $via..";
@@ -42,7 +42,7 @@ $line =~ s/\^/:/og;
 
 my $dxchan = DXCommandmode->get($to); # is it for us?
 if ($dxchan && $dxchan->is_user) {
-       $dxchan->send("$to de $from $line");
+       $dxchan->send("$to de $from $line") if $dxchan->talk;
        Log('talk', $to, $from, $main::mycall, $line);
 } else {
        $line =~ s/\^//og;                      # remove any ^ characters