# $Id: majordomo-share.cf,v 1.4 1997/02/25 05:41:33 fitz Exp $ # Config file shared by majordomo.cf and majordomo-admin.cf # package config; use strict; #---------------------------------------------------------------------- # get command # $config::command{"get"} = < Filenames: EOT sub process_get { my($file, @commands); &main::error("Before you can get a file, you must enter ", "the name of the mailing list.") unless ($main::in{"list"}); &main::error("You must specify the filename to get.") unless ($main::in{"majordomoGetFile"}); # Multiple files are allowed foreach $file (split(/\n/, $main::in{"majordomoGetFile"})) { # Skip empty lines next if $file =~ /^\s*$/; push(@commands, "get $main::in{list} $file"); } # Return the commands @commands; } #---------------------------------------------------------------------- # which command # $config::command{"which"} = < (optional) Search for address: EOT sub process_which { "which $main::in{majordomoWhich}"; } #---------------------------------------------------------------------- # enter command # $config::command{"enter"} = < Commands: EOT sub process_enter { my($command, @commands); &main::error("You must specify a $config::name command to send.") unless ($main::in{"majordomoEnter"}); # Multiple files are allowed foreach $command (split(/\n/, $main::in{"majordomoEnter"})) { # Skip empty lines next if $command =~ /^\s*$/; push(@commands, $command); } # Return the commands @commands; } #---------------------------------------------------------------------- # help command # sub process_help { "help"; } #---------------------------------------------------------------------- # index command # sub process_index { &main::error("Before you can get an index of files, ", "you must enter the name of the mailing list.") unless ($main::in{"list"}); "index $main::in{list}"; } #---------------------------------------------------------------------- # info command # sub process_info { &main::error("Before you can get information about the list, ", "you must enter the name of the mailing list.") unless ($main::in{"list"}); "info $main::in{list}"; } #---------------------------------------------------------------------- # lists command # sub process_lists { "lists"; } #---------------------------------------------------------------------- # who command # sub process_who { &main::error("Before you can list who is on the list, ", "you must enter the name of the mailing list.") unless ($main::in{"list"}); "who $main::in{list}"; } 1;