# $Id: pmdf.cf,v 1.3 1997/02/25 05:42:07 fitz Exp $
# Config file for PMDF Mailserv
#
package config;
$name = "PMDF Mailserv";
@commands =
(
"subscribe",
"unsubscribe",
"lists",
"dir",
"", # Split columns here
"help",
"enter",
);
%description =
(
"subscribe", "Subscribe",
"unsubscribe", "Unsubscribe",
"lists", "Show other lists on this server.",
"dir", "Show other lists that match this pattern.",
"help", "Get help for $name commands.",
"enter", "Enter a $name command.",
);
#######################################################################
#----------------------------------------------------------------------
# PMDF Mailserv command forms
#----------------------------------------------------------------------
#######################################################################
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}";
}
#----------------------------------------------------------------------
# enter command
#
$config::command{"enter"} = <
Command:
EOT
sub process_enter
{
&main::error("You must enter a $config::name command.")
unless $main::in{"enter"};
$main::in{"enter"};
}
#----------------------------------------------------------------------
# help command
#
sub process_help
{
"HELP";
}
#----------------------------------------------------------------------
# lists command
#
sub process_lists
{
"LISTS";
}
#----------------------------------------------------------------------
# dir command
#
$config::command{"dir"} = <
Pattern:
EOT
sub process_dir
{
&main::error("You must enter a directory patter.")
unless $main::in{"PMDFdir"};
"DIRECTORY/LIST $main::in{PMDFdir}";
}
#----------------------------------------------------------------------
# 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;