X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=deda8f45c2abdd8c5b8aaa6d5c69d39ab98d2bb4;hb=e07645cec07ba739a20cc009d7dd138c962b66eb;hp=1b361d0602b19563ea00851fd6c63d96dfc98af5;hpb=31bc3c36404cb801b82f53fdafd8ca630c2e4535;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 1b361d06..deda8f45 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -607,8 +607,16 @@ sub handle_12 my $dxchan; - if ($_[2] eq '*' || $_[2] eq $main::mycall) { + if ((($dxchan = DXChannel->get($_[2])) && $dxchan->is_user) || $_[4] =~ /^[\#\w]+$/){ + $self->send_chat($line, @_[1..6]); + } elsif ($_[2] eq '*' || $_[2] eq $main::mycall) { + # ignore something that looks like a chat line coming in with sysop + # flag - this is a kludge... + if ($_[3] =~ /^\#\d+ / && $_[4] eq '*') { + dbg('PCPROT: Probable chat rewrite, dropped') if isdbg('chanerr'); + return; + } # here's a bit of fun, convert incoming ann with a callsign in the first word # or one saying 'to ' to a talk if we can route to the recipient @@ -626,8 +634,6 @@ sub handle_12 # send it $self->send_announce($line, @_[1..6]); - } elsif ((($dxchan = DXChannel->get($_[2])) && $dxchan->is_user) || $_[4] =~ /^[\#\w]+$/){ - $self->send_chat($line, @_[1..6]); } else { $self->route($_[2], $line); } @@ -1833,9 +1839,13 @@ sub send_chat # send it if it isn't the except list and isn't isolated and still has a hop count # taking into account filtering and so on foreach $dxchan (@dxchan) { - next if $dxchan == $main::me; - next if $dxchan == $self && $self->is_node; - next if $target eq 'LOCAL' && $dxchan->is_node; + if ($dxchan->is_node) { + next if $dxchan == $main::me; + next if $dxchan == $self; + next unless $dxchan->is_spider || $dxchan->is_ak1a; + next if $target eq 'LOCAL'; + } + $dxchan->chat($line, $self->{isolate}, $target, $_[1], $text, @_, $self->{call}, $ann_dxcc, $ann_itu, $ann_cq, $org_dxcc, $org_itu, $org_cq); } }