From 9b0b6e74e3463465f2cd6da576b366403a8d0d5e Mon Sep 17 00:00:00 2001 From: minima Date: Thu, 3 Oct 2002 13:03:34 +0000 Subject: [PATCH] make the sp sysop privileged --- Changes | 3 +++ cmd/apropos.pl | 4 ++-- cmd/send.pl | 32 +++++++++++++++++++------------- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/Changes b/Changes index a41425d9..3cc041c2 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,6 @@ +03Oct02======================================================================= +1. only sysop (priv=5+) can now send to distro SYSOP, ordinary users will have +their message routed to the $main::myalias callsign as a private message. 29Sep02======================================================================= 1. Added LRU caching to DXUsers and Prefix. 2. make Timer::handler only search its chain once a second seeing as that diff --git a/cmd/apropos.pl b/cmd/apropos.pl index d3def0cd..ac1d0f60 100644 --- a/cmd/apropos.pl +++ b/cmd/apropos.pl @@ -56,7 +56,7 @@ foreach $in (<$defh>) { $include = 1; next; } - $include =~ 1 if $cmd =~ /$line/i; + $include = 1 if $cmd =~ /$line/i; } $cmd{$cmd} = "$cmd $desc" if $include; $defh->close; @@ -79,7 +79,7 @@ if ($h) { $include = 1; next; } - $include =~ 1 if $cmd =~ /$line/i; + $include = 1 if $cmd =~ /$line/i; } $cmd{$cmd} = "$cmd $desc" if $include; $h->close; diff --git a/cmd/send.pl b/cmd/send.pl index b728d387..e78aabd3 100644 --- a/cmd/send.pl +++ b/cmd/send.pl @@ -113,19 +113,25 @@ if ($self->state eq "prompt") { # $DB::single = 1; # is this callsign a distro? - my $fn = "/spider/msg/distro/$f.pl"; - if (-e $fn) { - my $fh = new IO::File $fn; - if ($fh) { - local $/ = undef; - my $s = <$fh>; - $fh->close; - my @call; - @call = eval $s; - return (1, "Error in Distro $f.pl:", $@) if $@; - if (@call > 0) { - push @f, @call; - next; + # but be careful about messages to 'sysop' + if ($self->priv < 5 && $f eq 'SYSOP') { + push @to, $main::myalias; + $loc->{private} = 1; + } else { + my $fn = "/spider/msg/distro/$f.pl"; + if (-e $fn) { + my $fh = new IO::File $fn; + if ($fh) { + local $/ = undef; + my $s = <$fh>; + $fh->close; + my @call; + @call = eval $s; + return (1, "Error in Distro $f.pl:", $@) if $@; + if (@call > 0) { + push @f, @call; + next; + } } } } -- 2.43.0