From 375f2f00086f959d332837f9035d8db1911678df Mon Sep 17 00:00:00 2001 From: Dirk Koopman Date: Tue, 3 Jul 2007 23:16:08 +0100 Subject: [PATCH] fix unwanted dupe notifications on looped PC12 --- Changes | 2 ++ perl/AnnTalk.pm | 2 +- perl/DXProt.pm | 12 ++++++------ perl/Version.pm | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Changes b/Changes index 790a2b73..47eee0a1 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,5 @@ +03Jul07======================================================================= +1. fix unwanted dupe notifications if a PC12 comes back in on a loop. 02Jul07======================================================================= 1. Add a new command to show the contents of the cmd_cache. This allows those people whom develop their own commands to see which version they are using. diff --git a/perl/AnnTalk.pm b/perl/AnnTalk.pm index 72abfeb2..02bb0a9b 100644 --- a/perl/AnnTalk.pm +++ b/perl/AnnTalk.pm @@ -18,7 +18,7 @@ use DXVars; use vars qw(%dup $duplth $dupage $filterdef); $duplth = 60; # the length of text to use in the deduping -$dupage = 5*3600; # the length of time to hold spot dups +$dupage = 5*3600; # the length of time to hold ann dups $filterdef = bless ([ # tag, sort, field, priv, special parser ['by', 'c', 0], diff --git a/perl/DXProt.pm b/perl/DXProt.pm index ec6f5b04..296553d2 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -69,7 +69,7 @@ $eph_pc15_restime = 6*60; $eph_pc34_restime = 30; $pingint = 5*60; $obscount = 2; -$chatdupeage = 20 * 60 * 60; +$chatdupeage = 20 * 60; $chatimportfn = "$main::root/chat_import"; $investigation_int = 12*60*60; # time between checks to see if we can see this node $pc19_version = 5466; # the visible version no for outgoing PC19s generated from pc59 @@ -654,9 +654,9 @@ sub send_announce } } - if (AnnTalk::dup($from, $_[1], $_[2])) { + if (AnnTalk::dup($from, $target, $_[2])) { my $dxchan = DXChannel::get($from); - if ($dxchan && $dxchan->is_user) { + if ($self == $main::me && $dxchan && $dxchan->is_user) { if ($dxchan->priv < 5) { $dxchan->send($dxchan->msg('dup')); return; @@ -681,7 +681,7 @@ sub send_announce } } -my $msgid = 0; +my $msgid = int rand(1000); sub nextchatmsgid { @@ -722,9 +722,9 @@ sub send_chat } } - if (AnnTalk::dup($from, $target, $_[2], $chatdupeage)) { + if (AnnTalk::dup($from, $target, $_[2], $main::systime + $chatdupeage)) { my $dxchan = DXChannel::get($from); - if ($dxchan && $dxchan->is_user) { + if ($self == $main::me && $dxchan && $dxchan->is_user) { if ($dxchan->priv < 5) { $dxchan->send($dxchan->msg('dup')); return; diff --git a/perl/Version.pm b/perl/Version.pm index 50a7ce66..5c6d1a29 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 = '100'; +$build = '101'; 1; -- 2.43.0