From: djk Date: Sun, 7 Nov 1999 12:40:32 +0000 (+0000) Subject: 1. reduced the amount of stuff compared against for dup announces. X-Git-Tag: R_1_34~9 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=c560dd09aefc252be5664ba2dd329b7bc126176d;p=spider.git 1. reduced the amount of stuff compared against for dup announces. 2. Check the regex for DK0WCY announces produces results before storing it as a WWV. 3. Added some logging for set/priv (un)set/lockout. --- diff --git a/Changes b/Changes index 02a1b91e..d9502786 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,8 @@ +07Nov99======================================================================= +1. reduced the amount of stuff compared against for dup announces. +2. Check the regex for DK0WCY announces produces results before storing it as +a WWV. +3. Added some logging for set/priv (un)set/lockout. 04Nov99======================================================================= 1. Removed ~ from the end of the PC18. 2. Removed a hangover from duff character checking in cluster.pl diff --git a/cmd/set/lockout.pl b/cmd/set/lockout.pl index 492120b9..b5c010fd 100644 --- a/cmd/set/lockout.pl +++ b/cmd/set/lockout.pl @@ -13,7 +13,10 @@ my @out; my $user; my $ref; -return (1, $self->msg('e5')) if $self->priv < 9; +if ($self->priv < 9) { + Log('DXCommand', $self->call . " attempted to lockout @args"); + return (1, $self->msg('e5')); +} foreach $call (@args) { $call = uc $call; @@ -28,7 +31,9 @@ foreach $call (@args) { $ref->put(); push @out, $self->msg("lockoutc", $call); } + Log('DXCommand', $self->call . " locked out $call"); } else { + Log('DXCommand', $self->call . " attempted to lockout $call remotely"); push @out, $self->msg('sorry'); } } diff --git a/cmd/set/privilege.pl b/cmd/set/privilege.pl index 4e302297..5a475e7f 100644 --- a/cmd/set/privilege.pl +++ b/cmd/set/privilege.pl @@ -15,10 +15,13 @@ my @out; my $user; my $ref; -return (0) if $self->priv < 9; +if ($self->priv < 9) { + Log('DXCommand', $self->call . " attempted to set privilege $priv for @args"); + return (1, $self->msg('e5')); +} if ($priv < 0 || $priv > 9) { - return (0, $self->msg('e5')); + return (1, $self->msg('e5')); } foreach $call (@args) { @@ -35,11 +38,13 @@ foreach $call (@args) { } if ($ref || $user) { push @out, $self->msg('priv', $call); + Log('DXCommand', "Privilege set to $priv on $call by " . $self->call); } else { push @out, $self->msg('e3', "Set Privilege", $call); } } else { push @out, $self->msg('sorry'); + Log('DXCommand', $self->call . " attempted to set privilege $priv for $call remotely"); } } return (1, @out); diff --git a/cmd/unset/lockout.pl b/cmd/unset/lockout.pl index 3d17c7b7..5cc1ac3d 100644 --- a/cmd/unset/lockout.pl +++ b/cmd/unset/lockout.pl @@ -13,7 +13,10 @@ my @out; my $user; my $ref; -return (1, $self->msg('e5')) if $self->priv < 9; +if ($self->priv < 9) { + Log('DXCommand', $self->call . " attempted to un-lockout @args"); + return (1, $self->msg('e5')); +} foreach $call (@args) { $call = uc $call; @@ -22,10 +25,12 @@ foreach $call (@args) { $ref->lockout(0); $ref->put(); push @out, $self->msg("lockoutun", $call); + Log('DXCommand', $self->call . " un-locked out $call"); } else { push @out, $self->msg('e3', 'unset/lockout', $call); } } else { + Log('DXCommand', $self->call . " attempted to un-lockout $call remotely"); push @out, $self->msg('sorry'); } } diff --git a/perl/DXProt.pm b/perl/DXProt.pm index b99a352f..751daf04 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -267,7 +267,7 @@ sub normal if ($pcno == 12) { # announces # announce duplicate checking my $text = substr(uc unpad($field[3]), 0, $pc12_dup_lth); - my $dupkey = $field[1].$field[2].$text.$field[4].$field[6]; + my $dupkey = $field[1].$field[2].$text; if ($anndup{$dupkey}) { dbg('chan', "Duplicate Announce ignored\n"); return; @@ -291,7 +291,7 @@ sub normal if ($decode_dk0wcy && $field[1] eq $decode_dk0wcy) { my ($hour, $k, $next, $a, $r, $sfi, $alarm) = $field[3] =~ /^Aurora Beacon\s+(\d+)UTC,\s+Kiel\s+K=(\d+),.*ed\s+K=(\d+),\s+A=(\d+),\s+R=(\d+),\s+SFI=(\d+),.*larm:\s+(\w+)/; $alarm = ($alarm =~ /^Y/i) ? ', Aurora in DE' : ''; - my $wwv = Geomag::update($main::systime, $hour, $sfi, $a, $k, "R=$r, Next K=$next$alarm", $decode_dk0wcy, $field[5], $r); + my $wwv = Geomag::update($main::systime, $hour, $sfi, $a, $k, "R=$r, Next K=$next$alarm", $decode_dk0wcy, $field[5], $r) if $sfi && $r; } } else {