From d626e783adc2de0d666098c631d1f0aa8abc9f68 Mon Sep 17 00:00:00 2001 From: Dirk Koopman Date: Tue, 24 Jul 2007 16:38:08 +0100 Subject: [PATCH] Try to improve PC93 discrimination between talk and chat --- Changes | 7 +++++++ perl/DXProt.pm | 16 +++++++++++++++- perl/DXProtHandle.pm | 24 +++++++++++++----------- perl/Version.pm | 2 +- 4 files changed, 36 insertions(+), 13 deletions(-) diff --git a/Changes b/Changes index 45c6ea75..7b64449c 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,10 @@ +24Jul07======================================================================= +1. Try to target PC93 (the combined talk/ann/chat sentence) better. Prevent +PC12 chat going to non-dxspider and non-ak1a nodes. None of the others seem to +handle it correctly (Lee VE7CC: do you?). +2. a few other tidyups, +see: http://www.dxcluster.org/cgi-bin/gitweb.cgi?p=spider.git +for details. 18Jul07======================================================================= 1. Change the meaning of set/isolate. Set/isolate now works in both directions in that an isolated node will only have its local config remembered and will diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 596f1f08..7ad886fd 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -783,7 +783,21 @@ sub announce sub chat { - goto &announce; + my $self = shift; + my $line = shift; + my $isolate = shift; + my $to = shift; + my $target = shift; + my $text = shift; + my ($filter, $hops); + + if ($self->{annfilter}) { + ($filter, $hops) = $self->{annfilter}->it(@_); + return unless $filter; + } + if (($self->is_spider || $self->is_ak1a) && $_[1] ne $main::mycall) { + send_prot_line($self, $filter, $hops, $isolate, $line); + } } diff --git a/perl/DXProtHandle.pm b/perl/DXProtHandle.pm index cd229c0f..831d8885 100644 --- a/perl/DXProtHandle.pm +++ b/perl/DXProtHandle.pm @@ -1711,7 +1711,8 @@ sub handle_93 return; } - # remember that we are converting PC10->PC93 + # remember that we are converting PC10->PC93 and self will be $main::me if it + # comes from us unless ($self->{do_pc9x}) { dbg("PCPROT: PC9x come in from non-PC9x node, ignored") if isdbg('chanerr'); return; @@ -1720,11 +1721,11 @@ sub handle_93 my $t = $_[2]; my $parent = check_pc9x_t($pcall, $t, 93, 1) || return; - my $to = $_[3]; - my $from = $_[4]; - my $via = $_[5]; + my $to = uc $_[3]; + my $from = uc $_[4]; + my $via = uc $_[5]; my $text = $_[6]; - my $onode = $_[7]; + my $onode = uc $_[7]; $onode = $pcall if @_ <= 8; # this is catch loops caused by bad software ... @@ -1749,7 +1750,9 @@ sub handle_93 return; } - if (is_callsign($to)) { + # if it is routeable then then treat it like a talk + my $ref = Route::get($to); + if ($ref) { # local talks my $dxchan; $dxchan = DXChannel::get($main::myalias) if $to eq $main::mycall; @@ -1767,7 +1770,6 @@ sub handle_93 } # convert to PC10 talks where appropriate - my $ref = Route::get($to); if ($ref) { # just go for the "best" one for now (rather than broadcast) $dxchan = $ref->dxchan; @@ -1786,15 +1788,15 @@ sub handle_93 } # otherwise, drop through and allow it to be broadcast - } elsif ($to eq '*' || uc $to eq 'SYSOP' || uc $to eq 'WX') { + } elsif ($to eq '*' || $to eq 'SYSOP' || $to eq 'WX') { # announces - my $sysop = uc $to eq 'SYSOP' ? '*' : ' '; - my $wx = uc $to eq 'WX' ? '1' : '0'; + my $sysop = $to eq 'SYSOP' ? '*' : ' '; + my $wx = $to eq 'WX' ? '1' : '0'; my $local = $via eq 'LOCAL' ? '*' : $via; $self->send_announce(1, pc12($from, $text, $local, $sysop, $wx, $pcall), $from, $local, $text, $sysop, $pcall, $wx, $via eq 'LOCAL' ? $via : undef); return if $via eq 'LOCAL'; - } else { + } elsif (!is_callsign($to) && $text =~ /^#\d+ /) { # chat messages to non-pc9x nodes $self->send_chat(1, pc12($from, $text, undef, $to, undef, $pcall), $from, '*', $text, $to, $pcall, '0'); } diff --git a/perl/Version.pm b/perl/Version.pm index c3627308..f54e69da 100644 --- a/perl/Version.pm +++ b/perl/Version.pm @@ -11,6 +11,6 @@ use vars qw($version $subversion $build); $version = '1.54'; $subversion = '0'; -$build = '126'; +$build = '127'; 1; -- 2.43.0