X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=e2c1dae4221ebdc9cceca1ce97c14b09d11637f4;hb=eef5d189206ebcfaf8e83675803829c72671a320;hp=6e5efeafbe3246ab9c106479287316d3e3d014be;hpb=970d8ae5f1c263bc78390ca35ee876aa41382f21;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 6e5efeaf..e2c1dae4 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -51,7 +51,7 @@ $baddxfn = "$main::data/baddx.pl"; @checklist = ( - [ qw(c c m p bc c) ], # pc10 + [ qw(c c m bp bc c) ], # pc10 [ qw(f m d t m c c h) ], # pc11 [ qw(c bc m bp bm p h) ], # pc12 [ qw(c h) ], # @@ -239,7 +239,7 @@ sub start # send initialisation string unless ($self->{outbound}) { - $self->send(pc38()) if DXNode->get_all(); +# $self->send(pc38()) if DXNode->get_all(); $self->send(pc18()); $self->{lastping} = $main::systime; } else { @@ -263,6 +263,8 @@ sub normal { my ($self, $line) = @_; my @field = split /\^/, $line; + return unless @field; + pop @field if $field[-1] eq '~'; # print join(',', @field), "\n"; @@ -422,7 +424,7 @@ sub normal # announce duplicate checking $field[3] =~ s/^\s+//; # remove leading blanks if (AnnTalk::dup($field[1], $field[2], $field[3])) { - dbg('chan', "Duplicate Announce ignored\n"); + dbg('chan', "Duplicate Announce ignored"); return; } @@ -615,12 +617,16 @@ sub normal if ($call ne $main::mycall) { # don't allow malicious buggers to disconnect me! my $node = DXCluster->get_exact($call); if ($node) { + if ($call eq $self->{call}) { + dbg('chan', "LOOP: Trying to disconnect myself with PC21"); + return; + } if ($node->dxchan != $self) { dbg('chan', "LOOP: $call come in on wrong channel"); return; } my $dxchan; - if (($dxchan = DXChannel->get($call)) && $dxchan != $self) { + if ($dxchan = DXChannel->get($call)) { dbg('chan', "LOOP: $call connected locally"); return; } @@ -725,7 +731,7 @@ sub normal if ($pcno == 49 || $field[1] eq $main::mycall) { DXMsg::process($self, $line); } else { - $self->route($field[1], $line); + $self->route($field[1], $line) unless $self->is_clx; } return; } @@ -886,6 +892,13 @@ sub normal return; } + if ($pcno == 75) { # dunno but route it + if ($field[1] ne $main::mycall) { + $self->route($field[1], $line); + } + return; + } + if ($pcno == 73) { # WCY broadcasts # do some de-duping @@ -1259,7 +1272,10 @@ sub send_announce $dxchan->send($routeit) unless $dxchan->{isolate} || $self->{isolate}; } - } elsif ($dxchan->is_user && $dxchan->{ann}) { + } elsif ($dxchan->is_user) { + unless ($dxchan->{ann}) { + next if $_[0] ne $main::myalias && $_[0] ne $main::mycall; + } next if $target eq 'SYSOP' && $dxchan->{priv} < 5; my $buf = "$to$target de $_[0]: $text"; $buf .= "\a\a" if $dxchan->{beep}; @@ -1344,7 +1360,7 @@ sub broadcast_ak1a { my $s = shift; # the line to be rebroadcast my @except = @_; # to all channels EXCEPT these (dxchannel refs) - my @dxchan = DXChannel::get_all_ak1a(); + my @dxchan = DXChannel::get_all_nodes(); my $dxchan; # send it if it isn't the except list and isn't isolated and still has a hop count @@ -1361,7 +1377,7 @@ sub broadcast_all_ak1a { my $s = shift; # the line to be rebroadcast my @except = @_; # to all channels EXCEPT these (dxchannel refs) - my @dxchan = DXChannel::get_all_ak1a(); + my @dxchan = DXChannel::get_all_nodes(); my $dxchan; # send it if it isn't the except list and isn't isolated and still has a hop count