/**************************************************************/
/*                      *CLOSE OF PLAY*                       */
/*------------------------------------------------------------*/
/*               $VER: COP.spot 1.1  (27-7-94)                */
/*                  Brett Lappan (Fu Lee)                     */
/* Spot #480 @ FidoNet 3:640/944.1 & brett@fulink.edex.edu.au */
/* ---------------------------------------------------------- */
/* This script is ment to be run after you have finished all  */
/* your mail and want all un-read messages cleared in ALL     */
/* areas, all replies exported and basiclly everything is     */
/* cleaned up and compressed! U can also leave Spot iconified */
/* at the end so if you run a cron to get your mail the Spot  */
/* port is left open to alow unpacking of your mail.          */
/* --------------- But what does it do? --------------------- */
/*  Unmarks All unread messages in ALL areas!                */
/*  Exports all mail!                                        */
/*  Maintenance      (Remember this deletes things guy's!!!) */
/*  Optimize         (Squishes all em' messages!)            */
/*  Saves settings   (Incase you forget to save it yourself) */
/*  Quits/Iconifies. (leaving the port open, u must set this)*/
/*  More to come.... (Please send any suggestions)           */
/*------------------------------------------------------------*/
/* USE THIS SCRIPT AT YOUR OWN RISE, REMEMBER IT DELETES MSG'S*/
/**************************************************************/

address spot
options results

  'requestresponse TITLE " Close of Play " PROMPT 'Continue?''

if rc = 5 then
 	exit

	'unreadarea'

do until rc = 2
   'messagelist'
   'excludeflag ALL'
   'includeflag UNREAD'
   'clearflags UNREAD'
   'excludeflag ALL'
   'unreadarea'
 end

   'arealist'
   'export CLOSEWIN'
   'maintenance NOREQ CLOSEWIN' /* Note: Deletes msg's            */
   'optimize NOREQ CLOSEWIN'
   'savesettings NOREQ'	        /* Saves config if you forgot!    */
   'iconify NOREQ'              /* iconifies [or quits] of course!*/

/******************************************************************/
/* replace 'iconify NOREQ' with 'quitspot NOREQ' to quit spot     */
/* -------------------------------------------------------------- */
/* To come, a requester asking if u would like maint. or optimize */
/* skipped at the begining instead of just asking to continue...  */
/*                                              Regards Brett     */
/******************************************************************/
exit
