# $Id: listproc.cf,v 1.3 1997/02/25 05:39:51 fitz Exp $
# Config file for ListProcessor
#
package config;
$name = "ListProcessor";
@commands =
(
"subscribe",
"unsubscribe",
"information",
"recipients",
"statistics",
"lists",
"which",
"help",
"help_topic",
"", # Split columns here
"set_query",
"set_mail",
"set_conceal",
"set_password",
"enter",
);
%description =
(
"subscribe", "Subscribe",
"unsubscribe", "Unsubscribe",
"which", "Show lists to which you are subscribed.",
"information", "Describe the mailing list.",
"recipients", "Who is on the mailing list?",
"set_query", "Get your $name settings.",
"set_mail", "Change the way you receive mailing list messages.",
"set_password", "Change your list password:",
"set_conceal", "Conceal/reveal your presence:",
"lists", "Show other lists on this server.",
"statistics", "Get statistics about the list:",
"enter", "Enter a $name command.",
"help", "Get help for $name commands.",
"help_topic", "Get help for topic:",
);
#######################################################################
#----------------------------------------------------------------------
# Listproc command forms
#----------------------------------------------------------------------
#######################################################################
use strict;
#----------------------------------------------------------------------
# subscribe command
#
$config::command{"subscribe"} = <
Your full name:
EOT
sub process_subscribe
{
&main::error("Before you can subscribe ",
"you must enter the name of the mailing list.")
unless $main::in{"list"};
&main::error("To subscribe you must specify your full name.")
unless $main::in{"subName"};
"subscribe $main::in{list} $main::in{subName}";
}
#----------------------------------------------------------------------
# help_topic command
#
$config::command{"help_topic"} = <
EOT
sub process_help_topic
{
&main::error("You must enter a help topic.")
unless ($main::in{helpTopic});
"help $main::in{helpTopic}";
}
#----------------------------------------------------------------------
# statistics command
#
$config::command{"statistics"} = <
(optional, separate with commas)
Email addresses:
EOT
sub process_statistics
{
&main::error("Before you can get statistics you must enter a list name.")
unless ($main::in{'list'});
"statistics $main::in{list} $main::in{statistics_addr}";
}
#----------------------------------------------------------------------
# set_mail command
#
$config::command{"set_mail"} = <
Send messages one at a time; also send back my postings
Send messages one at a time; do not send back my postings
Send messages in digests; do not send back my postings
Temporarily stop sending messages until I change mode again
EOT
sub process_set_mail
{
&main::error("Before you can change your mail options ",
"you must enter a list name.")
unless $main::in{'list'};
&main::error("You can select a mail option.")
unless $main::in{'setMail'};
"set $main::in{list} mail $main::in{setMail}";
}
#----------------------------------------------------------------------
# set_password command
#
$config::command{"set_password"} = <
Current:
New:
Retype:
EOT
sub process_set_password
{
&main::error("Before you change passwords you must enter a list name.")
unless $main::in{'list'};
&main::error("You must enter the current password.")
unless $main::in{'oldpass'};
&main::error("You must enter the new password twice.")
unless ($main::in{'newpass'} && $main::in{'newpass2'});
&main::error("The new password must match the retyped password.")
unless ($main::in{'newpass'} eq $main::in{'newpass2'});
"set $main::in{list} password " .
&hidePassword($main::in{oldpass}) . " " .
&hidePassword($main::in{newpass});
}
#----------------------------------------------------------------------
# set_conceal command
#
$config::command{"set_conceal"} = <
Conceal your presence
Reveal your presence
EOT
sub process_set_conceal
{
&main::error("Before you conceal/reveal you must enter a list name.")
unless $main::in{'list'};
&main::error("You must select a conceal/reveal option.")
unless $main::in{'conceal'};
"set $main::in{list} conceal $main::in{conceal}";
}
#----------------------------------------------------------------------
# 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";
}
#----------------------------------------------------------------------
# set_query command
#
sub process_set_query
{
&main::error("Before you can query the settings ",
"you must enter a list name.")
unless ($main::in{'list'});
"set $main::in{list}";
}
#----------------------------------------------------------------------
# information command
#
sub process_information
{
&main::error("Before you can get information about the list ",
"you must enter the list name.")
unless $main::in{"list"};
"information $main::in{list}";
}
#----------------------------------------------------------------------
# lists command
#
sub process_lists
{
"lists";
}
#----------------------------------------------------------------------
# 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}";
}
#----------------------------------------------------------------------
# which command
#
sub process_which
{
"which";
}
#----------------------------------------------------------------------
# recipients command
#
sub process_recipients
{
&main::error("Before you can get a list of recipients ",
"you must enter the name of the list.")
unless ($main::in{"list"});
"recipients $main::in{list}";
}
1;