#
my ($self, $line) = @_;
+#$DB::single = 1;
my @f = split /\s+/, $line;
return (1, $self->msg('e5')) if $self->remotecmd || $self->inscript;
return (1, $self->msg('e9')) if !@f;
return (1, ());
}
-return (1, $self->msg('dup')) if $self->priv < 5 && AnnTalk::dup($from, $toflag, $line);
+#return (1, $self->msg('dup')) if $self->priv < 5 && AnnTalk::dup($from, $toflag, $line);
Log('ann', $to, $from, $line);
$main::me->normal(DXProt::pc93($to, $from, $via, $line));
use vars qw(%dup $duplth $dupage $filterdef);
$duplth = 60; # the length of text to use in the deduping
-$dupage = 5*24*3600; # the length of time to hold spot dups
+$dupage = 5*3600; # the length of time to hold spot dups
$filterdef = bless ([
# tag, sort, field, priv, special parser
['by', 'c', 0],
$text = pack("C*", map {$_ & 127} unpack("C*", $text));
$text =~ s/[^\#a-zA-Z0-9]//g;
$text = substr($text, 0, $duplth) if length $text > $duplth;
- my $dupkey = "A$to|\L$text";
+ my $dupkey = "A$call|$to|\L$text";
return DXDupe::check($dupkey, $t);
}
my $target = $_[6];
my $to = 'To ';
my $text = unpad($_[2]);
+ my $from = $_[0];
if ($_[3] eq '*') { # sysops
$target = "SYSOP";
# 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) =
}
}
- 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
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$//) {
}
# 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) =
}
}
- 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