X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?p=spider.git;a=blobdiff_plain;f=cmd%2Fannounce.pl;h=cb2e325dff6c8c6e62811e276ae8fe913a59345b;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hb=0824a94355e5fb2b4c379bb013d66466725629f5;hpb=2546ef0cfaaca39e65985e414258071a636979af diff --git a/cmd/announce.pl b/cmd/announce.pl index e69de29b..cb2e325d 100644 --- a/cmd/announce.pl +++ b/cmd/announce.pl @@ -0,0 +1,45 @@ +# +# do an announce message +# +# handles announce +# announce full +# announce 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"; +} + +DXProt::broadcast_list("To $to de $from <$t>: $line", @locals); +if ($to ne "LOCAL") { + $line =~ s/\^//og; # remove ^ characters! + my $pc = DXProt::pc12($self, $line, $tonode, $sysopflag, 0); + DXProt::broadcast_ak1a($pc); +} + +return (1, ());