# $Id: majordomo.cf,v 1.3 1997/02/25 05:41:44 fitz Exp $
# Config file for Majordomo
#

package config;
$name = "Majordomo";
@commands =
    (
     "subscribe",
     "unsubscribe",
     "info",
     "who",
     "which",
     "lists",
     "", # Start a new column
     "index",
     "get",
     "help",
     "enter",
     );
%description =
    (
     "subscribe", "Subscribe",
     "unsubscribe", "Unsubscribe",
     "info", "Describe the mailing list.",
     "who", "Who is on the mailing list?",
     "lists", "Show other lists on this server.",
     "help", "Get help for <em>$name</em> commands.",

     "which", "Show lists to which you are subscribed:",
     "index", "List files in the archive.",
     "get", "Get files from the archive:",
     "enter", "Enter <EM>$name</EM> commands:",
     );

#######################################################################
#----------------------------------------------------------------------
# Majordomo command forms
#----------------------------------------------------------------------
#######################################################################

# Code for the commands that are used in both the administrative
# interface and the user interface

require "majordomo-share.cf";

use strict;

#----------------------------------------------------------------------
# subscribe command
#
sub process_subscribe
{
    &main::error("Before you can subscribe, ",
                "you must enter the name of the mailing list.")
        unless ($main::in{"list"});

    "subscribe $main::in{list}";
}

#----------------------------------------------------------------------
# unsubscribe command
#
sub process_unsubscribe
{
    &main::error("Before you can unsubscribe, ",
                "you must enter the name of the mailing list.")
        unless ($main::in{"list"});

    "unsubscribe $main::in{list}";
}

1;
