X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=61693f330ed1659bd37223805efa8a7f80c1cf2e;hb=ef4dc061c3a0168c0037305354f62420aeb457aa;hp=ab1ebd1f6f239e640808aa53584fc3ab7bf08485;hpb=43a54b922d0c00c4b0dc02104f266de1c27fa611;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index ab1ebd1f..61693f33 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -476,7 +476,7 @@ sub process # all my non pc9x dependent nodes. if ($main::systime >= $dxchan->{next_pc92_update}) { if ($dxchan->{call} eq $main::mycall || !$dxchan->{do_pc9x}) { - $main::me->broadcast_pc92_update($dxchan->{call}); + $dxchan->broadcast_pc92_update($dxchan->{call}); } } } @@ -624,6 +624,7 @@ sub send_announce my $target = $_[6]; my $to = 'To '; my $text = unpad($_[2]); + my $from = $_[0]; if ($_[3] eq '*') { # sysops $target = "SYSOP"; @@ -640,7 +641,7 @@ sub send_announce # obtain country codes etc - my @a = Prefix::cty_data($_[0]); + my @a = Prefix::cty_data($from); my @b = Prefix::cty_data($_[4]); if ($self->{inannfilter}) { my ($filter, $hops) = @@ -653,12 +654,20 @@ sub send_announce } } - if (AnnTalk::dup($_[0], $_[1], $_[2])) { - dbg("PCPROT: Duplicate Announce ignored") if isdbg('chanerr'); - return; + if (AnnTalk::dup($from, $_[1], $_[2])) { + my $dxchan = DXChannel::get($from); + if ($dxchan && $dxchan->is_user) { + if ($dxchan->priv < 5) { + $dxchan->send($dxchan->msg('dup')); + return; + } + } else { + dbg("PCPROT: Duplicate Announce ignored") if isdbg('chanerr'); + return; + } } - Log('ann', $target, $_[0], $text); + Log('ann', $target, $from, $text); # 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 @@ -692,6 +701,7 @@ sub send_chat my $target = $_[3]; my $text = unpad($_[2]); my $ak1a_line; + my $from = $_[0]; # munge the group and recast the line if required if ($target =~ s/\.LST$//) { @@ -699,7 +709,7 @@ sub send_chat } # obtain country codes etc - my @a = Prefix::cty_data($_[0]); + my @a = Prefix::cty_data($from); my @b = Prefix::cty_data($_[4]); if ($self->{inannfilter}) { my ($filter, $hops) = @@ -712,13 +722,21 @@ sub send_chat } } - if (AnnTalk::dup($_[0], $_[1], $_[2], $chatdupeage)) { - dbg("PCPROT: Duplicate Announce ignored") if isdbg('chanerr'); - return; + if (AnnTalk::dup($from, $target, $_[2], $chatdupeage)) { + my $dxchan = DXChannel::get($from); + if ($dxchan && $dxchan->is_user) { + if ($dxchan->priv < 5) { + $dxchan->send($dxchan->msg('dup')); + return; + } + } else { + dbg("PCPROT: Duplicate Announce ignored") if isdbg('chanerr'); + return; + } } - Log('chat', $target, $_[0], $text); + Log('chat', $target, $from, $text); # 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