]> dxcluster.org Git - spider.git/commitdiff
1. reduced the amount of stuff compared against for dup announces.
authordjk <djk>
Sun, 7 Nov 1999 12:40:32 +0000 (12:40 +0000)
committerdjk <djk>
Sun, 7 Nov 1999 12:40:32 +0000 (12:40 +0000)
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.

Changes
cmd/set/lockout.pl
cmd/set/privilege.pl
cmd/unset/lockout.pl
perl/DXProt.pm

diff --git a/Changes b/Changes
index 02a1b91e24c7dd7e8f275f5c1fa3f0fe695f306e..d950278693c8e2457a4b4ec981727e3dc173c544 100644 (file)
--- 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
index 492120b9b2a008f65c9c74b5b67e7fee5d90c1d6..b5c010fdd9e3274aac7305f7876ce6f6cf90928a 100644 (file)
@@ -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');
        }
 }
index 4e30229775a901663e59cea75cd20cc53f9db5ed..5a475e7fe70ec90c07b1a8280a77276912eb22bc 100644 (file)
@@ -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);
index 3d17c7b7268f7f6c8ffb80a61127ecb39aa86f0f..5cc1ac3dda1260cb966a03bc30cd397d4bf2bc15 100644 (file)
@@ -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');
        }
 }
index b99a352f3f1188d87d8997d6fefb96a7b83c0e23..751daf04de0698fa1ff0f63cb2e7b15a6b59c5c6 100644 (file)
@@ -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 {