Great Circle Associates Majordomo-Workers
(April 1995)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: unsubscribe *
From: Paul-Joseph de Werk <paul%av2 . vrx . vhi . com @ vhipub . vhi . com>
Date: 13 Apr 1995 11:39:08 -0700
To: majordomo-workers @ greatcircle . com
In-reply-to: <9504131817.AA08833@av2.vrx.vhi.com>

I've added an 'unsubscribe *' to my copy of majordomo-1.93.  It's not
fully tested, but it seems to work.  If anyone is willing to test it,
the patch code is below.  Please let me know if there are problems and
what they are.

===== CUT HERE ===== begin: majordomo.patch =====
*** majordomo.orig	Thu Apr 13 10:50:40 1995
--- majordomo	Thu Apr 13 11:13:30 1995
***************
*** 249,254 ****
--- 249,273 ----
      }
  }
  
+ sub do_unsubscribe_all {
+     local(@parts) = @_;
+ 
+     opendir(RD_DIR, $listdir) || &abort("opendir failed $!");
+     @lists = readdir(RD_DIR);
+     closedir(RD_DIR);
+ 
+     foreach (sort @lists) {
+ 	$list = $_;
+ 	$list =~ s,^.*/,,;		# strip off leading path
+ 	$list =~ /[^-_0-9a-zA-Z]/ && next; # skip non-list files (*.info, etc.)
+ 
+ 	print REPLY "Doing 'unsubscribe $list ", join(' ', @parts), "'.\n";
+ 	unshift(@parts, $list);
+ 	&do_unsubscribe(@parts);
+ 	shift(@parts);
+     }
+ }
+ 
  sub do_unsubscribe {
      local($match_count) = 0;
      # figure out what list we are trying to unsubscribe from
***************
*** 256,261 ****
--- 275,284 ----
      local($sm) = "unsubscribe";
      local($list) = shift;
      local($clean_list);
+     if ($list =~ /^\*$/) {
+     	&do_unsubscribe_all(@_);
+     	return 0;
+     }
      if ( ((!$list) || ! ($clean_list = &valid_list($listdir, $list)))
  	&& defined($deflist)) {
          unshift(@_,$list) ; 				# Not a list name, put it back.
===== CUT HERE ===== end  : majordomo.patch =====

-Paul

#include <stddisclamer>
 __________________________________________________________________________
[ Paul-Joseph de Werk, B.S. \ RX Net, Inc.                                 ]
[ Systems Analyst II         \ MIS Dept.                                   ]
[                             \ vrx: paul@av2.vrx.vhi.com                  ]
[                              \ inet: paul%av2.vrx.vhi.com@vhipub.vhi.com ]
[_______________________________\__________________________________________]


Indexed By Date Previous: Re: approve and From lines
From: "John P. Rouillard" <rouilj@cs.umb.edu>
Next: Re: large volumes?
From: dwolfe@risc.sps.mot.com (Dave Wolfe)
Indexed By Thread Previous: Re: 3 problems: (1) majordomo erasing lists, (2) echo help, (3) medit
From: "John P. Rouillard" <rouilj@cs.umb.edu>
Next: Re: large volumes?
From: dwolfe@risc.sps.mot.com (Dave Wolfe)

Google
 
Search Internet Search www.greatcircle.com