home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 2 / goldfish_vol2_cd1.bin / files / comm / bbs / bbbbs / bbbbs72.lha / rexx / bbsMail.rexx < prev    next >
OS/2 REXX Batch file  |  1994-04-09  |  31KB  |  1,154 lines

  1. /* $VER: bbsMail.rexx 7.2 (9.4.94) Copyright © 1994 Richard Lee Stockton
  2.  * BBBBS mail reader/sender with optional file attach
  3.  * FREELY DISTRIBUTABLE
  4.  * Thanks to Matt English for "SendFile.rexx"
  5.  * Thanks to John Ruckart for additional "detail work".
  6. */
  7.  
  8. IF ~SHOW('P','QuickSortPort') THEN CALL setup.rexx()
  9. IF ~SHOW('P','QuickSortPort') THEN EXIT 666
  10.  
  11. title.=''
  12. title.1='bbsMail for BBBBS'
  13. title.2='Version 7.2'
  14. title.3='30-Mar-94'
  15.  
  16. def=''
  17. pen1=''
  18. pen2=''
  19. pen3=''
  20. lineup='1B'x'M'
  21. changed=0
  22. linesperpage=20
  23. namemask=COMPRESS(XRANGE(),XRANGE('A','Z')' _-')
  24.  
  25. topath='RAM:'
  26. figarg='s:CONFIG.BBS'
  27. IF ~EXISTS(figarg) THEN figarg='BBS:BBS_TEXT/CONFIG.BBS'
  28. x=OPEN(f,figarg,'R')
  29. IF x=0 THEN
  30.   DO
  31.     SAY 's:CONFIG.BBS and BBS:BBS/CONFIG.BBS are both missing!'
  32.     EXIT
  33.   END
  34. lynes.=''
  35. DO i=1 TO 40
  36.   lynes.i=READLN(f)
  37. END
  38. CALL CLOSE(f)
  39.  
  40. compos=POS('/*',lynes.1)
  41. IF compos>0 THEN lynes.1=LEFT(lynes.1,compos-1)
  42. bbsname=STRIP(lynes.1)
  43. sysop=WORD(lynes.2,1)
  44. compos=POS('/*',lynes.3)
  45. IF compos>0 THEN lynes.3=LEFT(lynes.3,compos-1)
  46. bbsdevice=word(lynes.4,1)
  47. sysoplevel=WORD(lynes.5,1)
  48. bbspath=WORD(lynes.6,1)
  49. IF ~EXISTS(bbspath) THEN
  50.   DO
  51.     SAY bbspath 'does not exist!'
  52.     EXIT
  53.   END
  54. testchar=RIGHT(bbspath,1)
  55. IF testchar~='/' & testchar~=':' THEN bbspath=bbspath'/'
  56. msgpath=WORD(lynes.7,1)
  57. IF ~EXISTS(msgpath) THEN
  58.   DO
  59.     SAY msgpath 'does not exist!'
  60.     EXIT
  61.   END
  62. testchar=RIGHT(msgpath,1)
  63. IF testchar~='/' & testchar~=':' THEN msgpath=msgpath'/'
  64. msgpath=msgpath'MSG'
  65. IF WORD(lynes.25,1)=1 THEN scratch=bbspath'Scratch'
  66. ELSE scratch='RAM:Scratch'
  67. CALL MAKEDIR(scratch)
  68.  
  69. OPTIONS PROMPT ' Are you 'sysop'? (Yn) > '
  70. PULL answer
  71. IF answer='N' THEN
  72.   DO
  73.     SAY
  74.     OPTIONS PROMPT ' Please enter your name > '
  75.     PULL name
  76.     name=cleanstring(name)
  77.     IF name='' THEN EXIT 
  78.     IF ~EXISTS(bbspath'Users/'name) THEN
  79.       DO
  80.         SAY name 'does not exist!'
  81.         EXIT
  82.       END
  83.   END
  84. ELSE name=sysop
  85. userfile=bbspath'Users/'name
  86. CALL OPEN(f,userfile,'R')
  87. data.=''
  88. DO i=1
  89.   line=READLN(f)
  90.   IF EOF(f) THEN LEAVE i
  91.   data.i=line
  92. END
  93. CALL CLOSE(f)
  94. data.0=i-1
  95. city=docity(data.3)
  96. password=data.5
  97. level=data.20
  98.  
  99. passprompt=pen3' Please Enter Password: '
  100. DO tries=1 TO 3
  101.   OPTIONS PROMPT passprompt
  102.   PULL newpassword
  103.   SAY def
  104.   IF(password=newpassword) THEN LEAVE tries; /* correct password */
  105.   IF tries=3 THEN
  106.     DO
  107.       SAY 
  108.       SAY 'Access terminated.'
  109.       SAY '*** Bad password ***' newpassword '***'
  110.       EXIT
  111.     END
  112.   passprompt='Incorrect.  Password: ' /* ask again */
  113. END
  114. Friends.=''
  115. IF readopen(bbspath'Friends/'name) THEN
  116.   DO
  117.     DO i=1
  118.       Friends.i=READLN(f)
  119.       IF EOF(f) THEN LEAVE i
  120.     END
  121.     Friends.0=i-1
  122.     CALL CLOSE(f)
  123.   END
  124. SAY
  125. SAY' OK, 'name' here we go....'
  126. SAY
  127. IF level>sysoplevel THEN
  128.   DO
  129.     CALL showtext(bbspath'Email/'sysop'/NEW_FILES')
  130.     CALL showtext(bbspath'Lists/NEW_USERS')
  131.     CALL showtext(bbspath'Lists/CBV_USERS')
  132.   END
  133. DO FOREVER
  134.   replysubj=''
  135.   thechosen.=''
  136.   SAY
  137.   DO i=1 TO 3
  138.     SAY CENTER(title.i,74)
  139.   END
  140.   SAY
  141.   CALL readmail()
  142.   IF temp='Q' THEN CALL seeya
  143. END
  144.  
  145.  
  146.  
  147. /* SUBROUTINES */
  148.  
  149.  
  150. readmail:
  151. line='Find Email ['pen3'T'def']o You or ['pen3'W'def']rite New Email (Twq) > 'def
  152. temp=getinput(1 1 line)
  153. IF temp='W' THEN
  154.   DO
  155.     CALL editor()
  156.     RETURN
  157.   END
  158. ELSE IF temp='Q' THEN CALL seeya
  159. SAY 'Checking your mailbox..'
  160. nomail=1
  161. CALL MAKEDIR(bbspath'EMail/'name)
  162. mailist=sortnumbers(SHOWDIR(bbspath'Email/'name))
  163. IF WORDS(mailist)=0 THEN
  164.   DO
  165.     SAY lineup'Your mailbox is empty.  '
  166.     SAY
  167.     RETURN
  168.   END
  169. line=WORDS(mailist)
  170. IF line>1 THEN line=line 'letters'
  171. ELSE line=line 'letter'
  172. line=line 'waiting.'
  173. SAY line
  174. DO ii=1 TO WORDS(mailist)
  175.   SAY 'Email:' pen3||WORD(mailist,ii)||def
  176. END
  177. onename=''
  178. IF WORDS(mailist)>3 THEN
  179.   DO
  180.     IF getinput(1 1 'Read all private mail? (nY) > ')='N' THEN
  181.       DO
  182.         onename=getinput(1 0 'Read ONLY private mail from? > ')
  183.         onename=SPACE(STRIP(UPPER(onename)),1,'_')
  184.         onename=COMPRESS(onename,'.,:/*#?^ ')
  185.         IF onename='' THEN RETURN
  186.         IF ~EXISTS(bbspath'Users/'onename) & picklist.1~='BBBBS' THEN
  187.           DO
  188.             SAY '***'pen3 onename def'does not exist!'
  189.             RETURN
  190.           END
  191.       END
  192.   END
  193. DO letter=1 TO WORDS(mailist)
  194.   readname=WORD(mailist,letter)
  195.   uname=readname
  196.   caret=LASTPOS('.',uname)
  197.   IF caret>2 THEN uname=LEFT(uname,caret-1)
  198.   IF onename~='' & onename~=uname THEN ITERATE letter
  199.   arg=bbspath'Email/'name'/'readname
  200.   CALL readlines(arg 1)
  201.   delnum=WORD(lynes.1,2)
  202.   CALL seelines(1)
  203.   nomail=0
  204.   nonstop=0
  205.   mailfile=''
  206.   IF UPPER(WORD(lynes.1,3))='FILE:' THEN mailfile=WORD(lynes.1,4)
  207.   ELSE IF UPPER(WORD(lynes.2,3))='FILE:' THEN mailfile=WORD(lynes.2,4)
  208.   IF mailfile~='' & readname~='NEW_FILES' & readname~='FILELISTS_REPORT' & readname~='INACTIVE_USERS' & LEFT(readname,3)~='MSG' THEN
  209.     DO
  210.       IF LEFT(RIGHT(mailfile,4),1)~='.' & LEFT(readname,6)='BBBBS.' THEN
  211.         DO
  212.           SAY
  213.           SAY pen3'The attached file is unarchived and may be incomplete.'
  214.           SAY 'If the archiver is still building this file, downloading will fail.'def
  215.           IF getinput(1 1 'Do you want to try to download it anyway? (Ny) > ')~='Y' THEN ITERATE letter
  216.           SAY
  217.         END
  218.       curdir=PRAGMA('D')
  219.       CALL setdir(bbspath'EmailFiles/'name)
  220.       ADDRESS COMMAND 'C:List >*' mailfile 'DATES'
  221.       SAY ' Attached file:' pen3||mailfile||def
  222.       junk=getinput(1 1 'Leave file in your EmailFiles? (Ny) > ')
  223.       IF junk='Y' THEN mailfile=''
  224.       ELSE
  225.         DO
  226.           junk=getinput(1 1 'Deleting Mail will also delete file. Copy somewhere now? (Ny) > ')
  227.           IF junk='Y' THEN
  228.             DO
  229.               tofile=GetFile(150,36,topath,mailfile,' Select Destination Name ')
  230.               ADDRESS COMMAND 'C:Copy' PRAGMA('D')'/'mailfile tofile
  231.             END
  232.         END
  233.     END
  234.   IF readname~='NEW_FILES' & readname~='FILELISTS_REPORT' & readname~='INACTIVE_USERS' & LEFT(readname,3)~='MSG' & LEFT(readname,6)~='BBBBS.' THEN
  235.     DO
  236.       tempchar='A'
  237.       DO WHILE tempchar='A'
  238.         tempchar=getinput(1 1 '['pen3'A'def']gain  ['pen3'C'def']ontinue  ['pen3'R'def']eply? (acR) > ')
  239.         IF tempchar='' THEN tempchar='R'
  240.         IF tempchar='A' THEN CALL seelines(1)
  241.       END
  242.       IF tempchar='R' THEN
  243.         DO
  244.           IF WORDS(lynes.4)<2 THEN replysubj='?'
  245.           ELSE replysubj=SUBSTR(lynes.4,WORDINDEX(lynes.4,2))
  246.           CALL editor(uname)
  247.           replysubj=''
  248.         END
  249.     END
  250.   IF LEFT(readname,6)~='BBBBS.' THEN
  251.     DO
  252.       tempchar='A'
  253.       DO WHILE tempchar='A'
  254.         tempchar=getinput(1 1 'Forward mail from'pen3 uname def'to other users? (aNy) > ')
  255.         IF tempchar='A' THEN CALL seelines(1)
  256.       END
  257.       IF tempchar='Y' THEN
  258.         DO
  259.           IF selectchosen(1 pen3'Forward Email To: 'def)=0 THEN
  260.             DO ei=1 TO thechosen.0 WHILE thechosen.ei~=''
  261.               CALL MAKEDIR(bbspath'EMail/'thechosen.ei)
  262.               forwardarg=bbspath'Email/'thechosen.ei'/'readname
  263.               ADDRESS COMMAND 'C:COPY' bbspath'Email/'name'/'readname forwardarg
  264.               CALL readlines(forwardarg 1)
  265.               lynes.1=lynes.1'  Forwarded to you by' name TIME('C') DATE()
  266.               CALL DELETE(forwardarg)
  267.               CALL savelines(forwardarg)
  268.               IF WORDS(lynes.2)>3 THEN
  269.                 DO
  270.                   forname=bbspath'EmailFiles/'name'/'WORD(lynes.2,4)
  271.                   IF EXISTS(forname) THEN
  272.                     DO
  273.                       CALL MAKEDIR(bbspath'EmailFiles/'thechosen.ei)
  274.                       ADDRESS COMMAND 'C:COPY' forname bbspath'EmailFiles/'thechosen.ei
  275.                     END
  276.                 END
  277.               line='Mail' pen3||readname||def 'forwarded to' pen3||thechosen.ei||def
  278.               IF emailonline>=0 THEN emailonline=emailonline+1
  279.               SAY line
  280.             END
  281.         END
  282.     END
  283.   tempchar=''
  284.   tempstr='Delete the mail ('pen3||delnum||def') from'pen3 uname def'that you just read?'
  285.   IF mailfile='' THEN tempchar=getinput(1 1 tempstr '(nqY) > ')
  286.   ELSE
  287.     DO WHILE tempchar~='N' & tempchar~='Q' & tempchar~='Y'
  288.       tempchar=getinput(1 1 tempstr '(nqy) > ')
  289.     END
  290.   IF tempchar='Q' THEN
  291.     DO
  292.       IF getinput(1 1 'Quit reading your Email? (Ny) > ')='Y' THEN
  293.         DO
  294.           readname=''
  295.           uname=''
  296.           RETURN
  297.         END
  298.     END
  299.   ELSE IF tempchar~='N' THEN
  300.     DO
  301.       dirname=bbspath'Email/'name'/'
  302.       nodelete=0
  303.       IF name~=sysop & uname~=sysop & WORD(lynes.2,2)~='BBBBS' & WORD(lynes.2,2)~=sysop & WORD(lynes.3,2)~=sysop THEN
  304.         nodelete=1
  305.       IF nodelete THEN
  306.         ADDRESS COMMAND 'C:Copy' dirname||readname bbspath'Email/'sysop
  307.       CALL DELETE(dirname||readname)
  308.       tempstr='Old email'
  309.       IF mailfile~='' & readname~='NEW_FILES' & readname~='FILELISTS_REPORT' & readname~='INACTIVE_USERS' & EXISTS(bbspath'EmailFiles/'name'/'mailfile) THEN
  310.         DO
  311.           IF nodelete THEN
  312.             ADDRESS COMMAND 'C:Copy' bbspath'EmailFiles/'name'/'mailfile bbspath'EmailFiles/'sysop
  313.           CALL DELETE(bbspath'EmailFiles/'name'/'mailfile)
  314.           CALL DELETE(bbspath'EmailFiles/'name'/'mailfile'.xdl')
  315.           tempstr=tempstr 'and attached file'
  316.         END
  317.       tempstr=tempstr 'deleted. Thank you for keeping a clean BBS!'
  318.       SAY tempstr
  319.       IF tempchar='Q' THEN
  320.         IF getinput(1 1 'Quit reading your Email? (Ny) > ')='Y' THEN
  321.           DO
  322.             readname=''
  323.             uname=''
  324.             RETURN
  325.           END
  326.     END
  327.   ELSE IF LEFT(readname,3)='MSG' & level>sysoplevel THEN
  328.     DO
  329.       ii=LEFT(readname,POS('.',readname)-1)
  330.       ii=SUBSTR(ii,4)%1
  331.       IF getinput(1 1 'Move this message back to the' msg.ii 'conference? (nY) > 'def)~='N' THEN
  332.         DO
  333.           temp=TRANSLATE(readname,'/','.')
  334.           temp=SUBSTR(temp,4)
  335.           lynes.1='!!'STRIP(lynes.1)
  336.           CALL savelines(msgpath||temp)
  337.           CALL DELETE(bbspath'Email/'name'/'readname)
  338.         END
  339.     END
  340.   ELSE IF LEFT(readname,3)~='MSG' & readname~='NEW_FILES' & readname~='FILELISTS_REPORT' & readname~='INACTIVE_USERS' THEN
  341.     DO
  342.       arg=bbspath'Email/'name'/'readname
  343.       CALL readlines(arg 1)
  344.       IF WORDS(lynes.5)<7 THEN
  345.         DO
  346.           lynes.5=lynes.5'  (Rcvd)' DATE('W') DATE() TIME('C')
  347.           CALL DELETE(arg)
  348.           CALL savelines(arg)
  349.           SAY 'Email has been marked as received.'
  350.         END
  351.     END
  352.   readname=''
  353.   uname=''
  354.   arg=''
  355. END
  356. IF nomail THEN SAY 'No mail was found.'
  357. thechosen.=''
  358. RETURN
  359.  
  360.  
  361. sortnumbers: PROCEDURE
  362. PARSE ARG slist
  363. IF STRIP(slist)='' THEN RETURN ''
  364. sorted.=''
  365. oldest=999999
  366. newest=0
  367. newlist=''
  368. DO si=1 TO WORDS(slist)
  369.   testword=WORD(slist,si)
  370.   IF ~DATATYPE(testword,'W') THEN
  371.     DO
  372.       testpos=LASTPOS('.',testword)
  373.       IF testpos>0 THEN tempnum=SUBSTR(testword,testpos+1)
  374.       ELSE
  375.         DO
  376.           newlist=testword newlist
  377.           ITERATE si
  378.         END
  379.     END
  380.   ELSE tempnum=testword/1
  381.   IF sorted.tempnum='' THEN
  382.     DO
  383.       sorted.tempnum=testword
  384.       sorted.tempnum.0=1
  385.       IF DATATYPE(tempnum,'W') THEN
  386.         DO
  387.           IF tempnum>newest THEN newest=tempnum
  388.           IF tempnum<oldest THEN oldest=tempnum
  389.         END
  390.     END
  391.   ELSE newlist=newlist testword
  392. END
  393. IF oldest~=999999 & newest~=0 THEN
  394.   DO si=oldest TO newest
  395.     IF sorted.si.0=1 THEN newlist=newlist sorted.si
  396.   END
  397. DROP sorted. oldest newest
  398. RETURN STRIP(newlist)
  399.  
  400.  
  401. editor:
  402. ARG toname .
  403. msgnum=0
  404. thechosen.=''
  405. lastwrit=countcheck(bbspath'Numbers/LastMail 0')
  406. IF toname~='' THEN
  407.   DO
  408.     toname=check_alias(toname)
  409.     thechosen.1=toname
  410.     thechosen.0=1
  411.   END
  412. ELSE IF selectchosen(1 pen3'Send PRIVATE EMail number' lastwrit+1 'To:'def)=1 THEN
  413.   DO
  414.     IF ~changed THEN RETURN
  415.     x=OPEN(f,bbspath'Users/'name,'W')
  416.     IF x=0 THEN
  417.       DO
  418.         SAY 'Unable to open' bbspath'Users/'name'!'
  419.         RETURN
  420.       END
  421.     SAY 'Updating your user data...'
  422.     IF data.0<27 THEN data.0=27
  423.     DO i=1 TO data.0
  424.       CALL WRITELN(f,data.i)
  425.     END
  426.     CALL CLOSE(f)
  427.     EXIT
  428.   END
  429. toname=thechosen.1
  430. toname=cleanstring(toname)
  431. IF toname='' THEN EXIT
  432. CALL MAKEDIR(bbspath'EMail/'toname)
  433. mailname=bbspath'EMail/'toname'/'name'.'lastwrit+1
  434. lynes.=''
  435. lynes.0=6
  436. lynes.1=' Mail:' lastwrit+1
  437. lynes.2=' From:' name
  438. IF city~='' THEN lynes.2=lynes.2' - 'city
  439. lynes.3='   To:' toname
  440. IF readopen(bbspath||'Users/'toname) THEN
  441.   DO
  442.     CALL READLN(f)
  443.     CALL READLN(f)
  444.     temp=READLN(f)
  445.     CALL CLOSE(f)
  446.     temp=docity(temp)
  447.     IF temp~='' THEN lynes.3=lynes.3' - 'temp
  448.   END
  449. IF replysubj='' THEN
  450.   DO
  451.     subj=''
  452.     SAY pen3'Enter the'def 'Subject' pen3'of this message (1 line).'def
  453.     subj=getinput(0 0 pen3': 'def)
  454.   END
  455. ELSE subj=replysubj
  456. IF LENGTH(subj)>66 THEN subj=LEFT(subj,66)
  457. IF subj='' THEN subj='?'
  458. lynes.4=' Subj:' subj
  459. lynes.5=' Date:' DATE('W') DATE()'  'TIME('C')
  460. lynes.6=LEFT('',74,'=')
  461. DO i=1 TO lynes.0
  462.   SAY lynes.i
  463. END
  464. CALL writebuffer(scratch'/MessageLOCAL')
  465. IF savelines(mailname) THEN RETURN 0
  466. CALL seelines()
  467. IF thechosen.0='' THEN
  468.   DO
  469.     thechosen.0=1
  470.     thechosen.1=toname
  471.   END
  472. carbons=thechosen.0+1
  473. DO FOREVER
  474.   IF thechosen.0>1 THEN
  475.     DO
  476.       SAY 'Copies To:'
  477.       junk=''
  478.       DO i=2 TO thechosen.0
  479.         junk=junk thechosen.i
  480.       END
  481.       SAY junk
  482.     END
  483.   pline='['pen3'C'def']opies'
  484.   pline=STRIP(pline '['pen3'E'def']dit ['pen3'K'def']ill ['pen3'R'def']ead')
  485.   pline=pline '['pen3'U'def']pload-Text ['pen3'S'def']end EMail? (ekrSu) 'def
  486.   junk=getinput(1 1 pline)
  487.   IF junk='E' THEN
  488.     DO
  489.       IF level>sysoplevel THEN firstedit=1
  490.       ELSE firstedit=7
  491.       IF bbsED(firstedit mailname)=2 THEN RETURN 0
  492.       junk='R'
  493.     END
  494.   ELSE IF junk='C' THEN
  495.     DO
  496.       CALL selectchosen(carbons pen3'Carbon Copies To: 'def)
  497.       junk='R'
  498.     END
  499.   ELSE IF junk='K' THEN
  500.     DO
  501.       IF DELETE(mailname)=1 THEN
  502.         DO
  503.           SAY 'EMail DELETED.'
  504.           IF WORD(lynes.1,4)~='' THEN
  505.             IF DELETE(bbspath'EMailFiles/'toname'/'WORD(lynes.1,4))=1 THEN
  506.               SAY 'Attached file deleted.'
  507.         END
  508.       RETURN 0
  509.     END
  510.   ELSE IF junk='U' THEN
  511.     DO
  512.       SAY 'Ready to append' pen3'TEXT ONLY'def
  513.       pline='Are you SURE your file is un-compressed text? (Ny) > '
  514.       IF getinput(1 1 pline)='Y' THEN
  515.         DO
  516.           frompath=GETCLIP('BBS_frompath')
  517.           IF frompath='' THEN frompath='RAM:'
  518.           farg=GetFile(150,36,frompath,'',' Select TextFile to Append ')
  519.           IF farg~='' & EXISTS(farg) THEN
  520.             DO
  521.               CALL readlines(farg lynes.0+1)
  522.               CALL SETCLIP('BBS_frompath',WORD(lastslash(farg),2))
  523.               CALL savelines(mailname)
  524.             END
  525.         END
  526.       junk='R'
  527.     END
  528.   IF junk='R' THEN
  529.     DO
  530.       CALL readlines(mailname 1)
  531.       CALL seelines()
  532.       nonstop=0
  533.     END
  534.   ELSE BREAK
  535. END
  536. IF replysubj~='' & readname~='' & LEFT(readname,5)~='BBBBS' & uname~='' & uname~='UNAME' THEN
  537.   DO
  538.     junk=getinput(1 1 'Attach original mail from' uname'? (nY) > ')
  539.     IF junk~='N' THEN
  540.       DO
  541.         arg=bbspath'Email/'name'/'readname
  542.         n=lynes.0+1
  543.         IF ~readlines(arg n) THEN
  544.           DO
  545.             lynes.n=LEFT('',75,'^')
  546.             CALL savelines(mailname)
  547.           END
  548.       END
  549.   END
  550. junk=getinput(1 1 pen3'Attach a file to this message? (Ny) > 'def)
  551. IF junk='Y' THEN
  552.   DO subloop1=1 TO 1
  553.     CALL MAKEDIR(bbspath'EmailFiles/'toname)
  554.     CALL setdir(bbspath'EmailFiles/'toname)
  555.     frompath=GETCLIP('BBS_frompath')
  556.     IF frompath='' THEN frompath='RAM:'
  557.     fdir=''
  558.     DO subloop2=1
  559.       fromfile=GetFile(150,36,frompath,'',' Select File to Upload ')
  560.       IF fromfile='' THEN LEAVE subloop1
  561.       IF EXISTS(fromfile) THEN LEAVE subloop2
  562.       SAY
  563.       SAY fromfile 'does not exist!'
  564.     END
  565.     x=LASTPOS('/',fromfile)
  566.     IF x=0 THEN x=POS(':',fromfile)
  567.     IF x>0 THEN
  568.       DO
  569.         arg=SUBSTR(fromfile,x+1)
  570.         fdir=LEFT(fromfile,x)
  571.         IF RIGHT(fdir,1)='/' THEN fdir=LEFT(fdir,x-1)
  572.         CALL SETCLIP('BBS_frompath',fdir)
  573.       END
  574.     ELSE arg=fromfile
  575.     ADDRESS COMMAND  'C:COPY' fromfile bbspath'EMailFiles/'toname'/'arg
  576.     IF RC=0 THEN
  577.       DO
  578.         IF WORD(STATEF(bbspath'EmailFiles/'toname'/'arg),2)>1 THEN
  579.           DO
  580.             CALL readlines(mailname 1)
  581.             IF arg~='' THEN lynes.1=lynes.1'  FILE: 'arg
  582.             CALL setdir(curdir)
  583.             CALL DELETE(mailname)
  584.             CALL savelines(mailname)
  585.           END
  586.       END
  587.     ELSE
  588.       DO
  589.         CALL DELETE(bbspath'EmailFiles/'toname'/'arg)
  590.         SAY pen3'*** Upload failed! ***'def
  591.       END
  592.   END
  593. totmail=WORD(data.17,2)
  594. IF ~DATATYPE(totmail,'W') THEN totmail=thechosen.0
  595. ELSE totmail=totmail+thechosen.0
  596. data.17=WORD(data.17,1)'  'totmail'  'WORD(data.17,3)
  597. changed=1
  598. CALL readlines(mailname 1)
  599. DO ui=1 TO thechosen.0
  600.   IF thechosen.ui='' THEN ITERATE ui
  601.   IF ui>1 THEN
  602.     DO
  603.       CALL MAKEDIR(bbspath'Email/'thechosen.ui)
  604.       newname=bbspath'Email/'thechosen.ui'/'name'.'lastwrit+1
  605.       IF ui<carbons THEN lynes.3='   To:' thechosen.ui
  606.       ELSE
  607.         DO
  608.           lynes.1=lynes.1'  (Carbon Copy)'
  609.           lynes.3='   To:' thechosen.1
  610.         END
  611.       CALL savelines(newname)
  612.       IF WORDS(lynes.1)>3 & EXISTS(bbspath'EmailFiles/'thechosen.1'/'WORD(lynes.1,4)) THEN
  613.         DO
  614.           CALL MAKEDIR(bbspath'EmailFiles/'thechosen.ui)
  615.           ADDRESS COMMAND 'C:COPY' bbspath'EmailFiles/'thechosen.1'/'WORD(lynes.1,4) bbspath'EmailFiles/'thechosen.ui
  616.           line2='Copied' WORD(lynes.1,4)
  617.           SAY line2 'to the' thechosen.ui 'file area.'
  618.         END
  619.     END
  620.   IF GETCLIP('BBS_level')~='' & WORD(GETCLIP('BBS_lastcaller'),1)=thechosen.ui THEN
  621.     DO
  622.       oldmess=GETCLIP('BBS_MESSAGE')
  623.       IF oldmess~='' THEN oldmess=oldmess||'0D0A'x
  624.       CALL SETCLIP('BBS_MESSAGE',oldmess||'You have new Email')
  625.     END
  626.   SAY 'Mail Sent To' thechosen.ui
  627. END
  628. CALL countcheck(bbspath'Numbers/LastMail' lastwrit+1)
  629. thechosen.=''
  630. RETURN 1
  631.  
  632.  
  633. bbsED:
  634. PARSE ARG firstedit editarg .
  635. notchanged=1
  636. IF readlines(editarg 1) THEN RETURN 1
  637. finfo=STATEF(editarg)
  638. IF WORDS(finfo)>7 THEN finfo=SUBSTR(finfo,WORDINDEX(finfo,8))
  639. ELSE finfo=''
  640. SAY 
  641. SAY '                   'pen3'Entering the EDITOR module..'def
  642. SAY 
  643. count=1
  644. DO edloop=1
  645.   IF edcom='S' & SHOW('P','SPELL') THEN  /* spell check */
  646.     DO
  647.       SAY pen3'You must use ['def'R'pen3']eplace to make corrections.  'pen2'Spellchecking...'def
  648.       CALL DELETE(scratch'/SpellLOCAL')
  649.       CALL savelines(scratch'/SpellLOCAL')
  650.       curdir=PRAGMA('D')
  651.       CALL setdir(spellpath)
  652.       CALL SpellChk.rexx(scratch'/SpellLOCAL')
  653.       CALL setdir(curdir)
  654.     END
  655.   ELSE
  656.     DO
  657.       IF edcom='R' | edcom='I' | edcom='L' THEN CALL wrapbuf(7)
  658.       IF edcom~='L' THEN count=count-linesperpage
  659.       IF count>=lynes.0 | count<1 THEN count=1
  660.       startcount=count
  661.       DO i=startcount TO lynes.0+1
  662.         IF ((i+1-startcount)//linesperpage)=0 THEN
  663.           DO
  664.             pline='                 ['pen3'E'def']dit'
  665.             pline=pline '  ['pen3'RETURN'def']=Continue '
  666.             edcom=getinput(1 1 pline)
  667.             IF edcom~='' THEN LEAVE i
  668.           END
  669.         SAY pen3||RIGHT(i,2)||def lynes.i
  670.         count=count+1
  671.       END
  672.     END
  673.   SAY lineup'     ['pen3'A'def']ppend ['pen3'C'def']ut     ['pen3'I'def']nsert  ['pen3'K'def']ill       ['pen3'?'def'] Help'
  674.   pline='     ['pen3'L'def']ist   ['pen3'P'def']aste   ['pen3'R'def']eplace'
  675.   IF SHOW('P','SPELL') THEN pline=pline '['pen3'S'def']pellcheck'
  676.   pline=pline '['pen3'U'def']pload-Text > '
  677.   edcom=getinput(1 0 pline)
  678.   IF edcom='Q' | edcom='X' THEN edcom=''
  679.   IF edcom='?' THEN
  680.     DO
  681.       SAY
  682.       SAY '                   Editor Help'
  683.       SAY '----------------------------------------------------------'
  684.       SAY '    an empty RETURN tells the editor you are done editing.'
  685.       SAY ' 7  edits line number 7, if it exists.'
  686.       SAY ' a  Append text to this file.'
  687.       SAY ' c  Cut selected line(s) of text to buffer.'
  688.       SAY ' i  Insert blank line.'
  689.       SAY ' k  Kill (delete) this file.'
  690.       SAY ' l  List this file from selected line.'
  691.       SAY ' p  Paste buffer contents to selected line number.'
  692.       SAY ' r  Replace a phrase or line of text.'
  693.       SAY ' s  Spellcheck this file.'
  694.       SAY ' u  Upload a textfile to append to this file.'
  695.       SAY '----------------------------------------------------------'
  696.       SAY
  697.       OPTIONS PROMPT ''
  698.       PULL
  699.     END
  700.   IF edcom='K' THEN
  701.     DO
  702.       junk=getinput(1 1 'Are you' pen3'sure'def 'you want to delete' editarg'? (Ny) > ')
  703.       IF junk='Y' THEN
  704.         DO
  705.           IF DELETE(editarg)=1 THEN SAY editarg 'DELETED.'
  706.           IF WORD(lynes.1,1)='Mail:' & WORDS(lynes.2)>3 THEN
  707.             DO
  708.               IF DELETE(bbspath'EmailFiles/'WORD(lynes.3,2)'/'WORD(lynes.2,4))=1 THEN
  709.                 SAY WORD(lynes.2,4) 'DELETED.'
  710.             END
  711.           RETURN 2
  712.         END
  713.     END
  714.   IF edcom='' THEN
  715.     DO
  716.       SAY '                   'pen3'Leaving the EDITOR module.'def
  717.       IF notchanged THEN RETURN 0
  718.       IF getinput(1 1 '                     Save changes? (nY)'pen3' > 'def)='N' THEN
  719.         RETURN 1
  720.       CALL DELETE(editarg)
  721.       IF savelines(editarg) THEN RETURN 1
  722.       CALL DELAY(28)
  723.       IF finfo~='' THEN ADDRESS COMMAND 'C:filenote' editarg finfo
  724.       SAY pen3'                        Changes saved.'def
  725.       RETURN 0
  726.     END
  727.   ELSE IF edcom='C' THEN  /* Cut */
  728.     DO
  729.       firstnum=getinput(1 0 '   Enter line number or range 'pen3'(5-7)'def' to cut' pen3'>'def)
  730.       IF firstnum='' THEN ITERATE edloop
  731.       dash=POS('-',firstnum)
  732.       IF dash>0 THEN
  733.         DO
  734.           lastnum=STRIP(SUBSTR(firstnum,dash+1))
  735.           firstnum=STRIP(LEFT(firstnum,dash-1))
  736.         END
  737.       ELSE lastnum=firstnum
  738.       IF ~DATATYPE(firstnum,'W') | ~DATATYPE(lastnum,'W') THEN
  739.         DO
  740.           junk=getinput(1 1 pen3'*** You must enter numbers here! 'def)
  741.           ITERATE edloop
  742.         END
  743.       IF lastnum>lynes.0 THEN lastnum=lynes.0
  744.       IF firstnum<firstedit THEN
  745.         DO
  746.           SAY '*** You are not authorized to delete that line!'
  747.           SAY
  748.           ITERATE edloop
  749.         END
  750.       IF firstnum>lastnum THEN
  751.         DO
  752.           SAY '*** Input error!  First number larger than last number'
  753.           ITERATE edloop
  754.         END
  755.       notchanged=0
  756.       numdiff=lastnum+1-firstnum
  757.       pasted.=''
  758.       pasted.0=numdiff
  759.       k=0
  760.       DO i=firstnum TO lynes.0
  761.         j=i+numdiff
  762.         k=k+1
  763.         IF k<=numdiff THEN pasted.k=lynes.i
  764.         lynes.i=lynes.j
  765.         lynes.j=''
  766.       END
  767.       lynes.0=lynes.0-numdiff
  768.       count=1
  769.     END
  770.   ELSE IF edcom='A' THEN  /* append */
  771.     DO
  772.       CALL writebuffer(scratch'/EditorLOCAL')
  773.       notchanged=0
  774.     END
  775.   ELSE IF edcom='U' THEN  /* fileappend (upload) */
  776.     DO
  777.       frompath=GETCLIP('BBS_frompath')
  778.       IF frompath='' THEN frompath='RAM:'
  779.       farg=GetFile(150,36,frompath,'',' Select TextFile to Append ')
  780.       IF farg~='' & EXISTS(farg) THEN
  781.         DO
  782.           CALL readlines(farg lynes.0+1)
  783.           notchanged=0
  784.           CALL SETCLIP('BBS_frompath',WORD(lastslash(farg),2))
  785.         END
  786.     END
  787.   ELSE IF edcom='I' | edcom='R' | edcom='L' | edcom='P' | DATATYPE(edcom,'W') THEN
  788.     DO
  789.       IF DATATYPE(edcom,'W') THEN
  790.         DO
  791.           ednum=edcom
  792.           edcom='R'
  793.         END
  794.       ELSE
  795.         DO
  796.           line=pen3'   '
  797.           IF edcom='L' | edcom='P' THEN line=line'Starting '
  798.           line=line'Line Number? > 'def
  799.           ednum=getinput(1 0 line)
  800.         END
  801.       IF ~DATATYPE(ednum,'W') THEN ITERATE edloop
  802.       IF ednum>(lynes.0+1) THEN ITERATE edloop
  803.       IF edcom='L' THEN
  804.         DO
  805.           count=ednum
  806.           ITERATE edloop
  807.         END
  808.       IF ednum<firstedit THEN
  809.         DO
  810.           SAY '*** You are not authorized to alter that line!'
  811.           SAY
  812.           ITERATE edloop
  813.         END
  814.       IF edcom='R' THEN   /* replace */
  815.         DO
  816.           SAY '   Now reads:'
  817.           SAY pen3||RIGHT(ednum,2)||def lynes.ednum
  818.           OPTIONS PROMPT pen3'........Search text? >'def
  819.           PARSE PULL stext
  820.           IF LENGTH(stext)=0 THEN
  821.             DO
  822.               IF getinput(1 1 lineup||pen3'Replace entire line? (nY) >'def)='N' THEN
  823.                 ITERATE edloop
  824.               lynes.ednum=getinput(0 0 pen3||RIGHT(ednum,2)' 'def)
  825.               notchanged=0
  826.               ITERATE edloop
  827.             END
  828.           found=POS(UPPER(stext),UPPER(lynes.ednum))
  829.           IF found=0 THEN
  830.             DO
  831.               SAY
  832.               SAY stext' was not found!'
  833.               SAY
  834.               ITERATE edloop
  835.             END
  836.           OPTIONS PROMPT pen3'...Replacement text? >'def
  837.           PARSE PULL rtext
  838.           lynes.ednum=DELSTR(lynes.ednum,found,LENGTH(stext))
  839.           lynes.ednum=INSERT(rtext,lynes.ednum,found-1)
  840.           SAY 'Done.'
  841.           SAY 
  842.           notchanged=0
  843.         END
  844.       ELSE IF edcom='I' THEN  /* insert */
  845.         DO
  846.           DO i=lynes.0 TO ednum BY -1
  847.             j=i+1
  848.             lynes.j=lynes.i
  849.           END
  850.           lynes.ednum=''
  851.           notchanged=0
  852.           lynes.0=lynes.0+1
  853.           lynes.ednum=getinput(0 0 pen3||RIGHT(ednum,2)'>'def)
  854.         END
  855.       ELSE IF edcom='P' THEN   /* paste */
  856.         DO
  857.           DO i=lynes.0 TO ednum BY -1
  858.             j=i+pasted.0
  859.             lynes.j=lynes.i
  860.           END
  861.           DO k=1 TO pasted.0
  862.             kk=ednum+k-1
  863.             lynes.kk=pasted.k
  864.           END
  865.           notchanged=0
  866.           lynes.0=lynes.0+pasted.0
  867.         END
  868.     END
  869. END
  870. RETURN 0
  871.  
  872.  
  873. lastslash: PROCEDURE
  874. PARSE ARG sarg 
  875. sdir=''
  876. slash=LASTPOS('/',sarg)
  877. IF slash>2 THEN sdir=LEFT(sarg,slash-1)
  878. ELSE
  879.   DO
  880.     slash=LASTPOS(':',sarg)
  881.     IF slash>0 THEN sdir=LEFT(sarg,slash)
  882.   END
  883. IF slash>0 THEN sarg=SUBSTR(sarg,slash+1)
  884. RETURN sarg sdir
  885.  
  886.  
  887. countcheck:
  888. PARSE ARG fname' 'cknum' '.
  889. IF ~EXISTS(fname) THEN
  890.   DO
  891.     IF cknum=0 THEN RETURN 0
  892.     IF ~writeopen(fname) THEN RETURN 0
  893.     CALL WRITELN(f,cknum)
  894.     CALL CLOSE(f)
  895.     RETURN cknum
  896.   END
  897. IF ~readopen(fname) THEN RETURN cknum
  898. retval=STRIP(READLN(f))
  899. CALL CLOSE(f)
  900. IF ~DATATYPE(retval,'W') THEN retval=0
  901. IF ~DATATYPE(cknum,'W') THEN cknum=0
  902. IF retval<cknum THEN
  903.   DO
  904.     IF writeopen(fname) THEN
  905.       DO
  906.         CALL WRITELN(f,cknum)
  907.         CALL CLOSE(f)
  908.         RETURN cknum
  909.       END
  910.   END
  911. RETURN retval
  912.  
  913.  
  914. readopen:
  915. PARSE ARG fname
  916. ok=OPEN(f,fname,'R')
  917. IF ok~=0 THEN RETURN 1
  918. line=fname 'failed to open for reading!'
  919. SAY line
  920. RETURN 0
  921.  
  922.  
  923. writeopen:
  924. PARSE ARG fname
  925. CALL CLOSE(f)
  926. ok=OPEN(f,fname,'W')
  927. IF ok~=0 THEN RETURN 1
  928. line=fname 'failed to open for writing!'
  929. SAY line
  930. RETURN 0
  931.  
  932.  
  933. writebuffer:
  934. PARSE ARG bufname .
  935. CALL DELETE(bufname)
  936. startnum=lynes.0+1
  937. OPTIONS PROMPT ''
  938. SAY pen3'LOCAL logon! Input cannot exceed 250 characters per line!'def
  939. SAY 'Type 'pen3'/E'def 'or' pen3'/S'def' on a new line to exit and' pen3'DO YOUR OWN WORDWRAP!'def
  940. DO bufloop=startnum
  941.   PARSE PULL line
  942.   IF LEFT(UPPER(STRIP(line)),2)='/E' | LEFT(UPPER(STRIP(line)),2)='/S' THEN
  943.     LEAVE bufloop
  944.   lynes.bufloop=line
  945. END
  946. lynes.0=bufloop-1
  947. CALL wrapbuf(startnum)
  948. CALL DELETE(bufname)
  949. CALL savelines(bufname)
  950. CALL readlines(bufname 1)
  951. CALL wrapbuf(startnum)
  952. RETURN
  953.  
  954.  
  955. wrapbuf:
  956. ARG startnum .
  957. SAY pen3'Wordwrapping...'def
  958. lynes.startnum=TRANSLATE(lynes.startnum,' ','09'x)
  959. lynes.startnum=COMPRESS(lynes.startnum,'0C'x)  /* no FF */
  960. DO wi=startnum WHILE wi<=lynes.0
  961.   wj=wi+1
  962.   lynes.wj=COMPRESS(lynes.wj,'08'x||'0C'x||'7F'x)
  963.   tabpos=POS('09'x,lynes.wi)
  964.   DO WHILE tabpos>0
  965.     lynes.wi=DELSTR(lynes.wi,tabpos,1)
  966.     lynes.wi=INSERT('  ',lynes.wi,tabpos-1)
  967.     tabpos=POS('09'x,lynes.wi)
  968.   END
  969.   IF LENGTH(lynes.wi)>75 THEN
  970.     DO
  971.       testchar=''
  972.       IF lynes.wj~='' THEN testchar=LEFT(lynes.wj,1)
  973.       IF testchar=' ' | testchar='.' | testchar=':' THEN
  974.         DO
  975.           DO wjj=lynes.0 TO wi+1 BY -1
  976.             wk=wjj+1
  977.             lynes.wk=lynes.wjj
  978.           END
  979.           lynes.wj=''
  980.           lynes.0=lynes.0+1
  981.         END
  982.       DO wl=WORDS(lynes.wi) TO 1 BY -1 WHILE LENGTH(lynes.wi)>74
  983.         IF WORDS(lynes.wi)=1 THEN
  984.           lynes.wi=LEFT(lynes.wi,74) SUBSTR(lynes.wi,75)
  985.         lynes.wj=WORD(lynes.wi,wl) lynes.wj
  986.         lynes.wi=STRIP(DELWORD(lynes.wi,wl,1))
  987.       END
  988.     END
  989. END
  990. RETURN
  991.  
  992.  
  993. seelines:
  994. DO i=1 TO lynes.0
  995.   SAY lynes.i||def
  996.   IF i//linesperpage=0 THEN
  997.     IF waiting2() THEN LEAVE i
  998. END
  999. nonstop=0
  1000. RETURN
  1001.  
  1002.  
  1003. readlines:
  1004. CALL CLOSE(f)
  1005. PARSE ARG tempname readstart .
  1006. IF ~readopen(tempname) THEN RETURN 1
  1007. IF readstart<2 THEN lynes.=''
  1008. DO ri=readstart
  1009.   line=READLN(f)
  1010.   IF EOF(f) THEN BREAK
  1011.   lynes.ri=line
  1012. END
  1013. lynes.0=ri-1
  1014. CALL CLOSE(f)
  1015. DO ri=lynes.0 TO 0 BY -1 WHILE LENGTH(lynes.ri)=0 | LEFT(UPPER(lynes.ri),1)='/'
  1016. END
  1017. lynes.0=ri
  1018. RETURN 0
  1019.  
  1020.  
  1021. savelines:
  1022. PARSE ARG tempname .
  1023. ok=OPEN(f,tempname,'W')
  1024. IF ok=0 THEN
  1025.   DO
  1026.     SAY '***' tempname 'failed to open for saving!'
  1027.     RETURN 1
  1028.   END
  1029. DO wi=1 TO lynes.0
  1030.   CALL WRITELN(f,lynes.wi)
  1031. END
  1032. CALL CLOSE(f)
  1033. RETURN 0
  1034.  
  1035.  
  1036. selectchosen:
  1037. PARSE ARG startnum selectline
  1038. SAY 'Enter a list of comma separated user names'
  1039. thechosen.startnum=getinput(1 0 selectline' ')
  1040. IF STRIP(thechosen.startnum)='' THEN RETURN 1
  1041. thechosen.startnum=SPACE(thechosen.startnum,1,'_')
  1042. thechosen.0=startnum
  1043. IF POS(',',thechosen.startnum)>0 THEN
  1044.   DO
  1045.     temp=TRANSLATE(thechosen.startnum,' ',',')
  1046.     thechosen.0=thechosen.0+WORDS(temp)
  1047.     DO ei=startnum TO startnum+WORDS(temp)
  1048.       thechosen.ei=STRIP(WORD(temp,ei))
  1049.       IF LEFT(thechosen.ei,1)='_' THEN
  1050.         thechosen.ei=SUBSTR(thechosen.ei,2)
  1051.     END
  1052.   END
  1053. DO ei=1 TO thechosen.0
  1054.   thechosen.ei=check_alias(thechosen.ei)
  1055.   DO WHILE ~EXISTS(bbspath'Users/'thechosen.ei)
  1056.     SAY thechosen.ei 'not found! Enter that name again or press RETURN.'
  1057.     thechosen.ei=getinput(1 0 pen3||selectline' 'def)
  1058.     thechosen.ei=cleanstring(thechosen.ei)
  1059.   END
  1060. END
  1061. RETURN 0
  1062.  
  1063.  
  1064. cleanstring:
  1065. PARSE ARG cstr
  1066. cstr=TRANSLATE(cstr,,namemask)
  1067. cstr=SPACE(cstr,1,'_')
  1068. RETURN cstr
  1069.  
  1070.  
  1071. docity:
  1072. PARSE ARG citi
  1073. citi=TRANSLATE(citi,'          ','+-.,*/()<>')
  1074. DO i=WORDS(citi) TO 1 BY -1
  1075.   IF DATATYPE(WORD(citi,i),'N') THEN citi=STRIP(DELWORD(citi,i,1))
  1076.   IF UPPER(WORD(citi,i))='USA' THEN citi=STRIP(DELWORD(citi,i,1))
  1077. END
  1078. citi=SPACE(citi,1)
  1079. RETURN STRIP(citi)
  1080.  
  1081.  
  1082. getinput:
  1083. PARSE ARG upflag' 'oneflag' 'pline
  1084. OPTIONS PROMPT pline
  1085. PARSE PULL inarg
  1086. inarg=STRIP(inarg)
  1087. IF upflag THEN inarg=UPPER(inarg)
  1088. IF oneflag THEN inarg=LEFT(inarg,1)
  1089. RETURN inarg
  1090.  
  1091.  
  1092. setdir:
  1093. PARSE ARG tempdir
  1094. CALL PRAGMA('D',STRIP(tempdir))
  1095. RETURN
  1096.  
  1097.  
  1098. waiting2:
  1099. IF nonstop=1 THEN RETURN 0
  1100. waitchar=getinput(1 1 pen3'   Q=Quit   N=Non-Stop   RETURN=Continue  'def)
  1101. IF waitchar='N' THEN
  1102.   DO
  1103.     nonstop=1
  1104.     SAY pen3'To EXIT non-stop scrolling of text, press CTRL-E        'def
  1105.     SAY
  1106.     CALL DELAY(100)
  1107.     waitchar=''
  1108.   END
  1109. IF waitchar='Q' THEN RETURN 1
  1110. RETURN 0
  1111.  
  1112.  
  1113. check_alias:
  1114. PARSE ARG ali .
  1115. IF ~DATATYPE(Friends.0,'W') THEN RETURN ali
  1116. DO ii=1 TO Friends.0
  1117.   IF UPPER(WORD(Friends.ii,1))=UPPER(ali) THEN RETURN WORD(Friends.ii,2)
  1118. END
  1119. RETURN ali
  1120.  
  1121.  
  1122. showtext:
  1123. PARSE ARG arg .
  1124. IF EXISTS(arg) THEN
  1125.   DO
  1126.     CALL readlines(arg 1)
  1127.     CALL seelines(1)
  1128.     nonstop=0
  1129.     CALL waiting()
  1130.   END
  1131. RETURN
  1132.  
  1133. waiting:
  1134. IF waitchar='Q' THEN
  1135.   DO
  1136.     waitchar=''
  1137.     RETURN
  1138.   END
  1139. waitchar=''
  1140. IF nonstop=1 THEN RETURN
  1141. OPTIONS PROMPT pen3'                       RETURN=Continue  'def
  1142. PULL waitchar
  1143. RETURN
  1144.  
  1145.  
  1146. seeya:
  1147. SAY
  1148. SAY 'See ya.'
  1149. SAY
  1150. EXIT
  1151.  
  1152.  
  1153. /* bbsMail.rexx */
  1154.