+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
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;
$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');
}
}
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) {
}
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);
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;
$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');
}
}
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;
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 {