]> dxcluster.net Git - spider.git/commitdiff
make the sp sysop privileged
authorminima <minima>
Thu, 3 Oct 2002 13:03:34 +0000 (13:03 +0000)
committerminima <minima>
Thu, 3 Oct 2002 13:03:34 +0000 (13:03 +0000)
Changes
cmd/apropos.pl
cmd/send.pl

diff --git a/Changes b/Changes
index a41425d902990bba03dfe0efbd912992e5c8dfa2..3cc041c20d53064e3a27b37e10c12079778c7e3e 100644 (file)
--- 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
index d3def0cd5dffe9230122ff759d0e68fc22377a55..ac1d0f609a9ea792e429b5351f8bbe66170803ca 100644 (file)
@@ -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;
index b728d38791fd886ea6acdad5754141019bcbb96e..e78aabd311eaf020852e52574aa1c54c7c340456 100644 (file)
@@ -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;
+                                               }
                                        }
                                }
                        }