# $Id: listserv.cf,v 1.3 1997/02/25 05:40:04 fitz Exp $ # Config file for ListServ # package config; $name = "ListServ"; @commands = ( "subscribe", "signoff", "info", "query", "stats", "lists", "help", "info_topics", "info_topic", "enter", "", # start a new table column "set_mail_mode", "set_mail_copy", "set_mail_ack", "set_conceal", "set_mail_disable", ); %description = ( "subscribe", "Subscribe:", "signoff", "Unsubscribe", "info", "Describe the mailing list.", "query", "Get your $name settings.", "set_mail_mode", "Set normal/digest mode:", "set_mail_disable", "Disable/enable mail:", "set_mail_copy", "CC yourself on postings:", "set_mail_ack", "Acknowlegements on postings:", "set_conceal", "Conceal/reveal your presence:", "lists", "Show other lists on this server.", "stats", "Get list statistics.", "enter", "Enter a $name command.", "help", "Get help for $name commands.", "info_topics", "Get a list of help topics.", "info_topic", "Retrieve a help topic.", ); ####################################################################### #---------------------------------------------------------------------- # LISTSERV 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("Before you can subscribe, ", "you must enter your full name.") unless $main::in{'subName'}; "subscribe $main::in{list} $main::in{subName}"; } #---------------------------------------------------------------------- # info_topic command # $config::command{"info_topic"} = < Help topic: EOT sub process_info_topic { &main::error("You must enter a help topic to retrieve.") unless $main::in{"infoTopic"}; "info $main::in{infoTopic}"; } #---------------------------------------------------------------------- # set_mail_mode command # $config::command{'set_mail_mode'} = < Send messages one at a time. Send messages in digests. EOT sub process_set_mail_mode { &main::error("Before you can set the mail mode, ", "you must enter the name of the mailing list.") unless $main::in{"list"}; &main::error("You must select one of the options ", "for setting the mail mode.") unless $main::in{"mailMode"}; "set $main::in{list} $main::in{mailMode}"; } #---------------------------------------------------------------------- # set_mail_disable command # $config::command{'set_mail_disable'} = < Temporarily stop sending messages. Resume sending messages. EOT sub process_set_mail_disable { &main::error("Before you can disable/enable mail, ", "you must enter the name of the mailing list.") unless $main::in{"list"}; &main::error("You must select one of the options for disable/enable.") unless $main::in{"disable"}; "set $main::in{list} $main::in{disable}"; } #---------------------------------------------------------------------- # set_mail_copy command # $config::command{'set_mail_copy'} = < Send me copies of my posts. Do not send me copies. EOT sub process_set_mail_copy { &main::error("Before you can change your copy options, ", "you must enter the name of the mailing list.") unless $main::in{"list"}; &main::error("You must select one of the options ", "for copying your postings.") unless $main::in{"copyback"}; "set $main::in{list} $main::in{copyback}"; } #---------------------------------------------------------------------- # set_mail_ack command # $config::command{'set_mail_ack'} = < Send acknowledgements when I post. Do not send acknowledgements. EOT sub process_set_mail_ack { &main::error("Before you can change your acknowledgements, ", "you must enter the name of the mailing list.") unless $main::in{"list"}; &main::error("You must select one of the options ", "for setting acknowledgements") unless $main::in{"ack"}; "set $main::in{list} $main::in{ack}"; } #---------------------------------------------------------------------- # set_password command # $config::command{"set_conceal"} = < Conceal your identity Reveal your identity EOT sub process_set_conceal { &main::error("Before you can conceal/reveal, ", "you must enter a list name.") unless $main::in{'list'}; &main::error("You must select one of the conceal/reveal options.") unless $main::in{"conceal"}; "set $main::in{list} $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"; } #---------------------------------------------------------------------- # info command # sub process_info { &main::error("Before you can get info for a list, ", "you must enter the name of the list.") unless $main::in{"list"}; "info $main::in{list}"; } #---------------------------------------------------------------------- # lists command # sub process_lists { "lists"; } #---------------------------------------------------------------------- # signoff command # sub process_signoff { &main::error("Before you can unsubscribe, ", "you must enter the name of the mailing list.") unless $main::in{"list"}; "signoff $main::in{list}"; } #---------------------------------------------------------------------- # stats command # sub process_stats { &main::error("Before you can get stats for a mailing list, ", "you must enter the name of the list.") unless $main::in{"list"}; "stats $main::in{list}"; } #---------------------------------------------------------------------- # info_topics command # sub process_info_topics { "info"; } #---------------------------------------------------------------------- # query command # sub process_query { &main::error("Before you can query a mailing list, ", "you must enter the name of the list.") unless $main::in{"list"}; "query $main::in{list}"; } 1;