spider/cmd/wx.pl
minima 50f6466ca2 1. fix set/lockout so that it is possible to lock out all SSIDs except those
specifically unlocked and so that you don't need to lock the non-SSID call in
order to lock an SSID call. So set/lock g1tlh will lock out all instances of
g1tlh, g1tlh-1, g1tlh-15 etc except (for instance) unset/lock g1tlh-9.
2. show/lock allows partial callsign matching so sh/lock gb7 will only show
GB7* calls that are locked.
3. Had a grand shift around for the start of NP.
2001-09-20 14:13:11 +00:00

47 lines
1.0 KiB
Perl

#
# do an wx message, this is identical to the announce except that it does WX
# instead
#
# handles wx
# wx full
# wx sysop
#
# at the moment these keywords are fixed, but I dare say a file containing valid ones
# will appear
#
# Copyright (c) 1998 Dirk Koopman G1TLH
#
# $Id$
#
my ($self, $line) = @_;
my @f = split /\s+/, $line;
my $sort = uc $f[0];
my @locals = DXCommandmode->get_all();
my $to;
my $from = $self->call;
my $t = ztime(time);
my $tonode;
my $sysopflag;
if ($sort eq "FULL") {
$line =~ s/^$f[0]\s+//; # remove it
$to = "ALL";
} elsif ($sort eq "SYSOP") {
$line =~ s/^$f[0]\s+//; # remove it
@locals = map { $_->priv >= 5 ? $_ : () } @locals;
$to = "SYSOP";
$sysopflag = '*';
} else {
$to = "LOCAL";
}
DXChannel::broadcast_list("WX de $from <$t>: $line", 'wx', undef, @locals);
if ($to ne "LOCAL") {
$line =~ s/\^//og; # remove ^ characters!
my $pc = DXProt::pc12($from, $line, $tonode, $sysopflag, 1);
DXChannel::broadcast_nodes($pc, $main::me);
}
return (1, ());