# $Id: smartlist.cf,v 1.4 1997/02/25 05:42:17 fitz Exp $
# Config file for SmartList
#
package config;
$name = "SmartList";
# This server does not require a mailing list name
$noList = 1;
# Allow only one command per message
$max = 1;
@commands =
(
"subscribe",
"unsubscribe",
"help",
"archive_help",
"",
"archive_list",
"archive_get",
);
%description =
(
"subscribe", "Subscribe",
"unsubscribe", "Unsubscribe",
"help", "Get help for $name commands.",
"archive_list", "List files in the archive.",
"archive_get", "Get a file from the archive.",
"archive_help", "Get help for $name archive commands.",
);
#######################################################################
#----------------------------------------------------------------------
# SmartList command forms
#----------------------------------------------------------------------
#######################################################################
use strict;
#----------------------------------------------------------------------
# help command
#
sub process_help
{
$config::subject = "help";
}
#----------------------------------------------------------------------
# archive help command
#
sub process_archive_help
{
$config::subject = "archive help";
}
#----------------------------------------------------------------------
# subscribe command
#
sub process_subscribe
{
$config::subject = "subscribe";
}
#----------------------------------------------------------------------
# unsubscribe command
#
sub process_unsubscribe
{
$config::subject = "unsubscribe";
}
#----------------------------------------------------------------------
# archive_list command
$config::command{"archive_list"} = <
(optional )
Directory:
EOT
sub process_archive_list
{
$config::subject = "archive";
"ls $main::in{archive_dirs}";
}
#----------------------------------------------------------------------
# archive_get command
$config::command{"archive_get"} = <
Filename:
EOT
sub process_archive_get
{
&main::error("You must enter a filename to retrieve.")
unless $main::in{"archive_file"};
$config::subject = "archive";
"get $main::in{archive_file}";
}
1;