+ if ($pcno == 10) { # incoming talk
+
+ # is it for me or one of mine?
+ my $call = ($field[5] gt ' ') ? $field[5] : $field[2];
+ if ($call eq $main::mycall || grep $_ eq $call, get_all_user_calls()) {
+
+ # yes, it is
+ my $text = unpad($field[3]);
+ my $ref = DXChannel->get($call);
+ $ref->send("$call de $field[1]: $text") if $ref;
+ Log('talk', $call, $field[1], $field[6], $text);
+ } else {
+ route($field[2], $line); # relay it on its way
+ }
+ return;
+ }
+
+ if ($pcno == 11 || $pcno == 26) { # dx spot
+
+ # if this is a 'nodx' node then ignore it
+ last SWITCH if grep $field[7] =~ /^$_/, @DXProt::nodx_node;
+
+ # convert the date to a unix date
+ my $d = cltounix($field[3], $field[4]);
+ return if !$d || ($pcno == 11 && $d < $main::systime - $pc11_max_age); # bang out (and don't pass on) if date is invalid or the spot is too old
+
+ # strip off the leading & trailing spaces from the comment
+ my $text = unpad($field[5]);
+
+ # store it away
+ my $spotter = $field[6];
+ $spotter =~ s/-\d+$//o; # strip off the ssid from the spotter
+
+ # do some de-duping
+ my $dupkey = "$field[1]$field[2]$d$text$field[6]";
+ return if $dup{$dupkey};
+ $dup{$dupkey} = $d;
+
+ my $spot = Spot::add($field[1], $field[2], $d, $text, $spotter);
+
+ # send orf to the users
+ if ($spot && $pcno == 11) {
+ my $buf = Spot::formatb($field[1], $field[2], $d, $text, $spotter);
+ broadcast_users("$buf\a\a");
+ }
+
+ last SWITCH;
+ }
+
+ if ($pcno == 12) { # announces
+
+ if ($field[2] eq '*' || $field[2] eq $main::mycall) {
+
+ # strip leading and trailing stuff
+ my $text = unpad($field[3]);
+ my $target;
+ my $to = 'To ';
+ my @list;
+
+ if ($field[4] eq '*') { # sysops
+ $target = "Sysops";
+ @list = map { $_->priv >= 5 ? $_ : () } get_all_users();
+ } elsif ($field[4] gt ' ') { # speciality list handling
+ my ($name) = split /\./, $field[4];
+ $target = "$name"; # put the rest in later (if bothered)
+ }
+
+ if ($field[6] eq '1') {
+ $target = "WX";
+ $to = '';
+ }
+ $target = "All" if !$target;
+
+ if (@list > 0) {
+ broadcast_list("$to$target de $field[1]: $text", @list);
+ } else {
+ broadcast_users("$target de $field[1]: $text");
+ }
+ Log('ann', $target, $field[1], $text);
+
+ return if $field[2] eq $main::mycall; # it's routed to me
+ } else {
+ route($field[2], $line);
+ return; # only on a routed one
+ }
+
+ last SWITCH;
+ }
+