home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / CDOR0811.ZIP / CDORMRGS.ZIP / RSB2CDOR.MRG < prev    next >
Encoding:
Text File  |  1993-08-11  |  155.0 KB  |  3,311 lines

  1. * ------------[ BLED merge (c) Ken Goosens ]-------------
  2. * Merge this against RBBSSUB2.BAS to produce RBBSSUB2.NEW
  3. * RBBSSUB2.BAS:  Date 6-20-92  Size 140946 bytes
  4. * ------------[ Created 08-11-1993 19:34:39 ]------------
  5. * REPLACING old line(s) by new
  6. * ------[ first line different ]------
  7. ' $segment
  8. ' $linesize:132
  9. ' $title: 'RBBSSUB2.BAS 17.4, Copyright 1986 - 92 by D. Thomas Mack'
  10. '  Copyright 1991 by D. Thomas Mack, all rights reserved.
  11. '  Name ...............: RBBSSUB2.BAS
  12. '  First Released .....: June 21, 1992
  13. '  Subsequent Releases.: 
  14. '  Copyright ..........: 1986 - 1992
  15. '  Purpose.............: The Remote Bulletin Board System for the IBM PC,
  16. '     RBBS-PC.BAS utilizes a lot of common subroutines.  Those that do not
  17. '     require error trapping are incorporated within RBBSSUB 2-5 as
  18. '     separately callable subroutines in order to free up as much
  19. '     code as possible within the 64K code segment used by RBBS-PC.BAS.
  20. '  Parameters..........: Most parameters are passed via a COMMON statement.
  21. '
  22. ' Subroutine  Line               Function of Subroutine
  23. '   Name     Number
  24. '  Macro          1320  Check/execute macro
  25. '  AnswerIt        200  Answer the telephone when it rings
  26. '  ASCIICodes      129  Allow a CONFIG string to have any ASCII value
  27. '  BadChar         455  Check user name for invalid characters
  28. '  BadName       20235  Check for system crash attempt with bad file name
  29. '  BankTime       5500  Let caller change banked time
  30. '  CheckRatio    20096  Test upload/download ratio
  31. '  CheckMacro     1242  Checks for macro and processes
  32. '  CopyRight        97  Display RBBS-PC's copyright notice
  33. '  DEFALTU        9600  Write out the user's defaults
  34. '  DenyAccess     1386  Downgrade security so access denied
  35. '  DoorExit      10983  Set up a .BAT file to exit RBBS-PC to a "door"
  36. '  DoorInfo      10991  Writes out information for a door
  37. '  DosExit       10934  Set up a .BAT file to exit to DOS (second level)
  38. '  EditALine      2618  Edits a single line
  39. '  EditDef         120  Edit configuration parameters
  40. '  FileNameCheck 20240  Matches file name to a prefix & extension
  41. '  GetArc        20140  Handle request for verbose listing
  42. '  GetCommand      101  Get RBBS-PC's node id from command line
  43. '  GetTime        9140  Calculates callers elapsed time (hh,mm,ss)
  44. '  GoIdle           90  Release resources when waiting for keyboard input
  45. '  KillMsg        3952  Delete old or unnecessary messages
  46. '  Line25          945  Build and/or update line 25 of RBBS-PC's local screen
  47. '  LineEdit       3700  Edit a line while minimizing string space consumption
  48. '  LogError      13660  Log error message to CALLERS file
  49. '  LPrnt          1480  Subroutine to write to local display
  50. '  MLInit            8  Handle MultiLink initialization/de-initialization
  51. '  MsgProt        2055  Sets protection for a message
  52. '  ParseIt        1637  Parses a string
  53. '  PassWrd         660  Verify user & message passwords
  54. '  PopCmdStack    1650  Get user input, 1st checking command stack
  55. '  PScrn          1483  Print to display
  56. '  QuickLPrnt     1482  Quickly writes count of blocks on file transfer
  57. '  QuickTPut      1478  Fast, but limited, "TPut" equivalent
  58. '  QuickTPut1     1478  Outputs short string following by CR LF
  59. '  RBBSExit      10992  RBBS-PC exit to transfer control to other programs
  60. '  RecoverMsg    10410  Recover a deleted message
  61. '  RemNonAlf      5100  Removes non-alpha characters from a string
  62. '  RingCaller     1636  Ring caller's bell and put message in emphasis
  63. '  SetBaud        1654  Set baud rate in the 8250 chip of the RS232 interface
  64. '  SetCrLf        1496  Set up the necessary carriage return/line feed string
  65. '  SetSection    12000  Set the proper section prompts (main, file, util, libr)
  66. '  SetThread      4554  Set up request for threading thru messages
  67. '  SetWhoTo       2018  Sets who a message/personal upload is to
  68. '  SkipLine       1485  Write a # of blank lines to the communications port
  69. '  SearchCmd      1238  Searches list of commands in RBBS for a request
  70. '  SecViolation   1380  Process a security violation
  71. '  SysMenu         112  Displays sysop menu/status
  72. '  SysopChat      4773  Sysop and caller chat
  73. '  TestRel         336  Tests for Reliable connect
  74. '  TGet           1498  Read a line from the communications port
  75. '  TPut           1396  Write a line to the communications port
  76. '  Trim            105  Strip leading and trailing blanks from a string
  77. '  TrimTrail       107  Strip off specified string off end of another string
  78. '  UntilRight    12878  Ask a question until user says answer is right
  79. '  UpdateU       10600  Updates the user record on loging off/exiting RBBS-PC
  80. '  VarInit         109  Initialize system variables
  81. '  ViewHelp       1330  Processes help command
  82. '  WhoCheck       2250  Checks whether a user exists in user file
  83. '  WhosOn         9801  Report status of each node - who's on
  84. '  WordInFile    10976  Find a whole word within a file/menu
  85. '
  86. '  $INCLUDE: 'RBBS-VAR.BAS'
  87. '
  88. '  $SUBTITLE: 'MLInit - MultiLink initialization/deinitialization'
  89. '  $PAGE
  90. '
  91. '  NAME    -- MLInit
  92. '
  93. '  INPUTS  --  MLParm = 1             INITIALIZE AT STARTUP OR RE-
  94. '                                     CYLCE TIME
  95. '              MLParm = 2             DE-INITIALIZE ON EXITING TO
  96. '                                     A DOOR OR DOS REMOTELY
  97. '              MLParm = 3             DE-QUEUE COMMUNICATIONS PORTS
  98. '              MLParm = 4             CHECK FOR MULTILINK PRESENT
  99. '              ZDoorsTermType
  100. '              ZBaudTest!
  101. '              ZComPort$
  102. '              ZComputerType
  103. '
  104. '  OUTPUTS --  NONE
  105. '
  106. '  PURPOSE --  To test for the presence of multi-link and set
  107. '              multi link options to be compatible with RBBS-PC
  108. '
  109.  
  110. '     SUB MLInit (MLParm) STATIC                                     ' DD090401
  111. '   DEF SEG = 0                                                      ' DD090401
  112. '   IF ZComputerType = 1 _                                           ' DD090401
  113. '      GOTO 10                                                       ' DD090401
  114. '   IF NOT ZMLCom THEN _                                             ' DD090401
  115. '      IF ZNetworkType <> 1 THEN _                                   ' DD090401
  116. '         GOTO 10                                                    ' DD090401
  117. '   ZMultiLinkPresent = PEEK(&H1FE) + 256 * PEEK(&H1FF)              ' DD090401
  118. '   IF ZMultiLinkPresent = 0 THEN _                                  ' DD090401
  119. '      GOTO 10                                                       ' DD090401
  120. '   ON MLParm GOSUB 30,20,60,10                                      ' DD090401
  121. '10 DEF SEG                                                          ' DD062304
  122. '   EXIT SUB                                                         ' DD090401
  123. '20 IF ZDoorsTermType < 1 THEN _                                     ' DD062304
  124. '      RETURN                                                        ' DD090401
  125. '   DEF SEG = ZMultiLinkPresent                                      ' DD090401
  126. '   GOSUB 60                                                         ' DD090401
  127. ' **************     MLUTIL BAUD n (where n = ZBaudTest!)  ******    ' DD090401
  128. '   WasAX = &H600                                                    ' DD090401
  129. '   WasBX = ZBaudTest!   ' Tell ML the baud rate                     ' DD090401
  130. '   GOSUB 80                                                         ' DD090401
  131. ' **************     MLUTIL TERM n (where n = ZDoorsTermType) ****   ' DD090401
  132. '   WasAX = &H700 + ZDoorsTermType                                   ' DD090401
  133. '   GOSUB 80         ' Tell ML the terminal type                     ' DD090401
  134. ' *********          MLINK /port       ***********                   ' DD090401
  135. '                    ' Tell ML the communications port               ' DD090401
  136. '   POKE (&H64 + PEEK(&H58) + 256 * PEEK(&H59) + &HC),ASC(RIGHT$(ZComPort$,1)) - 48' DD090401
  137. ' ************       MLUTIL SCMON       *************                ' DD090401
  138. '   WasAX = &HB01                                                    ' DD090401
  139. '   WasBX = 0           ' Tell ML to start monitoring the carrier    ' DD090401
  140. '   GOSUB 80                                                         ' DD090401
  141. '   RETURN                                                           ' DD090401
  142. ' **************     MLUTIL CCMON       ***************              ' DD090401
  143. '30 WasAX = &HB00       ' Turn off ML's carrier monitoring.          ' DD062304
  144. '   WasBX = 0                                                        ' DD090401
  145. '   GOSUB 80                                                         ' DD090401
  146. ' **************     MLUTIL TERM 1       *************               ' DD090401
  147. '   WasAX = &H701       ' Change terminal type to ML type 1.         ' DD090401
  148. '   WasBX = 0                                                        ' DD090401
  149. '   GOSUB 80                                                         ' DD090401
  150. ' *******  MLINK /port (where port = 9 if ML 3.03 or earlier  ****** ' DD090401
  151. ' *******            port = 0 if ML 4.00 or greater           ****** ' DD090401
  152. '   DEF SEG = ZMultiLinkPresent                                      ' DD090401
  153. '   MultiLinkCommPort = (&H64 + PEEK(&H58) + 256 * PEEK(&H59) + &HC) ' DD090401
  154. '   MultiLinkVersion = PEEK(&H1) + 256 * PEEK(&H2)                   ' DD090401
  155. '   IF PEEK(MultiLinkCommPort) = &H1 OR _                            ' DD090401
  156. '      PEEK(MultiLinkCommPort) = &H2 THEN _                          ' DD090401
  157. '      IF MultiLinkVersion > 5000 THEN _                             ' DD090401
  158. '         POKE (MultiLinkCommPort),&H0 _                             ' DD090401
  159. '      ELSE POKE (MultiLinkCommPort),&H9                             ' DD090401
  160. ' **********         MLUTIL ENQ         **********                   ' DD090401
  161. '   WasAX = &H1        ' Tell ML to conditional enque on the comm. port'DD090401
  162. '   GOSUB 70                                                         ' DD090401
  163. ' **********         MLUTIL BAUD 19200      *********                ' DD090401
  164. '   WasAX = &H600       ' Tell ML to reset the buad rate (19200 BAUD)' DD090401
  165. '   WasBX = 19200                                                    ' DD090401
  166. '   GOSUB 80                                                         ' DD090401
  167. '   RETURN                                                           ' DD090401
  168. ' **********         MLUTIL DEQ         *********                    ' DD090401
  169. '60 WasAX = &H100        ' Tell ML to unconditionally deque the comm. port' DD062304
  170. '70 WasBX = -4                                                       ' DD062304
  171. '  IF ZComPort$ = "COM2" THEN _                                      ' DD090401
  172. '     WasBX = -3                                                     ' DD090401
  173. '  IF ZComPort$ = "COM0" THEN _                                      ' DD090401
  174. '     RETURN                                                         ' DD090401
  175. ' ******  MULTI-LINK PROGRAMMING SUPPORT INTERFACE  *******          ' DD090401
  176. '80 CALL RBBSML(WasAX,WasBX)                                         ' DD062304
  177. '  RETURN                                                            ' DD090401
  178. '  END SUB                                                           ' DD090401
  179. * DELETING old line(s)
  180. 10
  181. 20
  182. 30
  183. 60
  184. 70
  185. 80
  186. * REPLACING old line(s) by new
  187. 90 '  $SUBTITLE: 'GoIdle - release control when waiting'
  188. '  $PAGE
  189. '
  190. '  NAME    -- GoIdle
  191. '
  192. '  INPUTS  -- ZMLCom
  193. '             ZNetworkType
  194. '
  195. '  OUTPUTS --  NONE
  196. '
  197. '  PURPOSE --  To relinquish control when RBBS-PC is waiting for
  198. '              input from the communications port
  199. '
  200.       SUB GoIdle STATIC
  201. * ------[ first line different ]------
  202. '  IF ZMLCom OR ZNetworkType = 1 THEN _                              ' DD090401
  203. '     CALL MLInit(5) : _                                             ' DD090401
  204. '     EXIT SUB                                                       ' DD090401
  205.    CALL GiveBack
  206.    END SUB
  207. * REPLACING old line(s) by new
  208. 97 '  $SUBTITLE: 'CopyRight - subroutine to display RBBS-PC copyright'
  209. '  $PAGE
  210. '
  211. '  NAME    -- CopyRight
  212. '
  213. '  INPUTS  --  NONE
  214. '
  215. '  OUTPUTS --  NONE
  216. '
  217. '  PURPOSE --  To display RBBS-PC's copyright notice on the local screen
  218. '
  219.       SUB CopyRight STATIC
  220.    ZWasA = (ZDebug OR ZExitToDoors OR ZCopyrightSecs < 1)
  221.    IF ZWasA THEN _
  222. * ------[ first line different ]------
  223.       ZOK = ZTrue : _                                                ' DD071901
  224.       EXIT SUB
  225.    WIDTH 80
  226.    CALL FindIt ("COPYRITE.DEF")                                      ' DD062304
  227.    IF NOT ZOK THEN                                                   ' DD062304
  228.       PRINT "COPYRITE.DEF not found - Aborting"                      ' DD062304
  229.       GOTO 98                                                        ' DD062304
  230.    END IF                                                            ' DD062304
  231.    CALL OpenWork (2,"COPYRITE.DEF")                                  ' DD062304
  232.    CLS
  233.    KEY OFF
  234.    LOCATE ,,0
  235. '  ZWasA = ZSnoop                                                    ' DD062304
  236. '  ZSnoop = -1                                                       ' DD062304
  237.    WHILE NOT EOF(2)                                                  ' DD062304
  238.       LINE INPUT #2, ZOutTxt$                                        ' DD062304
  239.       PRINT ZOutTxt$                                                 ' DD062304
  240.    WEND                                                              ' DD062304
  241. * INSERTING new line(s)
  242. 98 CALL DelayTime (ZCopyrightSecs)                                   ' DD062304
  243. '  ZSnoop = ZWasA                                                    ' DD062304
  244.    END SUB
  245. * REPLACING old line(s) by new
  246. 101 ' $SUBTITLE: 'GetCommand - sub to get command from command line'
  247. ' $PAGE
  248. '
  249. '  NAME    -- GetCommand
  250. '
  251. '  INPUTS  --     PARAMETER                    MEANING
  252. '             ZConfigFileName$     NAME OF RBBS-PC ".DEF" FILE TO
  253. '                                  USE AS A MODEL WHEN CREATING THE
  254. '                                  .DEF FILE NAME TO BE USED BY THIS
  255. '                                  COPY OF RBBS-PC.
  256. '
  257. '             COMMAND LINE         COMMAND LINE USED TO INVOKE
  258. '                                  RBBS-PC IN THE FORM:
  259. '
  260. '       RBBS-PC.EXE x filename DEBUG /time /baud /reliable
  261. '
  262. '   WHERE THE OPTIONAL PARAMETERS ARE:
  263. '
  264. '  x       IS THE NODE ID IN THE RANGE 1-9,0,A-Z
  265. ' filename IS THE FULLY QUALIFIED FILE NAME TO USE AS THE ".DEF" FILE
  266. ' DEBUG    IS A DEBUGGING Switch
  267. ' /time    IS THE TIME OF DAY FOR RBBS-PC TO RETURN TO THE CALLER
  268. ' /baud    IS THE BAUD RATE OF THE CALLER IF RBBS-PC IS BEING SHELLED TO BY
  269. '             ANOTHER COMMUNICATIONS PROGRAM (THE COMMUNICATIONS PORT BEING
  270. '             USED IS ASSUMED TO BE THE ONE INPUTTED VIA THE RBBS-PC CONFIG
  271. '             PROGRAM
  272. ' /reliable IS IF RELIABLE MODE WAS DETECTED BY A HOST MAILER
  273. '
  274. ' IF NO PARAMETERS ARE SUPPLIED, RBBS-PC ASSUMES THAT THE .DEF FILE NAME IS
  275. ' RBBS-PC.DEF AND THAT THE NODE IS NODE 1.
  276. '
  277. '  OUTPUTS -- ZConfigFileName$     NAME OF RBBS-PC ".DEF" FILE FOR
  278. '                                  THIS COPY OF RBBS-PC TO USE
  279. '             ZNodeRecIndex    RECORD NUMBER WITHIN THE
  280. '                                  MESSAGES FILE FOR THIS "NODE"
  281. '                                  (RANGE IS 2 TO 36)
  282. '
  283. '  PURPOSE --  To get node id from command line and determine if rbbs
  284. '              is being run as a door
  285. '
  286.       SUB GetCommand (PassedDebug,NetTime$,NetBaud$,NetReliable$) STATIC
  287.       STATIC ZDebug
  288. '
  289. '
  290. ' *  GET NODE ID FROM COMMAND LINE
  291. '
  292. '
  293.       WasPM$ = COMMAND$
  294.       CALL AllCaps(WasPM$)
  295. * ------[ first line different ]------
  296.       IF INSTR(WasPM$,CHR$(47)) = 0 THEN _           '/              ' DD021301
  297.          GOTO 103
  298. '
  299. '
  300. ' * PARSE THE COMMAND LINE FOR THREE POSITIONAL SWITCHES FOR NET MAIL
  301. '
  302. '
  303.       CmdLine$ = MID$(WasPM$,INSTR(WasPM$,CHR$(47)))                 ' DD021301
  304.       WasPM$ = LEFT$(WasPM$,INSTR(WasPM$,CHR$(47)) - 1)              ' DD021301
  305.       ZWasA = 0
  306.       FOR WasX = 1 TO LEN(CmdLine$)
  307.           IF MID$(CmdLine$,WasX,1) = CHR$(47) THEN _                 ' DD021301
  308.              ZWasA = ZWasA + 1 : _
  309.              ZSubDir$(ZWasA) = "" _
  310.           ELSE ZSubDir$(ZWasA) = ZSubDir$(ZWasA) + MID$(CmdLine$,WasX,1)
  311.       NEXT
  312.       NetTime$ = ZSubDir$(1)
  313.       IF ZWasA > 1 THEN _
  314.          NetBaud$ = ZSubDir$(2)
  315.       IF ZWasA > 2 THEN _
  316.          ZCBaud$ = STR$(VAL(ZSubDir$(3)))                            'Pe 031692
  317.       IF ZWasA > 3 THEN _
  318.          NetReliable$ = ZSubDir$(4)                                  'lk 022792
  319.       CALL Trim(NetTime$)
  320.       CALL Trim(NetBaud$)
  321.       CALL Trim (ZCBaud$)                                            ' Mpl090202
  322.       CALL Trim(NetReliable$)                                        ' Mpl090202
  323. * REPLACING old line(s) by new
  324. 103   ZWasA = INSTR(WasPM$,"DEBUG")
  325.       IF ZWasA > 0 THEN _
  326.          ZDebug = -1 : _
  327.          WasPM$ = LEFT$(WasPM$,ZWasA - 1) + _
  328.                RIGHT$(WasPM$,LEN(WasPM$) - ZWasA - 4)
  329.       PassedDebug = ZDebug
  330.       ZWasA = INSTR(WasPM$,"LOCAL")
  331.       IF ZWasA > 0 THEN _
  332.          ZComPort$ = "COM0" : _
  333.          WasPM$ = LEFT$(WasPM$,ZWasA - 1) + _
  334.                RIGHT$(WasPM$,LEN(WasPM$) - ZWasA - 4)
  335.       IF LEN(WasPM$) = 0 THEN _
  336. * ------[ first line different ]------
  337.          WasPM$ = CHR$(45)                                  '-       ' DD021301
  338.       ZNodeRecIndex = INSTR("-1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ",LEFT$(WasPM$,1))
  339.       IF ZNodeRecIndex < 2 THEN _
  340.          ZNodeRecIndex = 2
  341.       ZNodeID$ = MID$(STR$(ZNodeRecIndex-1),2)
  342.       IF ZNodeRecIndex > 10 THEN _
  343.          ZNodeFileID$ = LEFT$(WasPM$,1) _
  344.       ELSE ZNodeFileID$ = ZNodeID$
  345. '     IF ZNodeID$ <> CHR$(49) THEN _                         '1      ' DD071001
  346. '        ZLibNodeID$ = ZNodeFileID$                                  ' DD071001
  347.       IF LEN(WasPM$) > 2 AND MID$(WasPM$,2,1) = SPACE$(1) THEN _     ' DD021301
  348.          ZConfigFileName$ = MID$(WasPM$,3)_
  349.       ELSE MID$(ZConfigFileName$,5,1) = WasPM$
  350.       ZOrigCnfg$ = ZConfigFileName$
  351.       END SUB
  352. * REPLACING old line(s) by new
  353. 105 ' $SUBTITLE: 'Trim - sub to eliminate leading/trailing blanks'
  354. ' $PAGE
  355. '
  356. '  NAME    -- Trim
  357. '
  358. '  INPUTS  --  PARAMETER                    MEANING
  359. '              TrimParm$           STRING THAT IS TO HAVE LEADING
  360. '                                  AND TRAILING BLANKS ELIMINATED FROM
  361. '
  362. '  OUTPUTS --  TrimParm$           STRING WITH NO LEADING OR TRAILING
  363. '                                   BLANKS
  364. '
  365. '  PURPOSE --  To strip leading and trailing blanks
  366. '
  367.       SUB Trim (TrimParm$) STATIC
  368. * ------[ first line different ]------
  369.       WasL = INSTR(TrimParm$,SPACE$(1))                              ' DD021301
  370.       IF WasL < 1 THEN _
  371.          EXIT SUB
  372.       IF WasL = 1 THEN _
  373.          WHILE LEFT$(TrimParm$,1) = SPACE$(1) : _                    ' DD021301
  374.             TrimParm$ = RIGHT$(TrimParm$,LEN(TrimParm$) - 1) : _
  375.          WEND
  376.       CALL TrimTrail (TrimParm$,SPACE$(1))                           ' DD021301
  377.       END SUB
  378. '
  379. * REPLACING old line(s) by new
  380. 109 '  $SUBTITLE: 'VarInit - subroutine to initialize system variables'
  381. '  $PAGE
  382. '
  383. '  NAME    --  VarInit
  384. '
  385. '  INPUTS  --  PARAMETER           MEANING
  386. '              NONE
  387. '
  388. '  OUTPUTS --  NONE
  389. '
  390. '  PURPOSE --  To initialize system variable
  391. '
  392.       SUB VarInit STATIC
  393.     DEF SEG                            ' Point to BASIC
  394.     WIDTH 80                           ' Set Screen Width
  395.     KEY OFF                            ' Line 25 turned off
  396. ' ********************* Variable Definitions *******************************
  397. * ------[ first line different ]------
  398.     ZMsgDim = 199                                                    ' DD021701
  399.     WasMM = 999
  400.     WasBX = 75
  401.     WasJ = 60
  402.     REDIM ZOptSec(WasJ)
  403.     DIM ZWorkAra$(WasJ)
  404.     DIM ZGSRAra$(WasJ)
  405.     DIM ZCategoryName$(WasBX),ZCategoryCode$(WasBX),ZCategoryDesc$(WasBX)
  406.     DIM ZOutTxt$(ZMsgDim)                      ' Message line table
  407.     DIM ZUserIn$(ZMsgDim)                      ' Message line table
  408.     DIM ZMsgPtr(WasMM,2)                       ' Message pointers
  409.     ZAcknowledge$ = CHR$(6)
  410.     ZAckChar$ = CHR$(67) + _                         'C              ' DD021301
  411.             ZAcknowledge$
  412.     ZActiveMenu$ = CHR$(124)                         '|              ' DD021301
  413.     ZActiveMessage$ = CHR$(225)
  414.     ZBackSpace$ = CHR$(8) + _
  415.                  CHR$(32) + _
  416.                  CHR$(8)
  417. '   ZBackArrow$ = CHR$(29) + _                                       ' DD050701
  418. '                 CHR$(32) + _                                       ' DD050701
  419. '                 CHR$(29)                                           ' DD050701
  420.     ZBaudRates$ = "      300  450 1200 2400 4800 7200 96001200014400168001920038400"
  421.     ZBellRinger$ = CHR$(7)
  422.     ZBulletinMenu$ = ""
  423.     ZWasCL = 24
  424.     ZCancel$ = CHR$(24)
  425.     ZColorReset$ = CHR$(27) + _
  426.                    "[0;37;40m"                                       ' DD062304
  427.     ZConfigFileName$ = "RBBS-PC.DEF"
  428.     ZCarriageReturn$ = CHR$(13)
  429.     ZDeletedMsg$ = CHR$(226)
  430.     ZEndTransmission$ = CHR$(4)
  431.     ZEscape$ = CHR$(27)
  432.     ZExpectActiveModem = 0
  433.     ZFalse = 0
  434. '   ZF1Key = 59                                                      ' DD062304
  435. '   ZF10Key = 68                                                     ' DD062304
  436.     ZConfName$ = "MAIN"
  437.     CALL SetHiLite (ZTrue)
  438.     ZHomeConf$ = ""
  439.     ZInConfMenu = -1
  440.     ZLastCommand$ = "M "
  441.     ZLimitMinsPerSession = 0
  442.     ZLineFeed$ = CHR$(10)
  443.     ZLineFeeds = NOT ZFalse
  444.     ZLineEditChk$ = CHR$(9) + _
  445.                     ZLineFeed$ + _
  446.                     CHR$(11) + _
  447.                     CHR$(12) + _
  448.                     CHR$(127) + _
  449.                     CHR$(8) + _
  450.                     ZBellRinger$ + _
  451.                     CHR$(26) + _
  452.                     CHR$(227)
  453.     ZLineMes$ = SPACE$(78)          ' fixed length string workspace
  454.     ZLockStatus$ = "UM UU UB UD"
  455.     ZMenuIndex = 2
  456.     ZNAK$ = CHR$(21)
  457.     ZNoAdvance = ZFalse
  458.     ZPageLength = 23
  459.     ZParseOff = ZFalse
  460.     ZYesPrompt$ = " ([Y],N)"                                         ' DD091202
  461.     ZNoPrompt$ = " (Y,[N])"                                          ' DD091202
  462.     ZPressEnter$ = " (Press [ENTER] to Quit)"                        ' UG070501
  463.     ZPressEnterExpert$ = " ([ENTER] Quits)"                          ' UG070501
  464. '   ZPressEnterNovice$ = ZPressEnter$                                ' DD070204
  465.     ZPrivateDoor = ZFalse
  466.     ZRightMargin = 72
  467.     ZReturnLineFeed$ = ZCarriageReturn$ + _
  468.                         ZLineFeed$
  469.     ZSmartTable$ = "CS PB NS FN LN SL DT TM TR TE TL RP RR CT " + _
  470.                    "C1 C2 C3 C4 C0 DD BD DB UB DL UL FI VY VN " + _
  471.                    "TY TN BN ND FS LS CN " + _                       ' DD081801/COLR
  472.                    "C5 C6 C7 C8 C9 CA CB CC CD CE CF " + _           ' DD081801/COLR
  473.                    "G0 G1 G2 G3 G4 G5 G6 G7 SN SO MS CR LT SD " + _  ' DD021401
  474.                    "TD ZM DC ZV LD TO TC MA MN ML BP BB CL FB " + _  ' DD040712
  475.                    "FK FM DR PW UM PR UC LF NL TK GR HL RB NB " + _  ' DD052302
  476.                    "NU AE IC RG NF "                                 ' DD062606
  477.     ZStartOfHeader$ = CHR$(1)
  478.     ZTimeLoggedOn$ = SPACE$(8)
  479.     ZTrue = NOT ZFalse
  480.     ZUpInc = -1
  481.     ZXOff$ = CHR$(19)
  482.     ZXOn$ = CHR$(17)
  483.     ZInterrupOn$ = CHR$(11) + ZCancel$ + ZXOff$ + ZXOn$ + ZCarriageReturn$
  484.     ZOptionEnd$ = ZReturnLineFeed$ + " ,("
  485.     ZCrLf$ = ZCarriageReturn$ + ZLineFeed$
  486.     ZVersionID$ = "17.4a CDor/0811"                                  ' DD081101
  487.     ZWasLG$(1) = "Registration Check Failed"
  488.     ZWasLG$(2) = "Sysop name attempted"
  489.     ZWasLG$(3) = "Locked out attempt"
  490.     ZWasLG$(4) = "Password Attempt Failed"
  491.     ZWasLG$(5) = "Auto Lockout done"
  492.     ZWasLG$(6) = "Name in use on another Node!"
  493.     ZWasLG$(7) = ""
  494.     ZWasLG$(8) = "Locked reason read!"
  495.     ZWasLG$(9) = "Expired Registration"
  496.     CALL GetCommand (ZDebug,ZNetTime$,ZNetBaud$,ZNetReliable$)
  497.     ZSubParm = 1
  498.     CALL ReadDef (ZConfigFileName$)
  499.     REDIM ZWorkAra$(ZMaxWorkVar)
  500.     REDIM ZGSRAra$(ZMaxWorkVar)
  501.     ZUseTPut = (ZUpperCase OR ZXOnXOff)
  502.     ZOrigCallers$ = ZCallersFile$
  503.     ZOrigMsgFile$ = ZMainMsgFile$
  504.     ZOrigUserFile$ = ZMainUserFile$
  505.     ZOrigSysopFN$ = ZSysopFirstName$
  506.     ZOrigSysopLN$ = ZSysopLastName$
  507.     ZPromptBell = ZPromptBellDef
  508.     ZSecretName$ = ZSysopPswd1$ + SPACE$(1) + ZSysopPswd2$           ' DD021301
  509.     ZDropChange = ZFalse                                             ' DD091401/DROP
  510.     IF NOT ZSubBoard THEN _                                          'lk 022092 for toss mod
  511.        ZOrigRBBSName$ = ZRBBSName$                                   'lk 022092 for toss mod
  512.     ZRIPGraphicsReset$ = " !|*!|0000270P01"                          ' DD062302
  513.     END SUB
  514. '
  515. * REPLACING old line(s) by new
  516. 112 ' $SUBTITLE: 'SysMenu - sub to display RBBS-PC SYSOP menu'
  517. '  $PAGE
  518. '
  519. '  NAME    --  SysMenu
  520. '
  521. '  INPUTS  --  PARAMETER           MEANING
  522. '
  523. '  OUTPUTS --  NONE
  524. '
  525. '  PURPOSE --  TO DISPLAY RBBS-PC's SYSOP MENU ON THE LOCAL SCREEN
  526. '
  527.     SUB SysMenu STATIC
  528.     ZLocalUser = ZTrue
  529.     ZSnoop = ZTrue
  530.     ZNonStop = ZTrue
  531.     CALL CheckTime (TIMER, ZDelay!, 1)
  532. * ------[ first line different ]------
  533. '   COLOR ZFG,ZBG,ZBorder                                            ' DD070204
  534.     CLS
  535.     ZStopInterrupts = ZTrue
  536.     ZBypassTimeCheck = ZTrue
  537.     CALL BufFile ("MENU0",WasX)
  538.     ZNonStop = ZFalse
  539.     ZBypassTimeCheck = ZFalse
  540.     ZLocalUser = ZFalse
  541.     IF NOT ZOK THEN _
  542.        CALL LPrnt("MENU0 not on default drive",1)
  543.     LOCATE 2,14                                                      ' DD082703/MENU0
  544.     IF ZDOSAnsi THEN _                                               ' DD090202/MENU0
  545.        CALL LPrnt(ZEscape$ + "[1;37m" + LEFT$(ZVersionID$,13),0) : _ ' DD062304
  546.     ELSE _                                                           ' DD090202/MENU0
  547.        CALL LPrnt(ZEscape$ + "[1;37m" + LEFT$(ZVersionID$,13),0)     ' DD062304
  548.     LOCATE 2,33                                                      ' DD082703/MENU0
  549.     CALL LPrnt(ZNodeID$,0)
  550.     LOCATE 2,35                                                      ' DD090901/MENU0
  551.     Temp$ = STR$(ZMaxNodes)                                          ' DD090901/MENU0
  552.     CALL TRIM (Temp$)                                                ' DD090901/MENU0
  553.     CALL LPrnt (Temp$,0)                                             ' DD090901/MENU0
  554.     LOCATE 2,48                                                      ' DD082703/MENU0
  555.     CALL LPrnt(LEFT$(TIME$,5),0)                                     ' DD082703/MENU0
  556.     LOCATE 2,60
  557.     WasX$ = DATE$
  558.     CALL LPrnt(LEFT$(WasX$,6) + RIGHT$(WasX$,2),0)
  559.     LOCATE 2,74
  560.     CALL LPrnt(LEFT$(TIME$,5),0)
  561.     IF ZFMSDirectory$ <> "" THEN _
  562.        LOCATE 6,76 : _
  563.        CALL LPrnt("YES",0)
  564.     IF ZExtendedLogging THEN _
  565.        LOCATE 8,76 : _
  566.        CALL LPrnt("YES",0)
  567.     IF ZFossil THEN _
  568.        LOCATE 10,76 : _
  569.        CALL LPrnt("YES",0)
  570.     LOCATE 12,75 : _
  571.     CALL LPrnt(ZComPort$,0)
  572.     LOCATE 14,75
  573.     CALL LPrnt (STR$(CINT(FRE("A")/1024)) + CHR$(107),0)    'k       ' DD021301
  574.     IF ZDebug THEN _
  575.        LOCATE 22,76 : _
  576.        CALL LPrnt("Yes",0)
  577.     CALL GetLastCaller                                               ' DD090901
  578.     LOCATE 17,17                                                     ' DD090901/MENU0
  579.     CALL LPrnt (ZLastCaller$,0)                                      ' DD090901/MENU0
  580.     LOCATE 18,17                                                     ' DD090901/MENU0
  581.     CALL LPrnt (STR$(ZMenuNewCalls),0)                               ' DD090901/MENU0
  582.     LOCATE 19,17                                                     ' DD090901/MENU0
  583.     CALL LPrnt (STR$(ZMenuNewUsers),0)                               ' DD090901/MENU0
  584.     LOCATE 20,17                                                     ' DD090901/MENU0
  585.     CALL LPrnt (STR$(ZMenuNewMsgs),0)                                ' DD090901/MENU0
  586.     LOCATE 21,17                                                     ' DD090901/MENU0
  587.     CALL LPrnt (STR$(ZMenuNewUpld),0)                                ' DD090901/MENU0
  588.     LOCATE 22,17                                                     ' DD090901/MENU0
  589.     CALL LPrnt (STR$(ZMenuDownloads),0)                              ' DD090901/MENU0
  590.     LOCATE 18,46                                                     ' DD090901/MENU0
  591.     CALL LPrnt (STR$(ZMenuNewSysop),0)                               ' DD090901/MENU0
  592.     LOCATE 19,46                                                     ' DD090901/MENU0
  593.     CALL LPrnt (STR$(ZMenuSysopPages),0)                             ' DD090901/MENU0
  594.     LOCATE 20,46                                                     ' DD090901/MENU0
  595.     CALL LPrnt (STR$(ZMenuDoors),0)                                  ' DD090901/MENU0
  596.     LOCATE 21,46                                                     ' DD090901/MENU0
  597.     CALL LPrnt (STR$(ZMenuCarriers),0)                               ' DD090901/MENU0
  598.     ZWasZ$ = ZUpldDriveFile$                                         ' DD090901/MENU0
  599.     CALL FindFree                                                    ' DD090901/MENU0
  600.     LOCATE 22,46                                                     ' DD090901/MENU0
  601.     CALL LPrnt (ZFreeSpaceM$,0)                                      ' DD090901/MENU0
  602.     END SUB
  603. '
  604. * REPLACING old line(s) by new
  605. 120 '  $SUBTITLE: 'EditDef - sub to edit config parameters'
  606. '  $PAGE
  607. '
  608. '  NAME    -- EditDef
  609. '
  610. '  INPUTS  --     PARAMETER                    MEANING
  611. '
  612. '  OUTPUTS --                          OUTPUT STRING
  613. '
  614. '  PURPOSE -- Interpretes and adjusts stored configuration parameters
  615. '
  616.       SUB EditDef STATIC
  617. * ------[ first line different ]------
  618.       ZMinsPerSessionDef = ZMinsPerSession                           ' KG082101
  619.       ZAllOpts$ = ZMainCmds$ + _
  620.                   ZFileCmd$ + _
  621.                   ZUtilCmds$ + _
  622.                   ZLibCmds$ + _
  623.                   ZGlobalCmnds$ + _
  624.                   ZSysopCmds$
  625.       ZHelpExtension$ = CHR$(46) + _                       '.        ' DD021301
  626.                         ZHelpExtension$
  627.       ZCompressedExt$ = ZDefaultExtension$
  628.       ZWasQ = INSTR(ZDefaultExtension$,CHR$(46))                     ' DD021301
  629.       IF ZWasQ > 0 THEN _
  630.          ZDefaultExtension$ = LEFT$(ZDefaultExtension$, ZWasQ-1)
  631.       ZCurDirPath$ = ZDirPath$
  632.       ZTempExpiredSec = ZExpiredSec
  633.       ZBegMain = 1
  634.       ZBegFile = LEN(ZMainCmds$) + ZBegMain
  635.       ZBegUtil = LEN(ZFileCmd$) + ZBegFile
  636.       ZBegLibrary = LEN(ZUtilCmds$) + ZBegUtil
  637.       ZHelp$(3) = ZHelpPath$ + _
  638.                  ZHelp$(3)
  639.       ZHelp$(4) = ZHelpPath$ + _
  640.                  ZHelp$(4)
  641.       ZHelp$(7) = ZHelpPath$ + _
  642.                  ZHelp$(7)
  643.       ZHelp$(9) = ZHelpPath$ + _
  644.                  ZHelp$(9)
  645.       CALL BreakFileName (ZWelcomeFile$,ZWelcomeFileDrvPath$,Prefix$,_
  646.                      Extension$,ZTrue)
  647.      CALL ASCIICodes (CHR$(91),CHR$(93),ZDefaultLineACK$)            ' DD021301
  648.      CALL ASCIICodes (CHR$(91),CHR$(93),ZHostEchoOn$)                ' DD021301
  649.      CALL ASCIICodes (CHR$(91),CHR$(93),ZHostEchoOff$)               ' DD021301
  650.      CALL ASCIICodes (CHR$(91),CHR$(93),ZEmphasizeOffDef$)           ' DD021301
  651.      CALL ASCIICodes (CHR$(91),CHR$(93),ZEmphasizeOnDef$)            ' DD021301
  652.      IF ZSubParm = -62 THEN _
  653.         EXIT SUB
  654.      ZLocalUserMode = (RIGHT$(ZComPort$,1) < CHR$(49))     '1        ' DD021301
  655. '    IF ZLocalUserMode THEN _                                        ' DD052301
  656. '       ZRecycleToDos = ZTrue                                        ' DD052301
  657.      ZEchoer$ = ZDefaultEchoer$
  658.      IF LEN(ZScreenOutMsg$) < 2 THEN _
  659.         ZScreenOutMsg$ = ZStartOfHeader$
  660.      ZSmartTextCode$ = CHR$(ZSmartTextCode)
  661.      IF ZMaxWorkVar < 13 THEN _
  662.         ZMaxWorkVar = 13
  663. '
  664. ' ***  ESTABLISH RBBS-PC'S DOS SUBDIRECTORIES USAGE  ***
  665. '
  666.     IF ZMainFMSDir$ <> "" THEN _
  667.        ZFMSDirectory$ = ZDirPath$ + _
  668.                         ZMainFMSDir$ + _
  669.                         CHR$(46) + _                                 ' DD021301
  670.                         ZMainDirExtension$ : _
  671.        ZActiveFMSDir$ = ZFMSDirectory$ : _
  672. '      ZLibDir$ = ZLibDirPath$ + _                                   ' Mpl090202
  673. '                           ZMainFMSDir$ + _                         ' Mpl090202
  674. '                           CHR$(46) + _                             ' DD021301
  675. '                           ZLibDirExtension$                        ' Mpl090202
  676.     ZUpcatHelp$ = ZHelpPath$ + _
  677.                   ZUpcatHelp$ + _
  678.                   ZHelpExtension$
  679.     IF ZSubDirCount < 1 THEN _
  680.        GOTO 123
  681.     FOR ZSubDirIndex = 1 TO ZSubDirCount
  682.        INPUT #2,ZSubDir$
  683.        IF RIGHT$(ZSubDir$,1) <> CHR$(92) THEN _            '\        ' DD021301
  684.          ZSubDir$(ZSubDirIndex) = ZSubDir$ + _
  685.                                  CHR$(92) _                          ' DD021301
  686.        ELSE ZSubDir$(ZSubDirIndex) = ZSubDir$
  687.     NEXT
  688.     GOTO 125
  689. * REPLACING old line(s) by new
  690. 123 FOR ZSubDirIndex = 1 TO LEN(ZDnldDrives$) - 1
  691.        ZSubDir$(ZSubDirIndex) = MID$(ZDnldDrives$,ZSubDirIndex,1) + _
  692. * ------[ first line different ]------
  693.                                CHR$(58)                    ':        ' DD021301
  694.     NEXT
  695.     ZSubDirCount = LEN(ZDnldDrives$) - 1
  696. '
  697. ' *****  SETUP UPLOAD DRIVE AND DIRECTORY.NAME  ***
  698. '
  699. * REPLACING old line(s) by new
  700. 125 ZUpldDirCheck$ = ZUpldDir$
  701.     ZSubDirCount = ZSubDirCount + 1
  702.     IF ZUpldToSubdir THEN _
  703.        ZSubDir$(ZSubDirCount) = ZUpldSubdir$ + _
  704. * ------[ first line different ]------
  705.                                CHR$(92) _                            ' DD021301
  706.     ELSE ZSubDir$(ZSubDirCount) = RIGHT$(ZDnldDrives$,1) + _
  707.                                  CHR$(58)                            ' DD021301
  708.     ZUpldDir$ = ZUpldDir$ + _
  709.                         CHR$(46) + _                                 ' DD021301
  710.                         ZMainDirExtension$
  711.     CALL SearchArray (ZSubDir$(ZSubDirCount),ZSubDir$(),ZSubDirCount-1,Found)
  712.     ZCanDnldFromUp = (Found > 0)
  713.     ZUpldDir$ = ZUpldPath$ + _
  714.                         ZUpldDir$
  715. * REPLACING old line(s) by new
  716. 126 CLOSE #2
  717. * ------[ first line different ]------
  718. '                                                                    ' DD030301/WILD
  719. ' *****  CHECK FOR WILDCARD DOWNLOAD SUPPORT ***                     ' DD030301/WILD
  720. '                                                                    ' DD030301/WILD
  721.     CALL FindIt (LEFT$(ZFastFileList$, _                             ' DD030301/WILD
  722.                  INSTR(ZFastFileList$, ".") -1) + ".CFG")            ' DD030301/WILD
  723.     IF ZOK THEN _                                                    ' DD030301/WILD
  724.        ZWildDownOK = ZTrue _                                         ' DD030301/WILD
  725.     ELSE _                                                           ' DD030301/WILD
  726.        ZWildDownOK = ZFalse                                          ' DD030301/WILD
  727. '   IF ZLibDrive$ <> "" THEN _                                       ' Mpl090202
  728. '      ZLibType = 1                                                  ' Mpl090202
  729. '   ZSubParm = -10                                                   ' Mpl090202
  730. '   CALL Carrier                                                     ' Mpl090202
  731. '   IF ZSubParm = -1 THEN _                                          ' Mpl090202
  732. '      IF ZLibDrive$ <> "" THEN _                                    ' Mpl090202
  733. '         CALL ChangeDir (ZLibDrive$ + _                             ' Mpl090202
  734. '                        CHR$(92)) : _                               ' DD021301
  735. '         CALL KillWork (ZLibWorkDiskPath$ + _                       ' Mpl090202
  736. '                       ZLibNodeID$ + _                              ' Mpl090202
  737. '                       "DK*.ARC") : _                               ' Mpl090202
  738. '                       ZErrCode = 0                                 ' Mpl090202
  739. '                                                                    ' DD052301
  740. ' ***** SET DESCRIPTION LENGTH FOR DOWNLOAD INFO IN FMS              ' DD052301
  741. '                                                                    ' DD052301
  742.     ZMaxDescLen = ZMaxDescLen - (5 * ZShowTimesDownloaded)           ' DD052301
  743. '
  744. ' ***  INITIALIZE OMNINET INTERFACE IF OMNINET IN USE  ***
  745. '
  746. * REPLACING old line(s) by new
  747. 237 LOCATE 18,76
  748.     IF ZDosANSI THEN _
  749. * ------[ first line different ]------
  750.        CALL LPrnt(ZEscape$ + "[1;37m" + "YES",0) _                   ' DD082703/MENU0
  751.     ELSE CALL LPrnt ("YES",0)                                        ' DD082703/MENU0
  752. '   COLOR ZFG,ZBG,ZBorder                                            ' DD070204
  753.     LOCATE 20,56,0                                                   ' DD082703/MENU0
  754. '
  755. '
  756. ' *  GET READY TO ANSWER INCOMMING CALL:
  757. ' *       1.  LET THE MODEM "AUTO-ANSWER" FOR RBBS-PC.
  758. ' *           REQUIRED RINGS = 0 AND S0 = 1 IN MODEM INIT COMMAND.
  759. ' *       2.  ANSWER THE MODEM ON A SPECIFIED NUMBER OF RINGS.
  760. ' *           REQUIRED RINGS > 0 AND S0 = 254 IN MODEM Init COMMAND.
  761. ' *       3.  ANSWER THE MODEM ON A SPECIFIED NUMBER OF RINGS AFTER A USER
  762. ' *           First CALLS AND THEN HANGS UP (I.E. RING-BACK).
  763. ' *           REQUIRED RINGS > 0 AND S0 = 255 IN MODEM INIT COMMAND.
  764. '
  765. '
  766.     WasQQ = 255
  767.     WasI = INSTR(ZModemInitCmd$,"S0")
  768.     IF WasI = 0 THEN _
  769.        GOTO 239
  770.     IF VAL(MID$(ZModemInitCmd$,WasI + 3,3)) = 255 THEN _
  771.        WasQQ = 0 : _
  772.        ZBlk = WasQQ
  773.     ZSecsUsedSession! = TIMER
  774.     ZSubParm = 1
  775.     CALL Line25
  776.     RingAnswer = ZTrue
  777.     IF RingBack THEN _
  778.        RingAnswer = ZFalse
  779. * REPLACING old line(s) by new
  780. 239 RingBackWaitStart! = 0
  781.     IF RingBack THEN _
  782.        RingBackWaitStart! = TIMER : _
  783. * ------[ first line different ]------
  784.     COLOR 7,0,0                                                      ' DD070204
  785. '   ELSE COLOR ZFG,ZBG,ZBorder                                       ' DD070204
  786. * REPLACING old line(s) by new
  787. 265    CALL CheckTime(ZSecsUsedSession!, TempElapsed!, 2)
  788. * ------[ first line different ]------
  789. '      IF TempElapsed! > 120 AND NOT ScreenCleared THEN _            ' DD082703/MENU0
  790. '         LOCATE ,,0 : _                                             ' DD082703/MENU0
  791. '         CLS : _                                                    ' DD082703/MENU0
  792. '         ZWasCL = 1 : _                                             ' DD082703/MENU0
  793. '         ScreenCleared = ZTrue : _                                  ' DD082703/MENU0
  794. '         ZSecsUsedSession! = TIMER                                  ' DD082703/MENU0
  795.        IF ZTimeToDropToDos! > 0 THEN _
  796.           IF ZOldDate$ <> DATE$ THEN _
  797.           IF TIMER => ZTimeToDropToDos! AND _
  798.              TIMER < 86340 THEN _      ' Skip btw 23:59 and 00:00
  799.                 ZSubParm = 7 : _
  800.                 EXIT SUB
  801. * REPLACING old line(s) by new
  802. 270    IF ZRecycleWait > 0 THEN _
  803.           CALL CheckTime(InactiveDelay!, TempElapsed!, 1) : _
  804.           IF TempElapsed! <= 0 THEN _
  805.              ZSubParm = 8 : _
  806.              EXIT SUB
  807.        CALL FlushCom (WasX$)
  808.        IF LEN(WasX$) > 0 THEN _
  809.           ModemResponse$ = ModemResponse$ + WasX$ : _
  810.           RingDetected = (INSTR(ModemResponse$,"RING") > 0) : _
  811.           ConnectDetected = (INSTR(ModemResponse$,"ONNECT") > 0) : _
  812.           NoCall = (NOT RingDetected) AND (NOT ConnectDetected)
  813.     IF RingDetected AND ZRequiredRings > 0 THEN _
  814. * ------[ first line different ]------
  815.        MID$(ModemResponse$, INSTR(ModemResponse$,"RING")+1,1) = CHR$(65) : _ ' DD021301
  816.        RingDetected = ZFalse : _
  817.        GOTO 276
  818.     CALL GoIdle
  819.     LOCATE 2,60,0                                                    ' DD082703/MENU0
  820.     WasX$ = DATE$                                                    ' DD082703/MENU0
  821.     CALL LPrnt(CHR$(27) + "[1;37m" + LEFT$(WasX$,6) + RIGHT$(WasX$,2),0) ' DD021301/MENU0
  822.     LOCATE 2,74,0                                                    ' DD082703/MENU0
  823.     CALL LPrnt(CHR$(27) + "[1;37m" + LEFT$(TIME$,5),0)               ' DD021301/MENU0
  824. '   COLOR ZFG,ZBG,ZBorder                                            ' DD070204
  825.     LOCATE 20,56,0                                                   ' DD082703/MENU0
  826.     GOTO 247
  827. * REPLACING old line(s) by new
  828. * ------[ first line different ]------
  829. 292 IF INSTR(WasX$,CHR$(48)) < 1 THEN _                          '0  ' DD021301
  830.        GOTO 293
  831.     WasX$ = MID$(WasX$,INSTR(WasX$,CHR$(48)),4)                      ' DD021301
  832. * REPLACING old line(s) by new
  833. * ------[ first line different ]------
  834. 675 ZOutTxt$ = ZFG7$ + "Enter Password"                              ' DD082704
  835.     ZHidden = ZTrue
  836.     CALL PopCmdStack
  837.     IF ZSubParm < 0 THEN _
  838.        ZPswdFailed = ZTrue : _
  839.        EXIT SUB
  840.     ZHidden = ZFalse
  841.     ZWasZ$ = ZUserIn$
  842.     ZOldPassword$ = ZUserIn$                                         ' DD091501/PSWD
  843. * REPLACING old line(s) by new
  844. * ------[ first line different ]------
  845. 680 CALL SkipLine (1)                                                ' DD031302
  846.     CALL QuickTPut1 (ZFGE$ + ZBG4$ + _                               ' DD031302
  847.          "Wrong password!" + ZFG7$ + ZBG0$)                          ' DD082702
  848.     ZLastIndex = 0
  849.     IF NOT ZMsgPswd THEN _
  850.        CALL UpdtCalr (ZActiveUserName$+" PW fail: " + ZWasZ$,1)
  851.     GOTO 670
  852.     END SUB
  853. * REPLACING old line(s) by new
  854. 949 ZLine25$ = "Node " + _
  855. * ------[ first line different ]------
  856.                ZNodeID$ + SPACE$(1) + _                              ' DD021301
  857.                ZPageStatus$ + SPACE$(1) + _                          ' DD021301
  858.                MID$("AVL ",1, -4 * ZSysopAvail) + _
  859.                MID$("ANY ",1, -4 * ZSysopAnnoy) + _
  860.                MID$("LPT ",1, -4 * ZPrinter) + _
  861.                MID$("SYS ",1, -4 * ZSysopNext) + _
  862.                MID$("XOFF ",1,-5 * ZXOffEd) + _
  863.                MID$("CTS ",1,-4 * ZNotCTS)
  864. '
  865. '
  866. ' *  LINE 25 UPDATE ROUTINE
  867. '
  868. '
  869. * REPLACING old line(s) by new
  870. 950 IF NOT ZSnoop THEN _
  871.        EXIT SUB
  872.     ZCursorLine = CSRLIN
  873.     ZCursorRow = POS(0)
  874. * ------[ first line different ]------
  875.     IF ZOrigUserName$ = "" THEN _                                    ' DD020901
  876.        Name$ = ZActiveUserName$ _                                    ' DD020901
  877.     ELSE _                                                           ' DD020901
  878.        Name$ = ZOrigUserName$                                        ' DD020901
  879.     ZWasHH = LEN(Name$) + _                                          ' DD020901
  880.          LEN(ZWasCI$) + _
  881.          LEN(ZLine25$) + _
  882.          LEN(STR$(ZUserSecLevel))+ _
  883.          LEN(STR$(INT(MinsRemaining))) + 2                           'Pe 05/29/91
  884.     LOCATE ZLocalPageLength,1                                        ' DD021903/VGA
  885.     IF ZNetworkType = 0 THEN _
  886.         ZLockStatus$ = SPACE$(2) + _                                 'Pe 05/29/91
  887.                        LEFT$(ZTimeLoggedOn$,5)                       'Pe 05/29/91
  888.     IF ZWasHH > 63 THEN _
  889.        ZWasHH = 0 _
  890.     ELSE _
  891.        ZWasHH = 64 - ZWasHH
  892.     ZLine25Hold$ = ZLine25$ + _
  893.                     SPACE$(ZWasHH) + _
  894.                     STR$(ZUserSecLevel) + _
  895.                     SPACE$(1) + _                                    ' DD021301
  896.                     Name$ + _                                        ' DD020901
  897.                     SPACE$(1) + _                                    ' DD021301
  898.                     ZWasCI$ + _
  899.                     SPACE$(1) + _                                    ' DD021301
  900.                     STR$(INT(MinsRemaining)) + _                     'Dgs-008
  901.                     SPACE$(1) + _                                    ' DD021301
  902.                     ZLockStatus$
  903.     ZLine25Hold$ = LEFT$(ZLine25Hold$, 66) + SPACE$(1) + ZLockStatus$' DD021301
  904.     IF ZDosANSI THEN _
  905.        ZLine25Hold$ = ZEmphasizeOnDef$ + ZLine25Hold$ + _            ' DD071003
  906.                       + ZEscape$ + "[K" + ZEscape$ + ZEmphasizeOffDef$ ' DD071003
  907.     CALL LPrnt(ZLine25Hold$,0)
  908.     LOCATE ZCursorLine,ZCursorRow
  909.     END SUB
  910. * REPLACING old line(s) by new
  911. 1240 IF LEN(ZWasZ$) < 1 THEN _
  912.         WhereFound = 0 : _
  913.         EXIT SUB
  914.      CALL Trim (ZWasZ$)
  915.      CALL AllCaps (ZWasZ$)
  916.      ZWasY$ = LEFT$(ZWasZ$,1)
  917.      WhereFound = INSTR(StartPos,ZAllOpts$,ZWasY$)
  918.      IF WhereFound = 0 THEN _  'Not found: decide whether to hunt further
  919.         IF StartPos < 2 OR ZRestrictValidCmds THEN _
  920.            GOTO 1242 _  ' fully searched or restricted
  921.         ELSE WhereFound = INSTR(1,ZAllOpts$,ZWasY$) : _ 'hunt further
  922.              GOTO 1242
  923. * ------[ first line different ]------
  924.      IF WhereFound => ZBegLibrary THEN _            'commented out if zlibtype ' DD071001
  925.         IF WhereFound < LEN(ZAllOpts$) - 11 THEN _                   ' DD071001
  926.            WhereFound = INSTR(WhereFound+1,AllOpt$,ZWasY$) : _       ' DD071001
  927.            IF WhereFound = 0 THEN _                                  ' DD071001
  928.               WhereFound = INSTR(1,ZAllOpts$,ZWasY$) : _             ' DD071001
  929.               IF WhereFound >= ZBegLibrary OR WhereFound = 0 THEN _  ' DD071001
  930.                  WhereFound = 0 : _                                  ' DD071001
  931.                  GOTO 1242                                           ' DD071001
  932.      IF NOT ZRestrictValidCmds THEN _
  933.         GOTO 1242            ' everything found valid
  934. '
  935. '
  936. ' * RESTRICT COMMANDS TO SUBSYSTEMS (EXCEPT GLOBAL AND SYSOP)
  937. '
  938. '
  939.      IF WhereFound > LEN(ZAllOpts$) - 12 THEN _                      ' DD020602/SFILE
  940.         IF ZUserSecLevel < ZOptSec(WhereFound) THEN _
  941.            WhereFound = 0 : _
  942.            EXIT SUB _
  943.         ELSE GOTO 1242
  944.      IF MID$(ZOrigCommands$,WhereFound,1) = CHR$(71) THEN _    'G    ' DD021301
  945.         GOTO 1242          ' ACCEPT GOODBYE/GRAPHICS
  946.      IF (WhereFound < StartPos) OR _
  947.         (StartPos < ZBegFile AND WhereFound => ZBegFile ) OR _
  948.         (StartPos < ZBegUtil AND WhereFound => ZBegUtil ) OR _
  949.         (StartPos < ZBegLibrary AND WhereFound => ZBegLibrary ) THEN _
  950.            WhereFound = 0                 ' REJECT: NOT IN Section
  951. * REPLACING old line(s) by new
  952. 1320 ' $SUBTITLE: 'CheckMacro - sub to check if macro exists & process'
  953. ' $PAGE
  954. '
  955. '  NAME    -- CheckMacro
  956. '
  957. '  INPUTS  -- PARAMETER             MEANING
  958. '             Strng$               STRING TO CHECK IF IS A MACRO
  959. '             ZMacroDrvPath$       DRIVE/PATH WHERE MACROS ARE
  960. '             ZMacroExtension$     EXTENSION WasOF MACROS
  961. '             MACRO.OFF            FORCE NO MACRO TO BE Found
  962. '
  963. '  OUTPUTS -- MacroFound           WHETHER A MACRO WAS Found
  964. '             Strng$               SUBSTITUTE FOR COMMANDS
  965. '             ZCommPortStack$      REST OF MACRO
  966. '                                  0 IF NOT Found
  967. '
  968. '  PURPOSE -- Macro file is checked for security (1st line).
  969. '             2nd line is substituted for passed string
  970. '             and parsed.  Remaining part of macro put into
  971. '             stack to be executed.
  972. '
  973.      SUB CheckMacro (Strng$,MacroFound) STATIC
  974.      MacroFound = ZFalse
  975. * ------[ first line different ]------
  976.      IF ZMacroExtension$ = "" OR INSTR(Strng$,CHR$(46)) > 0 THEN _   ' DD021301
  977.         EXIT SUB
  978.      IF LEN(Strng$) < ZMacroMin THEN _
  979.         ZMacroMin = 1 : _
  980.         EXIT SUB
  981.      IF LEN(Strng$) = 1 THEN _
  982.         Temp$ = Strng$ : _
  983.         CALL AllCaps (Temp$) : _
  984.         IF INSTR(ZAllOpts$,Temp$) > 0 THEN _
  985.            EXIT SUB
  986.      CALL Macro (Strng$,MacroFound)
  987.      END SUB
  988. * REPLACING old line(s) by new
  989. 1325 ' $SUBTITLE: 'Macro - check if macro exists & process'
  990. ' $PAGE
  991. '
  992. '  NAME    -- Macro
  993. '
  994. '  INPUTS  -- PARAMETER             MEANING
  995. '             Strng$           STRING TO CHECK IF IS A MACRO
  996. '             ZMacroDrvPath$   DRIVE/PATH WHERE MACROS ARE
  997. '             ZMacroExtension$ EXTENSION OF MACROS
  998. '             MACRO.OFF        FORCE NO MACRO TO BE Found
  999. '
  1000. '  OUTPUTS -- MacroFound       WHETHER A MACRO WAS Found
  1001. '             Strng$           SUBSTITUTE FOR COMMANDS
  1002. '             ZCommPortStack$  REST OF MACRO
  1003. '                              0 IF NOT Found
  1004. '
  1005. '  PURPOSE -- Executes a macro if found.  Does not check if macro
  1006. '             letter uses a command.
  1007.      SUB Macro (Strng$,MacroFound) STATIC
  1008.      MacroFound = ZFalse
  1009.      FilName$ = Strng$
  1010.      CALL BreakFileName (FilName$,ZWasDF$,Prefix$,WasX$,ZFalse)
  1011.      IF WasX$ = "" THEN _
  1012.         FilName$ = Strng$ + ZMacroExtension$
  1013.      IF ZWasDF$ = "" THEN _
  1014.         FilName$ = ZMacroDrvPath$ + FilName$
  1015.      CALL BadFile (FilName$,ZWasA)
  1016.      IF ZWasA > 1 THEN _
  1017.         EXIT SUB
  1018.      CALL GRAPHICX (FilName$,6)
  1019.      IF NOT ZOK THEN _
  1020.         EXIT SUB
  1021.      CALL ReadDir (6,1)
  1022.      IF ZErrCode > 0 THEN _
  1023.         EXIT SUB
  1024.      CALL CheckInt (ZOutTxt$)
  1025.      IF ZErrCode > 0 OR ZUserSecLevel < ZTestedIntValue THEN _
  1026.         EXIT SUB
  1027. * ------[ first line different ]------
  1028.      ZWasA = INSTR(ZOutTxt$,CHR$(47))                    '/          ' DD021301
  1029.      IF ZWasA > 0 THEN _    ' Check macro contraint
  1030.         WasX$ = RIGHT$(ZOutTxt$,LEN(ZOutTxt$)-ZWasA) : _
  1031.         IF RIGHT$(WasX$,1) = CHR$(47) THEN _                         ' DD021301
  1032.            IF ZLastCommand$ <> LEFT$(WasX$,LEN(WasX$)-1) THEN _
  1033.               EXIT SUB _
  1034.            ELSE GOTO 1327 _
  1035.         ELSE IF LEFT$(ZLastCommand$,LEN(WasX$)) <> WasX$ THEN _
  1036.                 EXIT SUB
  1037. * REPLACING old line(s) by new
  1038. 1331 IF SotMenu THEN _
  1039.         ZFileName$ = HelpMenu$ : _
  1040.         GOSUB 1350 : _
  1041.         SotMenu = ZFalse
  1042.      ZAnsIndex = 1
  1043. * ------[ first line different ]------
  1044.      ZOutTxt$ = ZFGB$ + "Display Help for What Command? " + _        ' DD121501
  1045.                 ZFGE$ + CHR$(40) + ZFGF$ + ZBG1$ + "HELP" + ZBG0$ + _  ' DD021301
  1046.                 " for Menu" + ZFGE$ + CHR$(41) + ZEmphasizeOff$ + _  ' DD021301
  1047.                 ZPressEnterExpert$                                   ' DD121501
  1048.      ZSubParm = 1
  1049.      CALL TGet
  1050.      IF ZSubParm = -1 THEN _
  1051.         EXIT SUB
  1052.      IF ZWasQ = 0 THEN _
  1053.         EXIT SUB
  1054.      ZLastIndex = ZWasQ
  1055. * REPLACING old line(s) by new
  1056. 1332 ZWasZ$ = ZUserIn$(ZAnsIndex)
  1057.      CALL AllCaps (ZWasZ$)
  1058. * ------[ first line different ]------
  1059.      IF ZWasZ$ = CHR$(63) THEN _                      '?             ' DD021301
  1060.         ZWasZ$ = CHR$(72)                             'H             ' DD021301
  1061.      CALL BadFile (ZWasZ$,BadFileNameIndex)
  1062.      ON BadFileNameIndex GOTO 1333,1340,1340
  1063. * REPLACING old line(s) by new
  1064. * ------[ first line different ]------
  1065. 1336 IF NOT ZOK THEN                                                 ' DD070901
  1066.         ZOutTxt$ = "No help for " + _                                ' DD070901
  1067.              ZWasZ$                                                  ' DD070901
  1068.         CALL QuickTPut1 (ZOutTxt$)                                   ' DD070901
  1069.         CALL UpdtCalr (ZOutTxt$,2)                                   ' DD070901
  1070.         CALL SmartPause                                              ' BK070193
  1071.      END IF                                                          ' DD070901
  1072.      ZAnsIndex = ZAnsIndex + 1
  1073.      IF ZAnsIndex <= ZLastIndex THEN _
  1074.         GOTO 1332
  1075.      IF FastHelp THEN _
  1076.         FastHelp = ZFalse : _
  1077.         EXIT SUB
  1078.      GOTO 1331
  1079. * REPLACING old line(s) by new
  1080. 1380 ' $SUBTITLE: 'VIOLATION - handles all security violations'
  1081. ' $PAGE
  1082. '
  1083. '  NAME    -- SecViolation
  1084. '
  1085. '  INPUTS  --     PARAMETER                    MEANING
  1086. '
  1087. '  OUTPUTS -- ZCursorLine               CURRENT LINE ON SCREEN
  1088. '             ZCursorRow                CURRENT ROW ON ZCursorLine
  1089. '
  1090. '  PURPOSE -- Inform caller of security violation, augment count of
  1091. '             violations and determine whether too many occurred.
  1092. '
  1093.      SUB SecViolation STATIC
  1094.      CALL FlushKeys
  1095.      CALL BufFile (ZSecVioHelp$,WasX)
  1096. * ------[ first line different ]------
  1097.      IF NOT ZOK THEN                                                 ' DD070902
  1098.         CALL QuickTPut1 (ZFGE$ + ZBG4$ + "Sorry, " + ZFirstName$ + _ ' DD090602
  1099.                          ", action not permitted" + ZEmphasizeOff$)  ' DD090602
  1100.         CALL SmartPause                                              ' BK070193
  1101.      END IF                                                          ' DD070901
  1102.      CALL UpdtCalr ("SV!-" + ZViolation$,2)
  1103.      ZLastIndex = 0
  1104. '    CALL Muzak (3)                                                  ' DD062502
  1105.      ZViolationsThisSession = ZViolationsThisSession + 1
  1106.      IF ZMaxViolations = 0 OR ZViolationsThisSession <= ZMaxViolations THEN _
  1107.         EXIT SUB
  1108. * REPLACING old line(s) by new
  1109. 1385 IF ZUserFileIndex < 1 THEN _
  1110.         EXIT SUB
  1111. * ------[ first line different ]------
  1112.      ZOutTxt$ = ZFGE$ + ZBG4$ + _                                    ' DD090602
  1113.           "Security Violation!  Sysop can reinstate you." + _        ' DD090602
  1114.           ZEmphasizeOff$                                             ' DD080301
  1115.      IF ZUserSecLevel <= ZMinLogonSec THEN _
  1116.         ZOutTxt$ = "" : _
  1117.         ZUserSecLevel = ZUserSecLevel - 1 _
  1118.      ELSE ZUserSecLevel = ZMinLogonSec
  1119.      ZDenyAccess = ZTrue
  1120.      END SUB
  1121. * REPLACING old line(s) by new
  1122. 1437 IF ZUpperCase THEN _
  1123. * ------[ first line different ]------
  1124.         IF ZWasGR < 2 THEN _                                         ' DD040201
  1125.            CALL AllCaps (ZOutTxt$)
  1126.      CALL PutCom (ZOutTxt$)
  1127. * REPLACING old line(s) by new
  1128. 1480 ' $SUBTITLE: 'LPrnt    - subroutine to write to display'
  1129. ' $PAGE
  1130. '
  1131. '  NAME    -- LPrnt
  1132. '
  1133. '  INPUTS  -- PARAMETER             MEANING
  1134. '             Strng$        STRING TO WRITE OUT
  1135. '             NumReturns   NUMBER OF CARRIAGE RETURNS
  1136. '
  1137. '  OUTPUTS -- NONE
  1138. '
  1139. '  PURPOSE -- Subroutine to write to the display.
  1140. '
  1141.       SUB LPrnt (Strng$,NumReturns) STATIC
  1142.       IF NOT ZSnoop THEN _
  1143.          EXIT SUB
  1144.       CALL PScrn (Strng$)
  1145. * ------[ first line different ]------
  1146. '     IF ZVoiceType <> 0 AND ZTalkAll THEN _                         ' DD060401
  1147. '        CALL Talk (65,Strng$)                                       ' DD060401
  1148.       FOR WasI = 1 TO NumReturns                                     ' DD050701/VGA
  1149.          LOCATE ,,1                                                  ' DD050701/VGA
  1150.          IF ZLocalPageLength = 50 THEN                               ' DD050701/VGA
  1151.             CALL VGAANSI(ZCrLf$,ZWasCL,ZWasCC)                       ' DD050701/VGA
  1152.          ELSEIF ZLocalPageLength = 43 THEN                           ' DD050701/VGA
  1153.             CALL EGAANSI(ZCrLf$,ZWasCL,ZWasCC)                       ' DD050701/VGA
  1154.          ELSE                                                        ' DD050701/VGA
  1155.             CALL ANSI(ZCrLf$,ZWasCL,ZWasCC)                          ' DD050701/VGA
  1156.          END IF                                                      ' DD050701/VGA
  1157.          LOCATE ZWasCL,ZWasCC                                        ' DD050701/VGA
  1158.       NEXT                                                           ' DD050701/VGA
  1159.       END SUB
  1160. * REPLACING old line(s) by new
  1161. 1483 ' $SUBTITLE: 'PScrn    - subroutine to print to the screen'
  1162. ' $PAGE
  1163. '
  1164. '  NAME    -- PScrn
  1165. '
  1166. '  INPUTS  -- PARAMETER             MEANING
  1167. '             Strng$        STRING TO WRITE OUT
  1168. '
  1169. '  OUTPUTS -- NONE
  1170. '
  1171. '  PURPOSE -- Writes to local screen regardless of whether you have
  1172. '             carrier.  Assumes have positioned cursor where you want.
  1173. '
  1174.       SUB PScrn (Strng$) STATIC
  1175.       IF Strng$ = "" THEN _
  1176.          EXIT SUB
  1177. * ------[ first line different ]------
  1178.       IF ZLocalPageLength = 50 THEN                                  ' DD050701/VGA
  1179.          CALL VGAANSI (Strng$,ZWasCL,ZWasCC)                         ' DD050701/VGA
  1180.       ELSEIF ZLocalPageLength = 43 THEN                              ' DD050701/VGA
  1181.          CALL EGAANSI (Strng$,ZWasCL,ZWasCC)                         ' DD050701/VGA
  1182.       ELSE                                                           ' DD050701/VGA
  1183.          CALL ANSI (Strng$,ZWasCL,ZWasCC)                            ' DD050701/VGA
  1184.       END IF                                                         ' DD050701/VGA
  1185.       LOCATE ZWasCL,ZWasCC
  1186.       END SUB
  1187. * REPLACING old line(s) by new
  1188. 1485 ' $SUBTITLE: 'SkipLine - sub to write a blank line to user'
  1189. ' $PAGE
  1190. '
  1191. '  NAME    -- SkipLine
  1192. '
  1193. '  INPUTS  --   PARAMETER             MEANING
  1194. '               ZLocalUser
  1195. '               ZModemStatusReg
  1196. '               NumReturns
  1197. '               ZReturnLineFeed$
  1198. '               ZSnoop
  1199. '
  1200. '  OUTPUTS -- NONE
  1201. '
  1202. '  PURPOSE -- Skip lines on the user's terminal
  1203. '
  1204.       SUB SkipLine (NumReturns) STATIC
  1205.       FOR WasI=1 TO NumReturns
  1206.           CALL PutCom (ZReturnLineFeed$)
  1207.       NEXT
  1208.       IF NOT ZSnoop THEN _
  1209.          GOTO 1486
  1210. * ------[ first line different ]------
  1211.       FOR WasI = 1 TO NumReturns                                     ' DD050701/VGA
  1212.          LOCATE ,,1                                                  ' DD050701/VGA
  1213.          IF ZLocalPageLength = 50 THEN                               ' DD050701/VGA
  1214.             CALL VGAANSI(ZCrLf$,ZWasCL,ZWasCC)                       ' DD050701/VGA
  1215.          ELSEIF ZLocalPageLength = 43 THEN                           ' DD050701/VGA
  1216.             CALL EGAANSI(ZCrLf$,ZWasCL,ZWasCC)                       ' DD050701/VGA
  1217.          ELSE                                                        ' DD050701/VGA
  1218.             CALL ANSI(ZCrLf$,ZWasCL,ZWasCC)                          ' DD050701/VGA
  1219.          END IF                                                      ' DD050701/VGA
  1220.          LOCATE ZWasCL,ZWasCC                                        ' DD050701/VGA
  1221.       NEXT
  1222. * REPLACING old line(s) by new
  1223. 1500 CALL Carrier
  1224.      IF ZSubParm = -1 THEN _
  1225.         EXIT SUB
  1226.      ZLinesPrinted = 0
  1227.      ZDisplayAsUnit = ZFalse
  1228.      InStack = ZFalse
  1229.      GOSUB 1580
  1230.      ZWasA = 0
  1231.      ZWasB = 0
  1232.      ZWasC = 0
  1233.      ZWasQ = 1
  1234.      ZStoreParseAt = 1
  1235.      ZYes = ZFalse
  1236.      ZUserIn$ = ""
  1237.      SleepWarn = ZTrue
  1238.      ZNo = ZFalse
  1239.      ZNonStop = (ZPageLength < 1)
  1240.      IF ZOutTxt$ = "" THEN _
  1241.         GOTO 1525
  1242.      IF ZHidden THEN _
  1243. * ------[ first line different ]------
  1244.         ZOutTxt$ = ZOutTxt$ + " (*'s echo)"                          ' DD022702
  1245.      IF (NOT ZVerifying) OR HoldA$ = "" THEN _
  1246.         CALL ColorPrompt (ZOutTxt$) : _
  1247.         ZOutTxt$ = ZOutTxt$ + _
  1248.              MID$("? !  ",2*ZTurboKey+1,2) : _
  1249.         HoldA$ = ZOutTxt$ _
  1250.      ELSE ZOutTxt$ = HoldA$
  1251.      ZSubParm = 4
  1252.      StopSave = ZStopInterrupts
  1253.      ZStopInterrupts = ZTrue
  1254.      CALL TPut
  1255.      ZStopInterrupts = StopSave
  1256.      IF ZSubParm = -1 OR ZFunctionKey <> 0 THEN _
  1257.         EXIT SUB
  1258. * REPLACING old line(s) by new
  1259. 1534 ZUserIn$ = ZOutTxt$   ' Not Macro command - pass to normal processing
  1260. * ------[ first line different ]------
  1261. ' * strip off leading slash when not in turbokey mode so macros can be
  1262. ' * written to work in both turbo and non-turbo-key mode
  1263.      IF LEFT$(ZUserIn$,1) = CHR$(47) THEN IF NOT ZTurboKeyUser THEN _ ' DD021301
  1264.         ZUserIn$ = RIGHT$(ZUserIn$,LEN(ZUserIn$)-1) : _              ' KG092301
  1265.         ZTurboKey = ZFalse                                           ' KG092301
  1266.      IF ZMacroEcho THEN _
  1267.         ZSubParm = 4 : _
  1268.         CALL TPut
  1269.      WasX$ = ZCarriageReturn$
  1270.      GOTO 1547
  1271. * REPLACING old line(s) by new
  1272. 1537 CALL CheckTime(ZAutoLogoff!, TempElapsed!, 3)
  1273.      IF TempElapsed! < 30 THEN _
  1274.         IF TempElapsed! <= 0 THEN _
  1275.            CALL SkipLine (1) : _
  1276.            ZSubParm = -1 : _
  1277.            ZNo = ZTrue : _
  1278.            ZRet = ZTrue : _
  1279.            ZSleepDisconnect = NOT ZAutoLogoffReq : _
  1280. * ------[ first line different ]------
  1281.            IF ZAutoLogoffReq OR (ZAutoEnd = 1 AND ZDnldCompleted) THEN _' DD010204
  1282.               CALL UpdtCalr ("Auto-logoff",1) : _                    ' DD010204
  1283.               EXIT SUB _
  1284.            ELSE CALL UpdtCalr ("Sleep disconnect",1) : _
  1285.                 EXIT SUB _
  1286.         ELSE IF SleepWarn THEN _
  1287.                 SleepWarn = ZFalse : _
  1288.                 Temp! = TempElapsed! : _
  1289.                 CALL SkipLine (2) : _                                ' DD090801
  1290.                 CALL QuickTPut (ZFGF$ + ZBG2$ + _                    ' DD090801
  1291.                                  "Auto-Logoff Counter Active!" + _   ' DD090801
  1292.                                  ZBG0$,0) : _                        ' DD090801
  1293.                 ZOutTxt$ = "" : _                                    ' DD090801
  1294.                 CALL RingCaller : _
  1295.                 CALL QuickTput (ZFGF$ + "Press " + ZFGE$ + _         ' DD090801
  1296.                                 ZBG1$ + " ENTER " + ZFGF$ + _        ' DD090801
  1297.                                 ZBG0$ + " to Abort!    " + _         ' DD090801
  1298.                                 ZEmphasizeOff$,0) _                  ' DD090801
  1299.              ELSE IF Temp! - TempElapsed! > 1.0 THEN _
  1300.                      CALL QuickTPut (ZBackSpace$+ZBackSpace$,0) : _
  1301.                      CALL QuickTPut (ZFGE$ + ZBG4$ + _               ' DD090801
  1302.                                      RIGHT$(STR$(CINT(TempElapsed!)),2) + _' DD090801
  1303.                                      ZFG7$ + ZBG0$,0) : _            ' DD090801
  1304.                      Temp! = TempElapsed!
  1305.      CALL FindFKey
  1306.      IF ZSubParm < 0 THEN _
  1307.         EXIT SUB
  1308. * REPLACING old line(s) by new
  1309. 1542 IF ZWasY$ = "" THEN _
  1310. * ------[ first line different ]------
  1311.         ZWasY$ = SPACE$(1)                                           ' DD021301
  1312.      IF ASC(ZWasY$) = 141 THEN _
  1313.         OUT ZLineCntlReg,&H1A : _
  1314.         ZEightBit = ZFalse : _
  1315.         ZTestParity = ZFalse : _
  1316.         ZWasGR = ZFalse
  1317.      ZWasY$ = CHR$(ASC(ZWasY$) AND 127)
  1318. * REPLACING old line(s) by new
  1319. 1545 WasX$ = ZWasY$
  1320.      ZAutoLogoffReq = ZFalse
  1321.      IF INSTR(ZLineEditChk$,ZWasY$) > 5 _
  1322.         GOTO 1635
  1323. * ------[ first line different ]------
  1324.      IF ZWasY$ < SPACE$(1) AND ZWasY$ <> ZCarriageReturn$ THEN _     ' DD021301
  1325.         GOTO 1525
  1326.      IF ZWasY$ = CHR$(94) THEN _                           '^        ' DD021301
  1327.         GOTO 1525
  1328.      IF ZWasY$ = ZCarriageReturn$ THEN _
  1329.         GOTO 1547 _
  1330.      ELSE GOSUB 1550
  1331.      IF ZTurboKey < 1 THEN _
  1332.         GOTO 1546
  1333.      IF ZWasY$ = SPACE$(1) THEN _                                    ' DD021301
  1334.         ZWasY$ = ""
  1335.      IF ZWasY$ <> CHR$(47) THEN _                          '/        ' DD021301
  1336.         ZUserIn$ = ZWasY$ : _
  1337.         ZWasY$ = ZCarriageReturn$ : _
  1338.         WasX$ = ZWasY$ : _
  1339.         GOTO 1547
  1340.      ZTurboKey = 0
  1341.      GOTO 1525
  1342. * REPLACING old line(s) by new
  1343. * ------[ first line different ]------
  1344. 1549 IF INSTR(ZUserIn$,CHR$(59)) > 0 THEN _                ';        ' DD021301
  1345.         CALL ExcludeCount (CHR$(59),ZUserIn$,Temp) _                 ' DD021301
  1346.      ELSE IF INSTR(ZUserIn$,SPACE$(1)) > 0 THEN _                    ' DD021301
  1347.         CALL ExcludeCount (SPACE$(1),ZUserIn$,Temp) _                ' DD021301
  1348.      ELSE Temp = 0
  1349.      RETURN
  1350. * REPLACING old line(s) by new
  1351. 1550 IF ZLogonActive THEN _
  1352.         GOSUB 1549 : _
  1353.         ZHidden = (Temp = 2 - (ZLenIndiv > 0 AND ZStartIndiv > 0))
  1354.      IF ZHidden THEN _
  1355. * ------[ first line different ]------
  1356.         IF (WasX$ <> SPACE$(1) AND WasX$ <> CHR$(59)) THEN _         ' DD021301
  1357.            WasX$ = CHR$(42)                                          ' DD022702
  1358.      CALL LPrnt(WasX$,0)
  1359.      GOTO 1551                                                       ' Mpl090202
  1360.      IF ZHidden AND (WasX$ <> SPACE$(1)) THEN _                      ' DD021301
  1361.         WasX$ = CHR$(42)                                             ' DD022702
  1362.      CALL LPrnt(WasX$,0)                                             ' Mpl090202
  1363. * REPLACING old line(s) by new
  1364. 1551 IF NOT SendRemote THEN _
  1365.         RETURN
  1366. * ------[ first line different ]------
  1367.      IF ZHidden AND (WasX$ <> SPACE$(1)) THEN _                      ' DD021301
  1368.         WasX$ = CHR$(42)                                             ' DD022702
  1369. * REPLACING old line(s) by new
  1370. 1575 IF LEN(ZUserIn$) > 4000 THEN _
  1371. * ------[ first line different ]------
  1372.         ZOutTxt$ = "TOO LONG!  Try again, " + _                      ' DD022701
  1373.              ZFirstName$ + CHR$(46) : _                              ' DD021301
  1374.         ZSubParm = 5 : _
  1375.         CALL TPut : _
  1376.         IF ZSubParm = -1 OR ZFunctionKey <> 0 THEN _
  1377.            EXIT SUB _
  1378.         ELSE GOTO 1500
  1379.      IF ZParseOff THEN _
  1380.         ZParseOff = ZFalse : _
  1381.         GOTO 1620
  1382.      CALL ParseIt
  1383.      IF ZWasQ = 1 THEN _
  1384.         GOTO 1622
  1385.      GOTO 1625
  1386. * REPLACING old line(s) by new
  1387. 1580 ZAutoLogoff! = TIMER + ZWaitBeforeDisconnect
  1388.      IF ZAutoLogoffReq OR ZWaitExpired THEN _
  1389.         ZWaitExpired = ZFalse : _
  1390.         IF NOT ZSuspendAutologoff THEN _
  1391. * ------[ first line different ]------
  1392.            ZAutoLogoff! = TIMER + 15                                 'Pe 10/20/91
  1393.      RETURN
  1394. * REPLACING old line(s) by new
  1395. 1625 IF LEN(ZUserIn$) < 4 THEN _
  1396.         WasX$ = LEFT$(ZUserIn$,3): _
  1397.         CALL AllCaps (WasX$) : _
  1398.         ZYes = (INSTR("YES",WasX$) = 1) : _
  1399. * ------[ first line different ]------
  1400.         ZNo = (INSTR("NO",WasX$) = 1 OR WasX$ = CHR$(65) OR WasX$ = CHR$(81)) : _ ' DD021301
  1401.         ZReply = (WasX$ = "RE") OR ZReply : _
  1402.         ZKillMessage = (WasX$ = CHR$(75)) OR ZKillMessage   'K       ' DD021301
  1403.      ZHidden = ZFalse
  1404. * REPLACING old line(s) by new
  1405. 1628 CALL VerifyAns
  1406.      IF NOT ZOK THEN _
  1407. * ------[ first line different ]------
  1408.         CALL QuickTPut1 ("Invalid answer <" + ZUserIn$(1) + CHR$(62)) : _ ' DD021301
  1409.         GOTO 1500
  1410.      HoldA$ = ""
  1411.      ZForceKeyboard = ZFalse
  1412.      IF ZMacroSave > 0 THEN _
  1413.         ZGSRAra$(ZMacroSave) = ZUserIn$ : _
  1414.         ZMacroSave = 0 : _
  1415.         GOTO 1632
  1416.      IF (ZDistantTGet > 0) OR (ZMacroTemplate$ <> "") THEN _
  1417.         CALL WipeLine (38) : _
  1418.         IF NOT ZNo THEN _
  1419.            GOTO 1632 _
  1420.         ELSE ZWasQ = 0 : _
  1421.              ZMacroTemplate$ = "" : _
  1422.              ZDistantTGet = 0 : _
  1423.              ZNo = ZFalse : _
  1424.              GOTO 1633
  1425.      IF ZMacroActive THEN _
  1426.         ZLastIndex = ZWasQ : _
  1427.         FirstIndex = 1: _
  1428.         ZMacroActive = NOT EOF(6) : _
  1429.         EXIT SUB
  1430.      IF ZAnsIndex > 255 OR ((NOT InStack) AND INSTR(ZUserIn$,CHR$(46)) > 0) THEN _ ' DD021301
  1431.         EXIT SUB
  1432.      IF MacroIndex OR ZSubParm < 3 THEN _
  1433.         MacroIndex = 1 _
  1434.      ELSE MacroIndex = ZAnsIndex
  1435.      CALL NoPath (ZUserIn$(MacroIndex),Found)
  1436.      IF Found THEN _
  1437.         EXIT SUB
  1438.      CALL CheckMacro (ZUserIn$(MacroIndex),Found)
  1439.      IF Found THEN _
  1440.         ZStoreParseAt = ZAnsIndex : _
  1441.         GOTO 1525
  1442.      EXIT SUB
  1443. * REPLACING old line(s) by new
  1444. 1637 ' $SUBTITLE: 'ParseIt - subroutine to parse a string'
  1445. ' $PAGE
  1446. '
  1447. '  NAME    -- ParseIt
  1448. '
  1449. '  INPUTS  --     PARAMETER              MEANING
  1450. '                 ZUserIn$             STRING TO PARSE
  1451. '                 ZSemiOnly            Only parse using semi-colon
  1452. '
  1453. '  OUTPUTS --  ZWasQ                   NUMBER PARSED
  1454. '              ZUserIn$()              PARSED STRINGS
  1455. '
  1456. '  PURPOSE --  To parse a string into pieces.  Uses semicolon
  1457. '              if exists, otherwise space, otherwise comma
  1458. '
  1459.      SUB ParseIt STATIC
  1460. * ------[ first line different ]------
  1461.      ZWasA = INSTR(ZUserIn$,CHR$(59))              ';                ' DD021301
  1462.      IF ZWasA > 0 THEN _
  1463.         ParseChar$ = CHR$(59) _                                      ' DD021301
  1464.      ELSE IF ZSemiOnly THEN _
  1465.              ZSemiOnly = ZFalse : _
  1466.              GOTO 1638 _
  1467.           ELSE IF ZUserIn$ <> SPACE$(LEN(ZUserIn$)) THEN _
  1468.              CALL Trim (ZUserIn$) : _
  1469.              WasX$ = ZUserIn$ : _
  1470.              ZWasA = INSTR(ZUserIn$,SPACE$(2)) : _                   ' DD021301
  1471.              WHILE ZWasA > 0 : _
  1472.                 ZUserIn$ = LEFT$(ZUserIn$,ZWasA - 1) + _
  1473.                      MID$(ZUserIn$,ZWasA + 1) : _
  1474.                 ZWasA = INSTR(ZWasA,ZUserIn$,SPACE$(2)) : _          ' DD021301
  1475.              WEND : _
  1476.              ZWasA = INSTR(ZUserIn$,SPACE$(1)) : _                   ' DD021301
  1477.              IF ZWasA > 1 THEN _
  1478.                 ParseChar$ = SPACE$(1) _                             ' DD021301
  1479.              ELSE ZWasA = INSTR(ZUserIn$,CHR$(44)) : _    ',         ' DD021301
  1480.                   ParseChar$ = CHR$(44)                              ' DD021301
  1481.      IF ZWasA > 1 THEN _
  1482.         GOTO 1639
  1483. * REPLACING old line(s) by new
  1484. 1638 ZWasDF$ = ZUserIn$
  1485.      CALL AllCaps (ZWasDF$)
  1486.      IF ZWasDF$ = "NS" THEN _
  1487. * ------[ first line different ]------
  1488.          ZUserIn$ = CHR$(67) : _                          'C         ' DD021301
  1489.          ZNonStop = ZTrue
  1490.      ZUserIn$(ZStoreParseAt) = ZUserIn$
  1491.      ZNonStop = ZNonStop OR (ZWasDF$ = CHR$(67) AND NOT ZStackC)     ' DD021301
  1492.      IF ZAutoEnd = 3 THEN _                                          'Pe 10/20/91
  1493.         ZNonStop = ZFalse                                            'Pe 10/20/91
  1494.      GOTO 1642
  1495. * REPLACING old line(s) by new
  1496. 1640 ZWasB = INSTR(ZWasA,ZUserIn$,ParseChar$)
  1497.      ZWasC = ZWasB-ZWasA
  1498.      IF ZWasC < 1 THEN _
  1499.         ZEOL = ZTrue : _
  1500.         ZWasC = 128
  1501.      ZWasDF$ = MID$(ZUserIn$,ZWasA,ZWasC)
  1502.      IF ZWasDF$ = "" THEN GOTO 1641
  1503.         ZWasQ = ZWasQ + 1
  1504.         ZStoreParseAt = ZStoreParseAt + 1
  1505.         ZUserIn$(ZStoreParseAt) = ZWasDF$
  1506.         CALL AllCaps(ZWasDF$)
  1507. * ------[ first line different ]------
  1508.         WasX = INSTR(";NS;/G;C;",CHR$(59)+ZWasDF$+CHR$(59))          ' DD021301
  1509.         IF WasX = 0 THEN GOTO 1641
  1510.            ZNonStop = ZNonStop OR (WasX = 1) OR (WasX = 7 AND NOT ZStackC)
  1511.      IF ZStoreParseAt > 1 THEN IF INSTR("Jj",ZUserIn$(ZStoreParseAt-1)) THEN _
  1512.         ZNonStop = (ZPageLength < 1)
  1513.      IF ZAutoEnd = 3 THEN _                                          'Pe 10/20/91
  1514.         ZNonStop = ZFalse                                            'Pe 10/20/91
  1515.      ZAutoLogoffReq = ZAutoLogoffReq OR (WasX = 4)                   ' DD063003
  1516.      IF ZAutoLogoffReq THEN                                          ' DD063003
  1517.         IF INSTR(UCASE$(ZUserIn$)," F D ") OR _                      ' DD063003
  1518.            INSTR(UCASE$(ZUserIn$),",F,D,") OR _                      ' DD063003
  1519.            INSTR(UCASE$(ZUserIn$),";F;D;") THEN                      ' DD063003
  1520.            LogOffType$ = "TRANSFER "                                 ' DD063003
  1521.         ELSE                                                         ' DD063003
  1522.            LogOffType$ = "DOOR "                                     ' DD063003
  1523.         END IF                                                       ' DD063003
  1524.         IF ZFileSysParm > 0 THEN                                     ' DD063003
  1525.            LogoffType$ = "TRANSFER "                                 ' DD063003
  1526.         END IF                                                       ' DD063003
  1527.         CALL QuickTPut1 (ZFG9$ + "Automatic LogOff " + _             ' DD050301
  1528.                         "if " + _                                    ' DD050301
  1529.                         ZFGB$ + LogoffType$ + _                      ' DD063003
  1530.                         ZFG9$ + "Successful" + ZEmphasizeOff$)       ' DD050301
  1531.      END IF                                                          ' DD063003
  1532.            IF ZWasQ > 0 AND WasX < 7 THEN _
  1533.               ZWasQ = ZWasQ - 1 : _
  1534.               ZStoreParseAt = ZStoreParseAt - 1
  1535. * REPLACING old line(s) by new
  1536. 1641 IF NOT ZEOL AND ZWasQ < 50 THEN _
  1537.         ZWasA = ZWasB + 1 : _
  1538.         GOTO 1640
  1539. * ------[ first line different ]------
  1540.      IF ParseChar$ <> CHR$(59) THEN _                    ';          ' DD021301
  1541.         ZUserIn$ = WasX$
  1542. * REPLACING old line(s) by new
  1543. 1651 IF ZAnsIndex < ZLastIndex THEN _
  1544.         ZAnsIndex = ZAnsIndex + 1 : _
  1545.         ZUserIn$ = ZUserIn$(ZAnsIndex) : _
  1546. * ------[ first line different ]------
  1547.         IF MID$(ZLastCommand$,2,1) <> SPACE$(1) AND (NOT ZStackC) AND ZAnsIndex > 1 AND INSTR("Cc",ZUserIn$) > 0 AND LEN(ZUserIn$) = 1 THEN _ ' DD021301
  1548.            GOTO 1651 _
  1549.         ELSE ZSubParm = 3 : _
  1550.              ZTurboKey = 0 : _
  1551.              CALL TGet : _
  1552.              GOTO 1652
  1553.      ZLastIndex = 0
  1554.      ZAnsIndex = 1
  1555.      ZSubParm = 1
  1556.      ZSearchingAll = ZFalse
  1557.      CALL TGet
  1558.      ZLastIndex = ZWasQ
  1559. * REPLACING old line(s) by new
  1560. 1654 ' $SUBTITLE: 'SetBaud - sub to set the baud rate in the RS232'
  1561. ' $PAGE
  1562. '
  1563. '  NAME    -- SetBaud
  1564. '
  1565. '  INPUTS  --     PARAMETER                    MEANING
  1566. '             ZBaudRateDivisor   NUMBER TO DIVIDE THE 8250 CHIP'S
  1567. '                                 PROGRAMABLE CLOCK TO ADJUST THE
  1568. '                                 BAUD RATE TO THE USER'S BAUD
  1569. '                                 RATE (INDEPENDENT OF THE BAUD
  1570. '                                 RATE USED TO OPEN THE COMM. PORT)
  1571. '
  1572. '        DESIRED BAUD        DIVISIOR (DECIMAL) TO OBTAIN DESIRED BAUD RATE
  1573. '            RATE              PCjr         PC AND XT
  1574. '              50             2237             2304
  1575. '              75             1491             1536
  1576. '             110             1017             1047
  1577. '             134.5            832              857
  1578. '             150              746              768
  1579. '             300              373              384
  1580. '             600              186              192
  1581. '            1200               93               96
  1582. '            1800               62               64
  1583. '            2000               56               58
  1584. '            2400               47               48
  1585. '            3600               31               32
  1586. '            4800               23               24
  1587. '            7200          not available         16
  1588. '            9600          not available         12
  1589. * ------[ first line different ]------
  1590. '           14400          not available          8                  ' Mpl090202
  1591. '           16800          not available          7                  ' BK070193
  1592. '           19200          not available          6
  1593. '           38400               "                 3
  1594. '  OUTPUTS -- BAUD RATE SET IN THE RS232 INTERFACE
  1595. '
  1596. '  PURPOSE -- To set the baud rate in the RS232 interface
  1597. '             inpependent of the baud rate the communications port
  1598. '             was opened at
  1599. '
  1600.       SUB SetBaud STATIC
  1601.      IF ZCBaud$ = "" THEN _
  1602.         ZCBaud$ = MID$(ZBaudRates$,(-5 * ZBPS),5) : _                ' BH070401
  1603.         CALL Trim (ZCBaud$)                                          ' BH070401
  1604.      Temp! = VAL(ZCBaud$)
  1605.      IF Temp! > 0 THEN CALL SetBPS (Temp!,ZCBPS)
  1606.      IF (ZCBPS = 0 OR Temp! = 0) THEN ZCBPS = ZBPS
  1607.      IF NOT ZKeepInitBaud THEN _
  1608.         ZTalkToModemAt$ =  MID$(ZBaudRates$,(-5 * ZBPS),5) _
  1609.      ELSE ZTalkToModemAt$ = ZModemInitBaud$
  1610.      CALL Trim (ZTalkToModemAt$)
  1611.      IF LEN(ZTalkToModemAt$) < 5 THEN _
  1612.         ZTalkToModemAt$ = SPACE$(4 - LEN(ZTalkToModemAt$)) + _
  1613.                             ZTalkToModemAt$
  1614.      IF ZEightBit THEN_
  1615.         Parity = 2 : _                                    ' No PARITY
  1616.         DataBits = 3 : _                                  ' 8 DATA BITS
  1617.         StopBits = 0 _                                    ' 1 STOP BIT
  1618.      ELSE Parity = 3 : _                                  ' EVEN PARITY
  1619.           DataBits = 2 : _                                ' 7 DATA BITS
  1620.           StopBits = 0                                    ' 1 STOP BIT
  1621.      ComSpeed! = VAL(ZTalkToModemAt$)
  1622.      IF ComSpeed! > 19200 THEN _
  1623.         IF ZFossil THEN _
  1624.            WasI = &H9600 _
  1625.         ELSE WasI = 19200 _
  1626.      ELSE WasI = ComSpeed!
  1627.      IF ZFossil THEN _
  1628.         CALL FosSpeed(ZComPort,WasI,Parity,DataBits,StopBits) : _
  1629.         EXIT SUB
  1630.      IF ComSpeed! = 2400 THEN _
  1631.         ZBaudRateDivisor = &H30 _                                    ' DD052301
  1632.      ELSE IF ComSpeed! = 1200 THEN _
  1633.         ZBaudRateDivisor = &H60 _                                    ' DD052301
  1634.      ELSE IF ComSpeed! = 9600 THEN _
  1635.         ZBaudRateDivisor = &HC _
  1636.      ELSE IF ComSpeed! = 300 THEN _
  1637.         ZBaudRateDivisor = &H180 _                                   ' DD052301
  1638.      ELSE IF ComSpeed! = 450 THEN _
  1639.         ZBaudRateDivisor = &H100 _                                   ' DD052301
  1640.      ELSE IF ComSpeed! = 4800 THEN _
  1641.         ZBaudRateDivisor = &H18 _
  1642.      ELSE IF ComSpeed! = 7200 THEN _                                 ' DD070903
  1643.         ZBaudRateDivisor = &H10 _                                    ' DD070903
  1644.      ELSE IF ComSpeed! = 12000 THEN _                                ' DD070903
  1645.         ZBaudRateDivisor = &HA _                                     ' DD070903
  1646.      ELSE IF ComSpeed! = 14400 THEN _                                ' DD070903
  1647.         ZBaudRateDivisor = &H8 _                                     ' DD070903
  1648.      ELSE IF ComSpeed! = 16800 THEN _                                ' BK070193
  1649.         ZBaudRateDivisor = &H7 _                                     ' BK070193
  1650.      ELSE IF ComSpeed! = 19200 THEN _
  1651.         ZBaudRateDivisor = &H6 _
  1652.      ELSE IF ComSpeed! = 38400 THEN _
  1653.         ZBaudRateDivisor = &H3
  1654.      MostSignifByte = FIX (ZBaudRateDivisor / 256)
  1655.      LeastSignifByte = ZBaudRateDivisor - (MostSignifByte * 256)
  1656.      LineCntlStatus = INP(ZLineCntlReg)
  1657.      MSBSave = INP(ZMSB)
  1658.      OUT ZMSB,0
  1659.      OUT ZLineCntlReg,LineCntlStatus OR 128
  1660.      OUT ZLSB,LeastSignifByte
  1661.      OUT ZMSB,MostSignifByte
  1662.      OUT ZLineCntlReg,LineCntlStatus
  1663.      OUT ZMSB,MSBSave
  1664.      END SUB
  1665. * REPLACING old line(s) by new
  1666. 2018 ' $SUBTITLE: 'SetWhoTo - subroutine to get who a msg/upload is to'
  1667. ' $PAGE
  1668. '
  1669. '  NAME    -- SetWhoTo
  1670. '
  1671. '  INPUTS  --     PARAMETER                    MEANING
  1672. '              HighestUserRecord
  1673. '
  1674. '  OUTPUTS --  MsgTo$              Who message is to
  1675. '              RcvrRecNum         User record # of who to
  1676. '
  1677. '  PURPOSE --  Asks who a message/upload is to and checks if receiver exists
  1678. '
  1679. * ------[ first line different ]------
  1680.      SUB SetWhoTo (EnableCC,MsgTo$,MsgFrom$,RcvrRecNum,Found,AllowPub) STATIC ' KG012502
  1681.      Temp$ = MsgFrom$
  1682.      CALL Trim (Temp$)
  1683.      ZNumHeaders = 0
  1684.      CALL KillWork (ZNodeWorkFile$)
  1685. * REPLACING old line(s) by new
  1686. * ------[ first line different ]------
  1687. 2021 ZOutTxt$ = "To " + LEFT$("[A]ll,",-6*AllowPub) + "(S)ysop," + _ ' DD031501
  1688.                  LEFT$("D)istribution,",-14*EnableCC) + _
  1689.                  " or Full or Partial Name"                          ' DD031501
  1690. '    CALL SkipLine (1)                                               ' DD020701
  1691.      ZSemiOnly = ZTrue
  1692.      CALL PopCmdStack
  1693.      IF ZSubParm < 0 THEN _                                          ' DD031501
  1694.         GOTO 2033                                                    ' KG022501
  1695.      IF NOT ZSysop THEN _                                            'SM091908
  1696.         CALL SmartText(ZUserIn$,ZFalse,ZFalse,ZFalse)                'Pe 02/06/93
  1697.      IF LEN(ZUserIn$(ZAnsIndex)) > 30 THEN _
  1698.         CALL QuickTPut1 ("30 Char. Max") : _
  1699.         GOTO 2021
  1700.      Found = ZTrue
  1701.      IF ZWasQ = 0 THEN _
  1702.          MsgTo$ = "ALL" : _                                          'Pe 12/08/91
  1703.            GOTO 2032 _                                               'Pe 12/08/91
  1704.      ELSE ZWasDF$ = ZUserIn$(ZAnsIndex) : _
  1705.           CALL Remove (ZWasDF$,CHR$(44)) : _                         ' DD042901
  1706.           CALL AllCaps (ZWasDF$) : _
  1707.           CALL Trim (ZWasDF$) : _                                    ' DD082301
  1708.           ZUserIn$(ZAnsIndex) = ZWasDF$ : _
  1709.           MsgTo$ = ZWasDF$ : _                                       'Pe Efnd mod
  1710.           IF ZWasDF$ = CHR$(65) AND AllowPub THEN _   'A             ' DD031501
  1711.              MsgTo$ = "ALL" _
  1712.           ELSE IF ZWasDF$ = CHR$(83) THEN _           'S             ' DD021301
  1713.              MsgTo$ = ZSysopFirstName$ + SPACE$(1) +ZSysopLastName$ _ ' DD021301
  1714.           ELSE IF ZWasDF$ = CHR$(68) AND EnableCC THEN _ 'D          ' DD021301
  1715.              GOTO 2025 _
  1716.           ELSE MsgTo$ = ZWasDF$                                      ' Mpl090202
  1717.      IF ZWasDF$ = CHR$(83) THEN _                                    ' DD030101
  1718.         IF UCASE$(ZSecretName$) = LEFT$(MsgTo$,LEN(MsgTo$)-1) THEN _ ' DD030101
  1719.            MsgTo$ = LEFT$(MsgTo$,LEN(Msgto$)-1)                      ' DD030101
  1720.      GOTO 2032
  1721. * REPLACING old line(s) by new
  1722. 2026 ZFileName$ = ZDistriPath$ + ZFileName$ + ".LST"
  1723.      CALL FindItX (ZFileName$,7)
  1724.      IF NOT ZOK THEN _
  1725.         CALL QuickTPUT1 (ZUserIn$ + " not found") : _
  1726. * ------[ first line different ]------
  1727.         ZMplPersUpload = ZFalse : _                                  ' Mpl090202
  1728.         GOTO 2024
  1729.      ZNumHeaders = 0
  1730.      ZMplPersUpload = ZTrue                                          ' Mpl090202
  1731.      CALL OpenWorkA (2,ZNodeWorkFile$)                               ' DD040601
  1732.      WHILE NOT EOF(7)
  1733.         CALL ReadDir (7,1)
  1734.         CALL AllCaps (ZOutTxt$)
  1735.         ZWasDF$ = ZOutTxt$
  1736.         CALL WhoCheck (ZOutTxt$, Found, RcvrRecNum)
  1737.         ZNumHeaders = ZNumHeaders + 1
  1738.         CALL PrintWorkA (2,ZWasDF$ + CHR$(44) + STR$(-RcvrRecNum*Found)) ' DD040601
  1739.      WEND
  1740. '    CLOSE 7                                                         ' Mpl090202
  1741.      GOTO 2033
  1742. * REPLACING old line(s) by new
  1743. 2032 RcvrRecNum = 0
  1744. * ------[ first line different ]------
  1745.      ZMplPersUpload = ZFalse                                         ' Mpl090202
  1746.      IF MsgTo$ <> "ALL" OR NOT AllowPub THEN                         ' DD031501
  1747.         IF ((LEFT$(MsgTo$,4) <> "ALL " OR NOT AllowPub) AND ZStartHash = 1) THEN ' DD031501
  1748.            CALL CheckInt (MsgTo$)                                    ' DD031204
  1749.            IF ZTestedIntValue = 0 OR ZUserSecLevel < ZSysOpSecLevel OR _  ' DD031501
  1750.               (ZUserSecLevel >= ZSysOpSecLevel AND ZFileSysParm < 1) THEN ' DD031501
  1751.               ZWasDF = INSTR(MsgTo$+" @"," @")                       ' DD031204
  1752.               TempHashValue$ = LEFT$(MsgTo$,ZWasDF-1)                ' DD031204
  1753.               ZMplPersUpload = Ztrue                                 ' DD031204
  1754.               CALL WhoCheck (TempHashValue$,Found,RcvrRecNum)        ' DD031204
  1755.               IF NOT Found THEN                                      ' DD031204
  1756.                  CALL BreakFileName (ZActiveMessageFile$, _          ' DD031204
  1757.                                      Pre$,Body$,Ext$,ZTrue)          ' DD031204
  1758.                  CALL WordInFile ("ECHOCONF.DEF",Body$+Ext$,Found)   ' DD031204
  1759.               END IF                                                 ' DD031204
  1760.               IF NOT Found THEN                                      ' DD031204
  1761.                  CALL QuickPeek (ZUserIn$(ZAnsIndex),MsgTo$,Found)   ' DD031204
  1762.                  CALL AliasChk (MsgTo$,Found,UserNumFound)           ' DD031204
  1763.               END IF                                                 ' DD031204
  1764.               IF NOT Found THEN                                      ' DD031204
  1765.                  ZLastIndex = 0                                      ' DD031204
  1766.                  RcvrRecNum = 0                                      ' DD031204
  1767.                  IF ZReply THEN                                      ' DD031802
  1768.                     CALL SkipLine (1)                                ' DD031802
  1769.                  END IF                                              ' DD031802
  1770.                  CALL QuickTPut1 (MsgTo$ + _                         ' DD031204
  1771.                                   " is not a local user on " + _     ' DD031204
  1772.                       ZRBBSName$ + CHR$(33))                         ' DD031204
  1773.                  ZMplPersUpload = ZFalse                             ' DD031204
  1774.                  IF NOT ZReply THEN                                  ' DD031204
  1775.                     ZOutTxt$ = "Send anyway?" + ZYesPrompt$          ' DD031204
  1776.                     ZTurboKey = -ZTurboKeyUser                       ' DD031204
  1777.                     ZLastIndex = 0                                   ' DD031204
  1778.                     GOSUB 2034                                       ' DD031204
  1779.                     IF ZNo THEN                                      ' DD031204
  1780.                        MsgTo$ = ""                                   ' DD031204
  1781.                        EXIT SUB                                      ' DD031204
  1782.                     END IF                                           ' DD031204
  1783.                  END IF                                              ' DD031204
  1784.               END IF                                                 ' DD031204
  1785.            END IF                                                    ' DD031204
  1786.         END IF                                                       ' DD031204
  1787.      END IF                                                          ' DD031204
  1788.      CALL CheckInt (MsgTo$)                                          ' DD012101
  1789.      IF ZTestedIntValue > 1 AND ZUserSecLevel >= ZSysOpSecLevel THEN _' DD012101
  1790.         ZMplPersUpload = ZTrue                                       ' DD012101
  1791.      IF MsgTo$ = Temp$ THEN _
  1792.         ZOutTxt$ = "Really send this to Yourself?" + ZNoPrompt$ : _  ' DD060101
  1793.         ZLastIndex = 0 : _
  1794.         GOSUB 2034 : _
  1795.         IF NOT ZYes THEN _
  1796.            MsgTo$ = ""
  1797.      CALL OpenWorkA (2,ZNodeWorkFile$)                               ' DD040601
  1798.      CALL PrintWorkA (2,MsgTo$ + CHR$(44) + STR$(RcvrRecNum))        ' DD040601
  1799.      CLOSE 2
  1800.      ZNumHeaders = ZNumHeaders + 1
  1801.      IF EnableCC AND (NOT ZReply) AND MsgTo$ <> "ALL" AND _
  1802.         MsgTo$ <> "" AND LEFT$(MsgTo$,4) <> "ALL " AND _
  1803.         (NOT ZSysopComment) AND (NOT ZSysopMsg) THEN _
  1804.            ZOutTxt$ = "Send Carbon copies to other users?" + ZNoPrompt$ : _' DD060101
  1805.            CALL PopCmdStack : _
  1806.            IF ZYes THEN _
  1807.               GOTO 2021
  1808. * REPLACING old line(s) by new
  1809. * ------[ first line different ]------
  1810. 2060 IF INSTR(ZMsgSecCats$,CHR$(85)) = 0 THEN _        'U            ' DD021301
  1811.         ZOutTxt$ = "" _
  1812.      ELSE ZOutTxt$ = " p(U)blic," : _
  1813.           IF MsgTo$ = "ALL" THEN _
  1814.              MsgPswd$ = "" : _
  1815.              GOTO 2061
  1816.      IF INSTR(ZMsgSecCats$,CHR$(82)) THEN _            'R            ' DD021301
  1817.         ZOutTxt$ = ZOutTxt$ + " p(R)ivate,"
  1818.      IF INSTR(ZMsgSecCats$,CHR$(80)) THEN _            'P            ' DD021301
  1819.         ZOutTxt$ = ZOutTxt$ + " (P)assword protected,"
  1820. * REPLACING old line(s) by new
  1821. 2061 ZOutTxt$ = "Make msg" + ZOutTxt$ + " (E)dit more, H)elp"
  1822.      IF MsgPswd$ = "^READ^" THEN _
  1823. * ------[ first line different ]------
  1824.         DefaultProt$ = CHR$(82) : _                                  ' DD021301
  1825.         GOTO 2065
  1826.      IF LEFT$(MsgPswd$,1) = CHR$(33) THEN _            '!            ' DD021301
  1827.         DefaultProt$ = CHR$(80) _                      'P            ' DD021301
  1828.      ELSE _
  1829.         DefaultProt$ = CHR$(85)                        'U            ' DD021301
  1830. * REPLACING old line(s) by new
  1831. 2065 IF INSTR(ZMsgSecCats$,DefaultProt$) > 0 THEN _
  1832. * ------[ first line different ]------
  1833.         MID$(ZOutTxt$,INSTR(ZOutTxt$,CHR$(40)+DefaultProt$+CHR$(41)),3) = CHR$(91)+DefaultProt$+CHR$(93) ' DD021301
  1834.      ZTurboKey = -ZTurboKeyUser
  1835.      GOSUB 2096
  1836.      IF ZWasQ = 0 THEN _
  1837.         ZUserIn$(ZAnsIndex) = DefaultProt$
  1838.      ZWasZ$ = LEFT$(ZUserIn$(ZAnsIndex),1)
  1839.      CALL AllCaps (ZWasZ$)
  1840.      IF INSTR(ZMsgSecCats$,ZWasZ$) = 0 THEN _
  1841.         GOTO 2060
  1842.      ON INSTR("RUPHE",ZWasZ$) GOTO 2075,2090,2075,2070,2067
  1843.      GOTO 2060
  1844. * REPLACING old line(s) by new
  1845. 2075 IF MsgTo$ = "ALL" THEN _
  1846.         CALL QuickTPut1 ("Msg to ALL cannot be private") : _
  1847.         GOTO 2060
  1848. * ------[ first line different ]------
  1849.      IF ZWasZ$ = CHR$(80) THEN _                            'P       ' DD021301
  1850.         GOTO 2088
  1851. * REPLACING old line(s) by new
  1852. 2085 ZOutTxt$ = "Password"
  1853.      GOSUB 2096
  1854.      IF ZWasQ = 0 THEN _
  1855. * ------[ first line different ]------
  1856.         IF LEFT$(MsgPswd$,1) = CHR$(33) THEN _              '!       ' DD021301
  1857.            MsgPswd$ = MID$(MsgPswd$,2) : _
  1858.            CALL QuickTPut1 ("Password is " + MsgPswd$) : _
  1859.            RETURN _
  1860.         ELSE _
  1861.         GOTO 2085
  1862.      IF LEN(ZUserIn$) > WasL THEN _
  1863.         CALL QuickTPut1 (STR$(WasL) + " Chars. max") : _
  1864.         GOTO 2085
  1865.      IF WasL = 15 AND LEFT$(ZUserIn$,1) = CHR$(33) THEN _            ' DD021301
  1866.         CALL QuickTPut1 ("Password can't begin with '!'") : _
  1867.         GOTO 2085
  1868.      RETURN
  1869. '
  1870. ' **  PASSWORD PROTECT MESSAGE (USERS WITH PASSWORD AND SYSOP CAN READ) *
  1871. '
  1872. * REPLACING old line(s) by new
  1873. * ------[ first line different ]------
  1874. 2088 ZOutTxt$ = "The Recipients Must Know the Password.  Really Use a Password?" + ZNoPrompt$ ' DD091702
  1875.      ZTurboKey = -ZTurboKeyUser
  1876.      GOSUB 2096
  1877.      IF NOT ZYes THEN _
  1878.         GOTO 2070
  1879.      WasL = 14
  1880.      WasA1$ = CHR$(33)                                   '!          ' DD021301
  1881.      GOSUB 2085
  1882.      CALL AllCaps (ZUserIn$)
  1883.      GOTO 2092
  1884. '
  1885. ' ** MAKE MESSAGE KILL PROTECTED (ONLY SENDER, ADDRESSEE AND SYSOP CAN KILL) *
  1886. '
  1887. * REPLACING old line(s) by new
  1888. 2250 ' $SUBTITLE: 'WhoCheck - Checks whether user exists'
  1889. ' $PAGE
  1890. '
  1891. '  NAME    -- WhoCheck
  1892. '
  1893. '  INPUTS  --   PARAMETER                    MEANING
  1894. '              WhoFind$                User to find
  1895. '
  1896. '  OUTPUTS --  WhoFound                Whether user found
  1897. '              UserNumFound           Record # of user
  1898. '
  1899. '  PURPOSE --  Validate that user record exists.  Sysop
  1900. '              counted as found even if lack user record.
  1901. '
  1902.      SUB WhoCheck (WhoFind$,WhoFound,UserNumFound) STATIC
  1903.      UserNumFound = 0
  1904.      IF ZStartHash <> 1 THEN _
  1905.         WhoFound = ZTrue : _
  1906.         EXIT SUB
  1907.      Work128$ = ZUserRecord$
  1908.      WhoFound = ZFalse
  1909.      ToSysop = (INSTR(WhoFind$,"SYSOP") > 0 OR _
  1910. * ------[ first line different ]------
  1911.         INSTR(WhoFind$,ZSysopFirstName$ + SPACE$(1) + ZSysopLastName$) > 0) ' DD030501
  1912.      CALL OpenUser (ZHighestUserRecord)                              ' Mpl090202
  1913.      FIELD 5, 128 AS ZUserRecord$
  1914.      IF ToSysop THEN _
  1915.         WasX$ = ZSecretName$ : _                                     ' DD090901/MENU0
  1916.         ZMenuNewSysop = ZMenuNewSysop + 1 _                          ' DD090901/MENU0
  1917.      ELSE WasX$ = WhoFind$
  1918.      ZWasDF = INSTR(WasX$+CHR$(64),CHR$(64))              '@         ' DD021301
  1919.      WasX$ = LEFT$(WasX$,ZWasDF)
  1920.      IF LEN(WasX$) > 1 THEN _
  1921.         CALL FindUser (WasX$,"",ZStartHash,ZLenHash,_
  1922.                        0,0,ZHighestUserRecord,WhoFound,_             ' Mpl090202
  1923.                        UserNumFound,ZWasSL)
  1924.      LSET ZUserRecord$ = Work128$
  1925.      IF NOT WhoFound THEN _
  1926.         IF ToSysop THEN _
  1927.            WhoFound = ZTrue 
  1928.      END SUB
  1929. * REPLACING old line(s) by new
  1930. 2620 ZOutTxt$ = "Line #" + _
  1931.           STR$(WasL) + _
  1932.           " is:" + _
  1933.           ZReturnLineFeed$ + _
  1934.           ZOutTxt$(WasL)
  1935.      ZSubParm = 3
  1936.      CALL TPut
  1937.      GOSUB 2695
  1938. * ------[ first line different ]------
  1939. '    IF NOT ZExpertUser THEN _                                       ' UG070501
  1940. '       CALL QuickTPut1 ("Search & replace")                         ' UG070501
  1941.      ZOutTxt$ = "Search for What String" + _                         ' UG070501
  1942.           ZPressEnterExpert$
  1943.      ZMacroMin = 99
  1944.      ZParseOff = ZTrue
  1945.      ZSubParm = 1
  1946.      GOSUB 2694
  1947.      IF ZWasQ = 0 THEN _
  1948.         EXIT SUB
  1949.      ZWasY$ = LEFT$(ZUserIn$,1)
  1950.      IF ZWasY$ = RIGHT$(ZUserIn$,1) THEN _
  1951.         IF LEN(ZUserIn$) > 2 THEN _
  1952.            WasX = INSTR(2,ZUserIn$,ZWasY$) : _
  1953.            IF WasX < LEN(ZUserIn$) THEN _
  1954.               IF ZWasY$ < CHR$(48) OR (ZWasY$ > CHR$(57) AND ZWasY$ < CHR$(65)) THEN _ ' DD021301
  1955.                  ZUserIn$ = MID$(ZUserIn$,2,LEN(ZUserIn$)-2) : _
  1956.                  WasX = WasX - 1 : _
  1957.                  GOTO 2622
  1958.      WasX = INSTR(ZUserIn$,CHR$(59))                     ';          ' DD021301
  1959. * REPLACING old line(s) by new
  1960. 2622 IF WasX > 0 THEN _
  1961.         WasX$ = LEFT$(ZUserIn$,WasX-1) : _
  1962.         ZWasY$ = RIGHT$(ZUserIn$,LEN(ZUserIn$)-WasX) : _
  1963.         GOTO 2660
  1964.      WasX$ = ZUserIn$
  1965. * ------[ first line different ]------
  1966.      ZOutTxt$ = "And Replace With What"                              ' UG070501
  1967.      ZParseOff = ZTrue
  1968.      ZSubParm = 1
  1969.      ZMacroMin = 99
  1970.      GOSUB 2694
  1971.      ZWasY$ = ZUserIn$
  1972. * REPLACING old line(s) by new
  1973. 2660 WasX = INSTR(1,ZOutTxt$(WasL),WasX$)
  1974.      IF WasX = 0 THEN _
  1975. * ------[ first line different ]------
  1976.         CALL QuickTPut1 ("String Not Found in Line" + STR$(WasL) + CHR$(46)) : _ ' DD021301
  1977.         GOTO 2620
  1978. * REPLACING old line(s) by new
  1979. 3730 IF TabToSpace > 0 THEN _
  1980. * ------[ first line different ]------
  1981.         WasX$ = SPACE$(1) : _                                        ' DD021301
  1982.         TabToSpace = TabToSpace - 1 : _
  1983.         GOTO 3750
  1984.      CALL FindFKey
  1985.      IF ZSubParm < 0 THEN _
  1986.         EXIT SUB
  1987.      WasX$ = ZKeyPressed$
  1988.      IF WasX$ = "" THEN _
  1989.         GOTO 3732 : _                                                ' KG011201
  1990.         IF ZLocalUser THEN _
  1991.            GOTO 3733 _
  1992.         ELSE GOTO 3732
  1993.      IF WasX$ = ZEscape$ THEN _
  1994.         ZKeyPressed$ = WasX$ : _
  1995.         EXIT SUB
  1996.      SendRemote = ZTrue
  1997.      WasZ = INSTR(ZLineEditChk$,WasX$)
  1998.      IF WasZ < 1 THEN _
  1999.         GOTO 3750 _
  2000.      ELSE IF WasZ > 4 THEN _
  2001.              GOTO 3870 _
  2002.      ELSE IF WasZ = 1 THEN _
  2003.              GOTO 3810
  2004.      IF ZLocalUser THEN _
  2005.         GOTO 3730
  2006. * REPLACING old line(s) by new
  2007. 3732 IF ZCommPortStack$ <> "" THEN _
  2008.         WasX$ = LEFT$(ZCommPortStack$,1) : _
  2009.         ZCommPortStack$ = RIGHT$(ZCommPortStack$,LEN(ZCommPortStack$)-1) : _
  2010.         GOTO 3738
  2011. * ------[ first line different ]------
  2012.      IF NOT ZLocalUser THEN _                                        ' KG011201
  2013.         CALL EofComm (Char) : _                                      ' KG011201
  2014.         IF Char <> -1 THEN _                                         ' KG011201
  2015.            GOTO 3736                                                 ' KG011201
  2016. * REPLACING old line(s) by new
  2017. 3750 IF SendRemote THEN _
  2018.         CALL PutCom(WasX$)
  2019. * ------[ first line different ]------
  2020.      IF WasX$ = ZCarriageReturn$ THEN _
  2021.         CALL LPrnt (ZCrLf$,0) : _                                    ' DD080101/ANSI19
  2022.         Col = Col - 1 : _
  2023.         GOTO 3850 _                                                  ' DD080101/ANSI19
  2024.      ELSE _                                                          ' DD080101/ANSI19
  2025.         CALL LPrnt (WasX$, 0)                                        ' DD080101/ANSI19
  2026. * REPLACING old line(s) by new
  2027. 3770 IF Col > WasXXX THEN _
  2028. * ------[ first line different ]------
  2029.         IF WasX$ = SPACE$(1) THEN _                                  ' DD021301
  2030.            CALL SkipLine (1) : _
  2031.            GOTO 3860
  2032. * REPLACING old line(s) by new
  2033. 3800 IF WasZ < 1 THEN _
  2034.         WasZ = Col-1 : _
  2035.         GOTO 3820
  2036. * ------[ first line different ]------
  2037.      IF MID$(ZLineMes$,WasZ,1) = SPACE$(1) THEN _                    ' DD021301
  2038.         GOTO 3820
  2039.      WasZ = WasZ - 1
  2040.      GOTO 3800
  2041. * REPLACING old line(s) by new
  2042. 3952 ' $SUBTITLE: 'KillMsg - subroutine to delete messages'
  2043. ' $PAGE
  2044. '
  2045. '  NAME    -- KillMsg
  2046. '
  2047. '  INPUTS  --     PARAMETER                    MEANING
  2048. '              MsgToKill                   MESSAGE NUMBER TO KILL
  2049. * ------[ first line different ]------
  2050. '              ZActiveMessages              NUMBER ACTIVE MESSAGES   ' DD040706
  2051. '
  2052. '  OUTPUTS --  NONE
  2053. '
  2054. '  PURPOSE --  To kill/delete old or unnecessary messages
  2055. '
  2056.      SUB KillMsg (MsgToKill,ZActiveMessages,ZconfName$) STATIC       ' DD040706
  2057.      FIELD #1,128 AS ZMsgRec$
  2058.      WasQX = 1
  2059.      NumHeaders = 0
  2060. * REPLACING old line(s) by new
  2061. * ------[ first line different ]------
  2062. 3955 IF WasQX > ZActiveMessages THEN _                               ' DD040706
  2063.         ZOutTxt$ = "Message #" + _                                   ' DD091701
  2064.              STR$(MsgToKill) + " Not Found." : _                     ' UG070501
  2065.         GOTO 4031
  2066.      IF ZMsgPtr(WasQX,2) = MsgToKill AND MsgToKill => 1 THEN _
  2067.         GOTO 3970
  2068.      WasQX = WasQX + 1
  2069.      GOTO 3955
  2070. * REPLACING old line(s) by new
  2071. * ------[ first line different ]------
  2072. 4000 IF LEFT$(ZWasZ$,1) = CHR$(33) THEN _                 '!         ' DD021301
  2073.         ZWasZ$ = MID$(ZWasZ$,2)
  2074. * REPLACING old line(s) by new
  2075. 4020 ZWasZ$ = MID$(ZMsgRec$,37,22)
  2076.      CALL Trim (ZWasZ$)
  2077.      IF OrigNumHeaders < 2 AND ZExpertUser THEN _
  2078.         GOTO 4030
  2079. * ------[ first line different ]------
  2080.      ZOutTxt$ = "Really kill msg#" + STR$(MsgToKill) + " to " + ZWasZ$ + CHR$(63) + ZYesPrompt$' DD021301
  2081.      ZSubParm = 1
  2082.      ZTurboKey = -ZTurboKeyUser
  2083.      CALL TGet
  2084.      IF ZSubParm < 0 THEN _
  2085.         EXIT SUB
  2086.      IF ZNo THEN _
  2087.         GOTO 4032
  2088. * REPLACING old line(s) by new
  2089. * ------[ first line different ]------
  2090. 4656 ZOutTxt$ = "THREAD: +)forward, -)back, 1)from origin" + _       ' DD032501
  2091.                 ZPressEnterExpert$                                   ' DD032501
  2092.      ZTurboKey = -ZTurboKeyUser
  2093.      ZSubParm = 1
  2094.      CALL TGet
  2095.      IF ZWasQ = 0 OR ZSubParm = -1 THEN _
  2096.         EXIT SUB
  2097.      ZWasZ$ = ZUserIn$(1)
  2098. * REPLACING old line(s) by new
  2099. 4657 ZWasZ$ = LEFT$(ZWasZ$,1)
  2100.      WasX = INSTR("+-1",ZWasZ$)
  2101.      IF WasX = 0 THEN _
  2102.         GOTO 4656
  2103. * ------[ first line different ]------
  2104.      ZUserIn$(1) = CHR$(82)                            'R            ' DD021301
  2105.      IF WasX = 1 THEN _
  2106.         CurMsgNum = CurMsgNum + 1 _
  2107.      ELSE IF WasX = 2 THEN _
  2108.              CurMsgNum = CurMsgNum - 1 _
  2109.           ELSE CurMsgNum = 1 : _
  2110.                ZWasZ$ = CHR$(43)                       '+            ' DD021301
  2111.      ZUserIn$(3) = MID$(STR$(CurMsgNum),2) + ZWasZ$
  2112.      IF LEN(CurSubj$) < 4 OR LEFT$(CurSubj$,3) <> "(R)" THEN _
  2113.         ZUserIn$(2) = CurSubj$ _
  2114.      ELSE ZUserIn$(2) = MID$(CurSubj$,4)
  2115.      ZUserIn$(2) = LEFT$(ZUserIn$(2) + SPACE$(2),22)                 ' DD021301
  2116.      ZLastIndex = 3
  2117.      ZAnsIndex = 1
  2118.      ZWasQ = 3
  2119.      END SUB
  2120. * REPLACING old line(s) by new
  2121. 5501 CALL TimeRemain(MinsRemaining)
  2122. * ------[ first line different ]------
  2123.      Temptime$ = STR$(MinsRemaining)
  2124.      CALL Trim (Temptime$)
  2125.      ZOutTxt$ = ZFGD$ + Temptime$ + ZFG2$ + _                        ' DD121501
  2126.                 " minutes left." + ZEmphasizeOff$ + ZCRLf$ + _       ' DD121501
  2127.                 "D)eposit, W)ithdraw, H)elp, [Q]uit"                 ' DD070302
  2128.      ZTurboKey = -ZTurboKeyUser
  2129.      CALL PopCmdStack
  2130.      IF ZSubParm = -1 THEN _
  2131.         EXIT SUB
  2132.      ZWasZ$ = LEFT$(ZUserIn$(ZAnsIndex),1)
  2133.      CALL AllCaps(ZWasZ$)
  2134.      ON INSTR("QDW?H",ZWasZ$) GOTO 5509,5505,5502,5508,5508
  2135.      GOTO 5501
  2136. * REPLACING old line(s) by new
  2137. 5503 IF SignTime = 1 THEN _
  2138. * ------[ first line different ]------
  2139.         Action$ = "Withdrew" : _                                     ' DD031004
  2140.         ZOutTxt$ = "Withdraw" _
  2141.      ELSE _
  2142.         Action$ = "Deposited" : _                                    ' DD031004
  2143.         ZOutTxt$ = "Deposit"
  2144.      Temp$ = ZFGE$ + ZOutTxt$ + ZFGB$ + " how many minutes?" + _     ' DD121501
  2145.              ZEmphasizeOff$                                          ' DD121501
  2146.      CALL ChangeInt (ZFalse,Temp$,Temp,0,Maxtime)
  2147.      IF ZWasQ = 0 OR ZTestedIntValue = 0 THEN _
  2148.         GOTO 5501
  2149.      ZTestedIntValue = SignTime * ZTestedIntValue
  2150.      CALL ChkAddedTime (ZTestedIntValue)
  2151.      IF ZTestedIntValue = 0 THEN _
  2152.         GOTO 5501
  2153.      CALL UpdtCalr (Action$ + STR$(SignTime*ZTestedIntValue) + _     ' DD031004
  2154.                    " Mins" ,1)                                       ' DD031004
  2155.      ZSecsPerSession! = ZSecsPerSession! + (ZTestedIntValue * 60)
  2156.      IF ZMaxPerDay = 0 THEN _                                        ' KG082101
  2157.         ZTimeCredits! = ZTimeCredits! + ZTestedIntValue * 60         ' KG082101
  2158.      ZElapsedTime = ZElapsedTime - ZTestedIntValue
  2159.      ZGlobalBankTime = ZGlobalBankTime - ZTestedIntValue
  2160.      ZBankTime = ZGlobalBankTime                                     'Pe 11/02/91
  2161.      GOSUB 5507
  2162.      GOTO 5501
  2163. * REPLACING old line(s) by new
  2164. 5505 SignTime = -1            ' deposit
  2165.      MaxTime = ZMaxBank - ZGlobalBankTime
  2166.      IF MaxTime <= 0 THEN _
  2167. * ------[ first line different ]------
  2168.         Temptime$ = STR$(ZMaxBank) : _                               ' DD121501
  2169.         CALL Trim (Temptime$) : _                                    ' DD121501
  2170.         CALL QuickTPut1 (ZFGF$ + ZBG5$ + " Already deposited max of " + _' DD121501
  2171.                          Temptime$ + " minutes! " + ZEmphasizeOff$) : _' DD121501
  2172.         ZLastIndex = 0 : _
  2173.         GOTO 5501
  2174.      IF MaxTime > MinsRemaining THEN _
  2175.         MaxTime = MinsRemaining
  2176.      GOTO 5503
  2177. * REPLACING old line(s) by new
  2178. 5507 IF ZAnsIndex < ZLastIndex THEN _
  2179.         RETURN
  2180. * ------[ first line different ]------
  2181.      CALL SkipLine (1)                                               ' DD070301
  2182.      ZOutTxt$ = ZFG9$ + "Current Bank Balance: " + _                 ' DD121501
  2183.                 ZFGB$ + STR$(ZGlobalBankTime) + _                    ' DD121501
  2184.                 ZFG9$ + " Minutes" + ZEmphasizeOff$                  ' DD121501
  2185.      CALL QuickTPut1(ZOutTxt$)
  2186.      RETURN
  2187. * REPLACING old line(s) by new
  2188. 9600 ' $SUBTITLE: 'DefaultU - subroutine to update user defauts'
  2189. ' $PAGE
  2190. '
  2191. '  NAME    -- DefaultU
  2192. '
  2193. '  INPUTS  --     PARAMETER                    MEANING
  2194. * ------[ first line different ]------
  2195. '             ZFullScreenEditor                                      'Pe 09/02/91 AnsiEd Mod
  2196. '             ZBoldText$              Ansi bold (0 no, 1 yes)
  2197. '             ZCheckBulletLogon
  2198. '             ZExpertUser
  2199. '             ZWasGR
  2200. '             ZLastMsgRead
  2201. '             ZLineFeeds
  2202. '             ZNulls
  2203. '             ZPageLength
  2204. '             ZPromptBell
  2205. '             ZRegDate$
  2206. '             ZReqQuesAnswered
  2207. '             ZRightMargin
  2208. '             ZSkipFilesLogon
  2209. '             ZTimesLoggedOn
  2210. '             ZUpperCase
  2211. '             ZUserOption$
  2212. '             ZUserTextColor          Ansi of color (31-37)
  2213. '             ZUserXferDefault$
  2214. '
  2215. '  OUTPUTS--  USER.OPTONS$
  2216. '
  2217. '  PURPOSE --  To update the user's record with their options.
  2218. '  Meaning of graphics preference stored is as follows: where # is
  2219. '  value stored for the color.  E.g. if graphics perference for text
  2220. '  files is color, and preference for normal text is light yellow,
  2221. '  graphics preference stored is 38.  Colors are Red, Green, Yellow,
  2222. '  Blue, Purple, Cyan, and White.
  2223. '
  2224. '             normal                  bold
  2225. ' Graphics R  G  Y  B  P  C  W    R  G  Y  B  P  C  W
  2226. '   none  30 35 40 45 50 55 60 | 65 70 75 80 85 90 95                ' DD061301
  2227. '   mono  31 36 41 46 51 56 61 | 66 71 76 81 86 91 96                ' DD061301
  2228. '   ansi  32 37 42 47 52 57 62 | 67 72 77 82 87 92 97                ' DD061301
  2229. '  avatar 33 38 43 48 53 58 63 | 68 73 78 83 88 93 98                ' DD061301
  2230. '   RIP   34 39 44 49 54 59 64 | 69 74 79 84 89 94 99                ' DD061301
  2231. '
  2232.      SUB DefaultU STATIC
  2233.      ZWasA =    -ZPromptBell          -2 * ZExpertUser _
  2234.             -4 * ZNulls               -8 * ZUpperCase _
  2235.            -16 * ZLineFeeds          -32 * ZCheckBulletLogon _
  2236.            -64 * ZSkipFilesLogon    -128 * ZFullScreenEditor _       ' Mpl090202
  2237.           -256 * ZReqQuesAnswered   -512 * ZMailWaiting _
  2238.          -1024 * (NOT ZHiLiteOff)  -2048 * ZTurboKeyUser _
  2239.          -4096 * ZFileWaiting      -8192 * ZAvailableForChat _       ' DD062901
  2240.         -16384 * ZExtendedOff                                        ' DD062901
  2241. '                                                                    ' DD063002
  2242.      WasAA =    -ZReadNewMail         -2 * ZReselectAll _            ' DD070103
  2243.             -4 * ZMorePromptLF        -8 * ZReselectGraphics _       ' DD070105
  2244.            -16 * ZANSIMusic          -32 * ZNeverCanPage _           ' DD070601
  2245.            -64 * ZReselectProto     -128 * ZGlobalTwit               ' DD070906
  2246. '                                                                    ' DD063002
  2247.      WasX = 5*ZUserTextColor - 125 + 35*VAL(ZBoldText$) + ZWasGR     ' DD061301
  2248.      IF WasX < 30 OR WasX > 99 THEN _                                ' DD061301
  2249.         WasX = 60                                                    ' DD061301
  2250.      LSET ZUserOption$ = _
  2251.         MKI$(ZTimesLoggedOn) + _
  2252.         MKI$(ZLastMsgRead) + _
  2253.         ZUserXferDefault$ + _
  2254.         CHR$(WasX) + _
  2255.         CHR$(ZRightMargin) + _                                       ' DD063002
  2256.         CHR$(WasAA) + _                                              ' DD063002
  2257.         MKI$(ZWasA) + _
  2258.         ZRegDate$ + _
  2259.         CHR$(ZPageLength) + _
  2260.         ZEchoer$
  2261.      END SUB
  2262. * REPLACING old line(s) by new
  2263. 9801 ' $SUBTITLE: 'WhosOn - subroutine to display who is on'
  2264. ' $PAGE
  2265. '
  2266. '  NAME    -- WhosOn
  2267. '
  2268. '  INPUTS  --     PARAMETER                    MEANING
  2269. '                NumNodes                   # of nodes to check
  2270. '                ZActiveMessageFile$        Current message file
  2271. '                ZOrigMsgFile$              Main msg file
  2272. '
  2273. '  OUTPUTS --  None
  2274. '
  2275. '  PURPOSE --  To display who is on each node.
  2276. '
  2277. * ------[ first line different ]------
  2278.      SUB WhosOn STATIC                                               ' KG012601
  2279.      WasA1$ = ZActiveMessageFile$
  2280.      ZActiveMessageFile$ = ZOrigMsgFile$
  2281.      CALL OpenMsg
  2282.      FIELD 1, 128 AS ZMsgRec$
  2283.      GET 1,1                                                         ' KG012601
  2284.      NumNodes = VAL(MID$(ZMsgRec$,127))                              ' KG012601
  2285.      FOR NodeIndex = 2 TO NumNodes + 1
  2286.         GET 1,NodeIndex
  2287.         ZOutTxt$ = ZFGA$ + "Node" + _                                ' DD081801
  2288.              STR$(NodeIndex - 1) + ZFGE$                             ' DD081801
  2289.         RecIndex = -VAL(MID$(ZMsgRec$,44,2))
  2290.         IF RecIndex >= 0 THEN _
  2291.            RecIndex = -1
  2292.         WasAX$ = MID$(ZMsgRec$,79,5)                                 ' KG012001
  2293.         CALL Trim (WasAX$)                                           ' KG012001
  2294.         WasAX$ = RIGHT$(SPACE$(5) + WasAX$,5) + _                    ' DD031501
  2295.               " Baud "                                               ' DD090604
  2296.         IF MID$(ZMsgRec$,55,2) = "-1" AND NOT ZSysop THEN _
  2297.            ZWasY$ = "SYSOP" + SPACE$(21) _
  2298.         ELSE ZWasY$ = MID$(ZMsgRec$,1,26)
  2299.         WasAX$ = WasAX$ + ZFGC$ + ZWasY$                             ' DD081801
  2300.         IF MID$(ZMsgRec$,40,2) <> "-1" THEN                          ' JM092401/RCHAT
  2301.            CALL SaveUserActivity(WhatTheyDoin$, NodeIndex, ZTrue)    ' JM092401/RCHAT
  2302.            IF WhatTheyDoin$ = CHR$(67) THEN                  'C      ' DD021301/RCHAT
  2303.               WasAX$ = WasAX$ + ZFG4$ + "[In Chat System]"           ' JM092401/RCHAT
  2304.            ELSEIF WhatTheyDoin$ = CHR$(70) THEN              'F      ' DD021301/RCHAT
  2305.               WasAX$ = WasAX$ + ZFG4$ + "[In File System]"           ' JM092401/RCHAT
  2306.            ELSEIF WhatTheyDoin$ = CHR$(77) THEN              'M      ' DD021301/RCHAT
  2307.               WasAX$ = WasAX$ + ZFG4$ + "[In Message System]"        ' JM092401/RCHAT
  2308.            ELSE                                                      ' JM092401/RCHAT
  2309.               WasAX$ = WasAX$ + ZFG4$ + MID$(ZMsgRec$,93,22)         ' JM092401/RCHAT
  2310.            END IF                                                    ' JM092401/RCHAT
  2311.         ELSE                                                         ' JM092401/RCHAT
  2312.            WasAX$ = WasAX$ + ZFG4$ + "[Has Opened a Door]"           ' JM092401/RCHAT
  2313.         END IF                                                       ' JM092401/RCHAT
  2314.         IF MID$(ZMsgRec$,57,1) = CHR$(65) THEN               'A      ' DD021301
  2315.            ZOutTxt$ = ZOutTxt$ + "  Online at " + _                  ' DD082801
  2316.                 WasAX$                                               ' DD032203/MUSER
  2317.         ELSEIF NOT ZSysop AND NOT ZShowAllWhosOn THEN                ' DD052001
  2318.                 ZOutTxt$ = ZOutTxt$ + _                              ' DD052001
  2319.                      " Waiting for next caller"                      ' DD052001
  2320.         ELSE ZOutTxt$ = ZOutTxt$ + _                                 ' DD032203/MUSER
  2321.                        " Offline at " + _                            ' DD090403
  2322.                        WasAX$
  2323.         END IF                                                       ' DD032203/MUSER
  2324.  
  2325.         CALL QuickTPut1 (ZOutTxt$)
  2326.         CALL AskMore ("",ZTrue,ZTrue,ZAnsIndex,ZFalse)
  2327.         IF ZNo THEN _
  2328.            NodeIndex = NumNodes + 2
  2329.      NEXT
  2330.      ZActiveMessageFile$ = WasA1$
  2331.      CALL QuickTPut (ZEmphasizeOff$,0)
  2332.      END SUB
  2333. * REPLACING old line(s) by new
  2334. 10410 ' $SUBTITLE: 'RecoverMsg - sub to recover deleted messages'
  2335. ' $PAGE
  2336. '
  2337. '  NAME    -- RecoverMsg
  2338. '
  2339. '  INPUTS  --     PARAMETER                    MEANING
  2340. '               MsgToRecover          MESSAGE NUMBER TO RECOVER
  2341. '               FirstMsgRecord        RECORD # FOR First MSG
  2342. '
  2343. '  OUTPUTS --  ActionFlag                 SET TO 0 IF ERROR
  2344. '                                         SET TO -1 IF No ERROR
  2345. '
  2346. '  PURPOSE --  To recover deleted messages.  Note that this is only
  2347. '              possible if you have not compressed your message file
  2348. '              using config.
  2349. '
  2350. * ------[ first line different ]------
  2351.       SUB RecoverMsg (MsgToRecover,FirstMsgRecord,ActionFlag,ZConfName$) STATIC 'Pe 06/09/91
  2352.       FIELD #1,128 AS ZMsgRec$
  2353.       MsgRec = FirstMsgRecord
  2354. * REPLACING old line(s) by new
  2355. 10600 ' $SUBTITLE: 'UpdateU -- Update the users record at logoff'
  2356. ' $PAGE
  2357. '  NAME    -- UpdateU
  2358. '
  2359. '  INPUTS  -- PARAMETER             MEANING
  2360. '             ZAdjustedSecurity
  2361. '             ZCurDate$
  2362. '             ZDnlds
  2363. '             ZElapsedTime
  2364. '             ZListDir
  2365. '             ZMainUserFileIndex
  2366. '             ZSecsPerSession!
  2367. '             ZUplds
  2368. '             ZUserSecLevel
  2369. '
  2370. '  OUTPUTS -- ZElapsedTime$
  2371. '             ZListNewDate$
  2372. '             ZSecLevel$
  2373. '             ZUserDnlds$
  2374. '             ZUserUplds$
  2375. '
  2376. '  PURPOSE -- Update the user record for the user when the user
  2377. '             exits RBBS-PC.
  2378. '
  2379.       SUB UpdateU (LoggingOff) STATIC
  2380. * ------[ first line different ]------
  2381.       IF ZActiveUserName$ = "" OR ZFirstName$ = "" OR _              ' DD100701
  2382.          ZPswdFailed = ZTrue THEN _                                  ' DD100701
  2383.          EXIT SUB
  2384.       IF ZUserFileIndex < 1 THEN _
  2385.          GOTO 10607
  2386.       UpdateDefaults = ZTrue
  2387. * REPLACING old line(s) by new
  2388. 10602 ZSubParm = 6
  2389.       ZWasY$ = ZLastDateTimeOn$
  2390.       CALL FileLock
  2391.       CALL OpenUser (ZHighestUserRecord)
  2392.       FIELD 5,31 AS ZUserName$, _
  2393.               15 AS ZPswd$, _
  2394.                2 AS ZSecLevel$, _
  2395.               14 AS ZUserOption$,  _
  2396.               24 AS ZCityState$, _
  2397. * ------[ first line different ]------
  2398.                1 AS MachineType$, _                                  ' DD091401/DROP
  2399.                1 AS ZDropTimes$, _                                   ' DD091401/DROP
  2400.                1 AS ZBankTime$,_
  2401.                4 AS ZTodayDl$, _
  2402.                4 AS ZTodayBytes$, _
  2403.                4 AS ZDlBytes$, _
  2404.                4 AS ZULBytes$, _
  2405.               14 AS ZLastDateTimeOn$, _
  2406.                3 AS ZListNewDate$, _
  2407.                2 AS ZUserDnlds$, _
  2408.                2 AS ZUserUplds$, _
  2409.                2 AS ZElapsedTime$
  2410. * REPLACING old line(s) by new
  2411. 10604 GET 5,ZUserFileIndex
  2412.       IF ZActiveUserFile$ = ZOrigUserFile$ THEN _
  2413.          ZUplds = ZGlobalUplds : _
  2414.          ZDnlds = ZGlobalDnlds : _
  2415.          ZDLToday! = ZGlobalDLToday! : _
  2416.          ZBytesToday! = ZGlobalBytesToday! : _
  2417.          ZDLBytes! = ZGlobalDLBytes! : _
  2418.          ZULBytes! = ZGlobalULBytes! : _
  2419. * ------[ first line different ]------
  2420.          ZDropTimes = ZGlobalDropTimes : _                           ' DD091401/DROP
  2421.          ZBankTime = ZGlobalBankTime _
  2422.       ELSE ZBankTime = 0
  2423.       LSET ZBankTime$ = CHR$(ZBankTime)
  2424.       LSET ZDropTimes$ = CHR$(ZDropTimes)                            ' DD091401/DROP
  2425.       LSET ZLastDateTimeOn$ = ZWasY$
  2426.       LSET ZCityState$ = ZWasCI$
  2427.       IF UpdateDefaults THEN _
  2428.          CALL DefaultU
  2429.       IF ZListDir THEN _
  2430.          LSET ZListNewDate$ = CHR$(VAL(MID$(ZCurDate$,7,2))) + _
  2431.                               CHR$(VAL(MID$(ZCurDate$,1,2))) + _
  2432.                               CHR$(VAL(MID$(ZCurDate$,4,2)))
  2433. * REPLACING old line(s) by new
  2434. 10605 LSET ZUserDnlds$ = MKI$(ZDnlds)
  2435.       LSET ZUserUplds$ = MKI$(ZUplds)
  2436.       IF ZEnforceRatios THEN _
  2437.          LSET ZTodayDl$ = MKS$(ZDLToday!) : _
  2438.          LSET ZTodayBytes$ = MKS$(ZBytesToday!) : _
  2439.          LSET ZDlBytes$ = MKS$(ZDLBytes!) : _
  2440.          LSET ZULBytes$ = MKS$(ZULBytes!)
  2441.       CALL CheckTime (ZUserLogonTime!, ZSecsUsedSession!, 2)
  2442.       IF (NOT ZExitToDoors) AND LoggingOff THEN _
  2443.          TempElapsed! = ZElapsedTime + _
  2444.                        (ZSecsUsedSession! - ZTimeCredits!) / 60 : _
  2445.          ZTimeCredits! = 0 _
  2446.       ELSE TempElapsed! = ZElapsedTime - ZExitToDoors*ZMinsInDoors
  2447.       IF TempElapsed! < -32767 THEN _
  2448.          TempElapsed! = -32767 _
  2449.       ELSE IF TempElapsed! > 32767 THEN _
  2450.          TempElapsed! = 32767
  2451.       LSET ZElapsedTime$ = MKI$(TempElapsed!)
  2452.       IF ZAdjustedSecurity THEN _
  2453.          LSET ZSecLevel$ = MKI$(ZUserSecLevel)
  2454.       PUT 5,ZUserFileIndex
  2455.       ZSubParm = 8
  2456.       CALL FileLock
  2457.       IF ZActiveUserFile$ <> ZOrigUserFile$ AND LoggingOff THEN _
  2458.          ZActiveUserFile$ = ZOrigUserFile$ : _
  2459.          ZUserFileIndex = ZOrigUserFileIndex : _
  2460.          UpdateDefaults = ZFalse : _
  2461. * ------[ first line different ]------
  2462.          ZAdjustedSecurity = ZFalse : _                              ' KG022502
  2463.          LSET ZLastDateTimeOn$ = ZOrigDateTimeOn$ : _
  2464.          GOTO 10602
  2465. * REPLACING old line(s) by new
  2466. 10607 IF ZExitToDoors OR NOT LoggingOff THEN _
  2467.          EXIT SUB
  2468. * ------[ first line different ]------
  2469.       IF NOT ZDontShowLogoff THEN                                    ' DD062806
  2470.          Temp = ZMinsPerSession                                      ' DD062806
  2471.          IF ZMaxPerDay > 0 THEN                                      ' DD062806
  2472.             Temp = ZMaxPerDay - TempElapsed!                         ' DD062806
  2473.             IF Temp > ZMinsPerSession THEN                           ' DD062806
  2474.                Temp = ZMinsPerSession                                ' DD062806
  2475.             END IF                                                   ' DD062806
  2476.          END IF                                                      ' DD062806
  2477.          Temp = -(Temp > 0) * Temp                                   ' DD062806
  2478.          ZOutTxt$ = STR$(Temp)                                       ' DD091803
  2479.          CALL Trim (ZOutTxt$)                                        ' DD063001
  2480.          CALL SkipLine (1)                                           ' DD031302
  2481.          CALL QuickTPut1 (ZFGB$ + ZOutTxt$ + ZFG6$ + _               ' DD031302
  2482.               " minutes left Today")                                 ' DD071301
  2483.          IF ZTempMaxBank > 0 THEN                                    ' DD062503
  2484.             CALL QuickTPut1(ZFGC$ + "Banked Time:" + ZFGE$ + _       ' DD060101
  2485.                  STR$(ZGlobalBankTime) + ZFGC$+" minutes")           ' DD060101
  2486.          END IF                                                      ' DD062806
  2487.          Call QuickTput1  (ZFG9$ + "Thanks for calling" + _          ' DD060101
  2488.               ZFGB$ + SPACE$(1) + ZOrigRBBSName$ + ZFG9$ + _         ' DD021301
  2489.               " and please call again!")                             ' DD060101
  2490.       END IF                                                         ' DD062806
  2491.       IF NOT ZHiLiteOff THEN _
  2492.          CALL QuickTPut1 (ZColorReset$)
  2493.       IF NOT ZLocalUser THEN                                         ' DD051801
  2494.          CALL DelayTime (8 + ZCBPS)                                  ' DD080804
  2495.       END IF                                                         ' DD051801
  2496.       CALL PutMenu0Info                                              ' DD090901/MENU0
  2497.       END SUB
  2498. * REPLACING old line(s) by new
  2499. 10935 ' $SUBTITLE: 'DosExit -- Setup to exit to DOS for ZSysop'
  2500. ' $PAGE
  2501. '  NAME    -- DosExit
  2502. '
  2503. '  INPUTS  -- PARAMETER             MEANING
  2504. '             ZComPort$
  2505. '             ZDoorsTermType
  2506. '             ZMultiLinkPresent
  2507. '             ZRBBSBat$
  2508. '             ZRedirectIOMethod
  2509. '             ZUseDeviceDriver$
  2510. '
  2511. '  OUTPUTS -- ZWasQ                    NUMBER OF LINES TO WRITE OUT TO
  2512. '                                      ZRCTTYBat$
  2513. '             ZUserIn$()               LINES TO WRITE OUT TO ZRCTTYBat$
  2514. '
  2515. '  PURPOSE -- Set up ZUserIn$() and ZWasQ in order to call "RBBSExit" and
  2516. '             exit to DOS for the remote RBBS-PC sysop
  2517. '
  2518.       SUB DosExit STATIC
  2519. * ------[ first line different ]------
  2520. * INSERTING new line(s)
  2521. 10940 ZOutTxt$ = "Exit To Dos Using a DOOR?" + ZNoPrompt$            ' DD060101
  2522.             ZTurboKey = -ZTurboKeyUser                               ' Mpl090202
  2523.             CALL TGet                                                ' Mpl090202
  2524.             CALL AllCaps (ZUserIn$)                                  ' Mpl090202
  2525.       IF ZYES THEN_                                                  ' Mpl090202
  2526.          GOTO 10955                                                  ' Mpl090202
  2527.       ZOutTxt$(1) = "ECHO OFF"
  2528.       IF ZUseDeviceDriver$ <> "" THEN _
  2529.          Port$ = ZUseDeviceDriver$ _
  2530.       ELSE Port$ = "COM" + RIGHT$(ZComPort$,1)
  2531.       IF ZRedirectIOMethod THEN _
  2532.          ZFF = 5 : _
  2533.          ZOutTxt$(2) = "CTTY " + _
  2534.                  Port$ : _
  2535.          ZOutTxt$(3) = ZDiskForDos$ + _
  2536.                  "COMMAND" : _
  2537.          ZOutTxt$(4) = "CTTY CON" : _
  2538.          ZOutTxt$(5) = ZRBBSBat$ _
  2539.       ELSE ZFF = 3 : _
  2540.            ZOutTxt$(2) = ZDiskForDos$ + _
  2541.                    "COMMAND >" + _
  2542.                    Port$ + _
  2543.                    " <" + _
  2544.                    Port$ : _
  2545.            ZOutTxt$(3) = ZRBBSBat$
  2546. * REPLACING old line(s) by new
  2547. 10950 CALL AMorPM
  2548.       CALL UpdtCalr ("Exited to DOS at " + ZTime$,2)
  2549. * ------[ first line different ]------
  2550.       CALL QuickTPut1 ("RBBS-PC " + ZVersionID$)                     ' DD012701
  2551.       CALL QuickTPut1 ("Remote Exit To DOS")                         ' DD012701
  2552.       CALL QuickTPut1 ("Type EXIT to Return.")                       ' DD012701
  2553.       CALL QuickTPut1 ("SysOp in Remote Console mode")
  2554.       CALL RBBSExit (ZOutTxt$(),ZFF)
  2555. * INSERTING new line(s)
  2556. 10955 ZOutTxt$ = "Enter Name of DOOR to use including Extension"     'Pe 10/18/90
  2557.       CALL TGet                                                      ' Mpl090202
  2558.       CALL AllCaps (ZUserIn$)                                        ' Mpl090202
  2559.       IF ZUserIn$ = "" or ZWasQ = 0 THEN _                           ' Mpl090202
  2560.          GOTO 10940                                                  ' Mpl090202
  2561.       ZWasZ$ = ZUserIn$                                              ' Mpl090202
  2562.       CALL DoorExit (ZFalse)                                         ' Mpl090202
  2563.       END SUB
  2564. * REPLACING old line(s) by new
  2565. 10976 ' $SUBTITLE: 'WordInFile -- Searches a file to find a word'
  2566. ' $PAGE
  2567. '  NAME    -- WordInFile
  2568. '
  2569. '  INPUTS  -- PARAMETER             MEANING
  2570. '             FilName$              FILE TO SEARCH IN
  2571. '             Strng$                STRING TO SEARCH FOR
  2572. '
  2573. '  OUTPUTS -- InFile                WHETHER STRING Found IN FILE
  2574. '
  2575. '  PURPOSE -- Searches for "Strng$" in file "FILNAME$."  Used to
  2576. '             limit doors and questionnaires to those specified
  2577. '             in their menu files.  The "Strng$" is capitalized
  2578. '             but not the lines in the file, so must be exact
  2579. '             case-sensitive match to be found.  The only character
  2580. '             that can immediately proceed or end a name to be
  2581. '             found must be a blank.
  2582. '
  2583.       SUB WordInFile (FilName$,Strng$,InFile) STATIC
  2584.       InFile = ZFalse
  2585.       CALL FindIt (FilName$)
  2586.       IF NOT ZOK THEN _
  2587.          EXIT SUB
  2588.       WasX = 0
  2589.       CALL AllCaps (Strng$)
  2590.       WHILE NOT EOF(2) AND WasX < 1
  2591.          LINE INPUT #2,ZOutTxt$
  2592. * ------[ first line different ]------
  2593.          CALL AllCaps (ZOutTxt$)                                     ' DD021404
  2594.          WasY = 1
  2595. * REPLACING old line(s) by new
  2596. 10978    WasX = INSTR(WasY,ZOutTxt$,Strng$)
  2597.          IF WasX < 1 THEN _
  2598.             GOTO 10980
  2599. * ------[ first line different ]------
  2600. '         WasY = WasX + 1                                            ' DD111402
  2601. '         IF WasX > 1 THEN _                                         ' DD111402
  2602. '            IF MID$(ZOutTxt$,WasX - 1,1) <> SPACE$(1) THEN _        ' DD021301
  2603. '               WasX = 0                                             ' DD111402
  2604. '         IF WasX > 0 THEN _                                         ' DD111402
  2605. '            WasL = LEN(Strng$) : _                                  ' DD111402
  2606. '            IF LEN(ZOutTxt$) => (WasX + WasL) THEN _                ' DD111402
  2607. '               IF MID$(ZOutTxt$,WasX + WasL,1) <> SPACE$(1) THEN _  ' DD021301
  2608. '                  WasX = 0                                          ' DD111402
  2609. '         IF WasX = 0 THEN _                                         ' DD111402
  2610. '            GOTO 10978                                              ' DD111402
  2611. * REPLACING old line(s) by new
  2612. 10983 ' $SUBTITLE: 'DoorExit -- Setup to exit to a "door"'
  2613. ' $PAGE
  2614. '  NAME    -- DoorExit
  2615. '
  2616. '  INPUTS  -- PARAMETER             MEANING
  2617. '             ZMultiLinkPresent
  2618. '             ZNodeID$
  2619. '             ZRBBSBat$
  2620. '             ZWasZ$
  2621. '
  2622. '  OUTPUTS -- ZWasQ                    NUMBER OF LINES TO WRITE OUT TO
  2623. '                                      ZRCTTYBat$
  2624. '             ZUserIn$()               LINES TO WRITE OUT TO ZRCTTYBat$
  2625. '
  2626. '  PURPOSE -- Set up ZUserIn$() and ZWasQ in order to call "EXITRBBS" and
  2627. '             exit RBBS-PC to invoke another program
  2628. '
  2629.       SUB DoorExit (ReqDoorsDef) STATIC
  2630.       IF ZWasZ$ = "" OR _
  2631.          ZWasZ$ = "NONE" THEN _
  2632.          EXIT SUB
  2633.       CALL FindIt (ZWasZ$)
  2634.       IF NOT ZOK THEN _
  2635.          GOTO 10986
  2636.       CALL BreakFileName (ZWasZ$,WasX$,ExitTo$,ExitMethod$,ZFalse)
  2637.       ExitMethod$ = ""
  2638.       ZDooredTo$ = ExitTo$
  2639.       CALL FindIt (ZDoorsDef$)
  2640.       IF NOT ZOK THEN _
  2641.          IF ReqDoorsDef THEN _
  2642.             EXIT SUB _
  2643. * ------[ first line different ]------
  2644.          ELSE ExitTo$ = ExitTo$ + SPACE$(1) + ZNodeID$ : _           ' DD021301
  2645.               GOTO 10989
  2646. * REPLACING old line(s) by new
  2647. * ------[ first line different ]------
  2648. 10985 CALL ReadParms (ZOutTxt$(),10,1)                               ' DD011801/DOORS
  2649.       IF ZErrCode > 0 THEN _
  2650.          IF ReqDoorsDef THEN _
  2651.             EXIT SUB _
  2652.          ELSE ExitTo$ = ExitTo$ + SPACE$(1) + ZNodeID$ : _           ' DD021301
  2653.               GOTO 10989
  2654.       IF ExitTo$ <> ZOutTxt$(1) THEN _
  2655.          GOTO 10985
  2656.       CALL CheckInt (ZOutTxt$(2))
  2657.       IF ZErrCode > 0 THEN _
  2658.          ZErrCode = 0 : _
  2659.          GOTO 10985
  2660.       IF ZUserSecLevel < ZTestedIntValue THEN _
  2661.          CALL QuickTPut1 ("Insufficient security for door") : _
  2662.          EXIT SUB
  2663.       WasX$ = LEFT$(ZOutTxt$(5),INSTR(ZOutTxt$(5)+SPACE$(1),SPACE$(1))-1) ' DD021301
  2664.       CALL FindIt (WasX$)
  2665.       IF NOT ZOK THEN _
  2666.          GOTO 10986
  2667.       ZFileName$ = ZOutTxt$(3)
  2668.       ExitMethod$ = ZOutTxt$(4)
  2669.       ExitTemplate$ = ZOutTxt$(5)
  2670.       ZDoorDisplay$ = ZOutTxt$(7)
  2671.       ZDoorTime$ = ZOutTxt$(8)
  2672.       ZDoorDropFile$ = ZOutTxt$(9)                                   ' DD121702/DOORS
  2673.       ZDoorCarrierDropOK$ = ZOutTxt$(10)                             ' DD011801/DOORCARRIERDROP
  2674. '     CALL AskUsers                                                  ' DD022101
  2675.       CALL Graphic (ZFileName$)                                      ' DD022101
  2676.       CALL BufFile (ZFileName$,WasX)                                 ' DD022101
  2677.       CALL SmartText (ExitTemplate$,ZFalse,ZFalse,ZFalse)            'Pe 02/06/93
  2678.       CALL MetaGSR (ExitTemplate$,ZFalse)
  2679.       ExitTo$ = ExitTemplate$
  2680.       GOTO 10989
  2681. * REPLACING old line(s) by new
  2682. 10986 ZOutTxt$ = "Missing door program"
  2683. * ------[ first line different ]------
  2684.       CALL UpdtCalr (ZOutTxt$ + SPACE$(1) + ZWasZ$,1)                ' DD021301
  2685.       ZSnoop = ZTrue
  2686.       CALL LPrnt (ZOutTxt$,1)
  2687.       EXIT SUB
  2688. * REPLACING old line(s) by new
  2689. 10989 IF ZTransferFunction = 3 THEN _
  2690.          ZWasY$ = "Registration" _
  2691.       ELSE ZWasY$ = ZDooredTo$
  2692. * ------[ first line different ]------
  2693.       ZOutTxt$ = ZFG2$ + "Swapping " + ZFGB$ + ZOrigRBBSName$ + _    ' DD082502
  2694.                  ZFG2$ + " out and the " + _                         ' DD082502
  2695.                  ZFGB$ + ZWasY$ + ZFG2$ + " door in!" + _            ' DD082502
  2696.                  ZEmphasizeOff$                                      ' DD062401
  2697.       ZSubParm = 5
  2698.       CALL TPut
  2699.       CALL UpdtCalr (ZDooredTo$ + " door opened!",2)
  2700.       CALL DoorInfo
  2701.       IF ExitMethod$ = CHR$(83) THEN _                         'S    ' DD021301
  2702.          CALL UpdateU (ZFalse) : _
  2703.          CLOSE 4,5,16 : _                                            ' DD050701
  2704.          CALL ShellExit (ExitTemplate$) : _
  2705.          ZPrevCaller$ = "" : _
  2706.          CALL SetCall : _
  2707.          ZExitToDoors = ZTrue : _
  2708.          CALL DoorReturn : _
  2709.          CALL Graphic (ZDoorDisplay$) : _                            ' DD022102
  2710.          CALL BufFile (ZDoorDisplay$,WasX) : _
  2711.          ZExitToDoors = ZFalse _
  2712.       ELSE ZOutTxt$(1) = ZDiskForDos$ + _
  2713.                   "COMMAND /C " + _
  2714.                   ExitTo$ : _
  2715.            ZOutTxt$(2) = ZRBBSBat$ : _
  2716.            CALL RBBSExit (ZOutTxt$(),2)
  2717.       END SUB
  2718. * REPLACING old line(s) by new
  2719. 10991 ' $SUBTITLE: 'DoorInfo -- Write info for doors to file'
  2720.       SUB DoorInfo STATIC
  2721.       CLOSE 2
  2722. * ------[ first line different ]------
  2723.       IF ZDoorDropFile$ = CHR$(82) OR ZDoorDropFile$ = CHR$(83) THEN _ ' DD021301/DOORS
  2724.          CALL DoorSys : _                                            ' DD121702/DOORS
  2725.          EXIT SUB                                                    ' DD121702/DOORS
  2726.       IF ZDoorDropFile$ = CHR$(80) THEN _                'P          ' DD021301/DOORS
  2727.          CALL PCBoardSys : _                                         ' DD121702/DOORS
  2728.          EXIT SUB                                                    ' DD121702/DOORS
  2729. '     IF ZDoorDropFile$ = CHR$(87) THEN _                'W          ' DD021301/DOORS
  2730. '        CALL CallInfoBBS : _                                        ' DD121702/DOORS
  2731. '        EXIT SUB                                                    ' DD121702/DOORS
  2732.       OPEN "O",2,"DORINFO" + _
  2733.                  ZNodeFileID$ + _
  2734.                  ".DEF"
  2735.       PRINT #2,ZRBBSName$
  2736.       PRINT #2,ZSysopFirstName$
  2737.       PRINT #2,ZSysopLastName$
  2738.       IF ZLocalUser THEN _
  2739.          PRINT #2,"COM0" _
  2740.       ELSE PRINT #2,ZComPort$
  2741.       ZUserIn$ = MID$(ZBaudParity$, INSTR(ZBaudParity$, CHR$(44)))   ' DD021301
  2742.       PRINT #2,ZTalkToModemAt$;" BAUD";ZUserIn$                      ' KG071101
  2743.       PRINT #2,ZNetworkType
  2744.       IF ZGlobalSysop THEN _
  2745.          PRINT #2,"SYSOP" : _
  2746.          PRINT #2,"" _
  2747.       ELSE PRINT #2,OrigFirstName$ : _                               'Lk Alias fix
  2748.            PRINT #2,ZLastName$
  2749.       PRINT #2,ZCityState$
  2750.       IF ZWasGR > 2 THEN PRINT #2,2 _                                ' DD061301
  2751.       ELSE PRINT #2,ZWasGR                                           ' DD040201
  2752.       PRINT #2,ZUserSecLevel
  2753.       CALL TimeRemain (MinsRemaining)
  2754.       CALL CheckInt (ZDoorTime$)
  2755.       IF ZErrCode = 0 AND ZTestedIntValue > 0 THEN _
  2756.          IF MinsRemaining > ZTestedIntValue THEN _
  2757.             MinsRemaining = ZTestedIntValue
  2758.       PRINT #2,INT(MinsRemaining)
  2759.       PRINT #2,ZFossil
  2760.       CLOSE 2
  2761.       END SUB
  2762. * REPLACING old line(s) by new
  2763. 10994 CLOSE 3
  2764.       ZExitToDoors = ZTrue
  2765.       IF NOT ZFossil THEN _
  2766.          OUT ZModemCntlReg,INP(ZModemCntlReg) OR 1
  2767. * ------[ first line different ]------
  2768. '     IF NOT ZPrivateDoor THEN _                                     ' DD090401
  2769. '        CALL MLInit (2)                                             ' DD090401
  2770. * REPLACING old line(s) by new
  2771. 12000 ' $SUBTITLE: 'SetSection -- Setup section prompts'
  2772. ' $PAGE
  2773. '  NAME    -- SetSection         Doug Azzarito
  2774. '
  2775. '  INPUTS  -- PARAMETER             MEANING
  2776. '             ZMenuIndex      2 = user is in MAIN section
  2777. '                             3 = user is in FILE section
  2778. '                             4 = user is in UTIL section
  2779. '                             6 = user is in LIBR section
  2780. '
  2781. '  OUTPUTS -- ZSection$       4 character section name
  2782. '             ZActiveMenu$    1 character section name
  2783. '             ZSectionPrompt$ Section name (if ZShowSection config)
  2784. '             ZCmdPrompt$     Command input prompt string
  2785. '             ZSectionOpts$   List of options valid in this sect
  2786. '             ZInvalidOpts$   List of options invalid in this sect
  2787. '             ZSubSection     Index into security array for section
  2788. '
  2789. '  PURPOSE -- To build the prompt strings for the current section
  2790. '
  2791.       SUB SetSection STATIC
  2792.       IF ZMenuIndex <> 6 THEN _
  2793.          ZCurDirPath$ = ZDirPath$
  2794. * ------[ first line different ]------
  2795.       ON ZMenuIndex GOTO 12001, 12010,12005,12020,12001              ' DD071001
  2796. * REPLACING old line(s) by new
  2797. 12010 LSET ZSection$ = "MAIN"
  2798.       ZSectionOpts$ = ZMainOpts$
  2799.       ZInvalidOpts$ = ZInvalidMainOpts$
  2800.       ZSubSection = ZBegMain
  2801.       GOTO 12025
  2802. * ------[ first line different ]------
  2803. '12015 LSET ZSection$ = "LIBR"                                       ' DD071001
  2804. '     ZSectionOpts$ = ZLibOpts$                                      ' DD071001
  2805. '     ZInvalidOpts$ = ZInvalidLibraryOpts$                           ' DD071001
  2806. '     ZSubSection = ZBegLibrary                                      ' DD071001
  2807. '     ZCurDirPath$ = ZLibDirPath$                                    ' DD071001
  2808. '     GOTO 12025                                                     ' DD071001
  2809. * DELETING old line(s)
  2810. 12015
  2811. * REPLACING old line(s) by new
  2812. 12025 ZActiveMenu$ = LEFT$(ZSection$,1)
  2813. * ------[ first line different ]------
  2814.       LSET ZLastCommand$ = ZActiveMenu$ + SPACE$(1)                  ' DD021301
  2815.       IF ZShowSection THEN _
  2816.          ZSectionPrompt$ = ZSection$ _
  2817.       ELSE ZSectionPrompt$ = "Your"
  2818.       IF ZCmndsInPrompt=0 THEN _
  2819.           ZSectionOpts$ = ""
  2820.       ZCmdPrompt$ = ZSectionPrompt$ + _
  2821.                         ZFG2$ + " command" + _                       ' DD010202
  2822.                         ZSectionOpts$
  2823.       END SUB
  2824. * REPLACING old line(s) by new
  2825. 12880 ZParseOff = ZTrue
  2826.       ZOutTxt$ = Ques$
  2827.       CALL PopCmdStack
  2828.       IF ZSubParm = -1 THEN _
  2829.          GOTO 12882
  2830.       IF ZWasQ = 0 THEN _
  2831.          GOTO 12880
  2832.       IF LEN(ZUserIn$(ZAnsIndex)) > MaxLen THEN _
  2833.          ZLastIndex = 0 : _
  2834.          CALL QuickTPut1 (STR$(MaxLen) + " chars max") : _
  2835.          GOTO 12880_
  2836.       ELSE IF LEN(ZUserIn$(ZAnsIndex)) < MinLen THEN _
  2837.               ZLastIndex = 0 : _
  2838.               CALL QuickTPut1 (STR$(MinLen) + " chars min") : _
  2839.               GOTO 12880
  2840.       Ans$ = ZUserIn$(ZAnsIndex)
  2841.       IF ZAnsIndex < ZLastIndex THEN _
  2842.          GOTO 12881
  2843.       ZOutTxt$ = ZUserIn$(ZAnsIndex) + _
  2844. * ------[ first line different ]------
  2845.            ", right?" + ZYesPrompt$                                  ' DD060101
  2846.       ZTurboKey = -ZTurboKeyUser
  2847.       ZSubParm = 1
  2848.       CALL TGet
  2849.       IF ZSubParm = -1 THEN _
  2850.          GOTO 12882
  2851.       IF ZNo THEN _
  2852.          GOTO 12880
  2853. * REPLACING old line(s) by new
  2854. 13660 ' $SUBTITLE: 'LogError - sub to log errors to CALLERS file'
  2855. ' $PAGE
  2856. '
  2857. '  NAME    -- LogError
  2858. '
  2859. '  INPUTS  --     PARAMETER                    MEANING
  2860. '                    ERR           ERROR NUMBER DETECTED BY BASIC
  2861. '                    ERL           Last LINE NUMBER ENCOUNTERED
  2862. '                                  PRIOR TO ENCOUNTERNING ERROR
  2863. '
  2864. '  OUTPUTS -- NONE
  2865. '
  2866. '  PURPOSE -- To set up a string to write to the callers log
  2867. '             indicating the date, time, error, and error line
  2868. '
  2869.       SUB LogError STATIC
  2870.       WasIX = ERR
  2871.       IF ERR < 1 THEN _
  2872.          WasIX = ZErrCode
  2873. * ------[ first line different ]------
  2874.       CALL UpdtCalr(STRING$(3,43) + SPACE$(1) + "Error " + _         ' DD021301
  2875.            STR$(WasIX) + _
  2876.            " line " + _
  2877.            STR$(ERL) + _
  2878.            " at " + _
  2879.            TIME$ + _
  2880.            " on " + _
  2881.            DATE$,2)
  2882.       END SUB
  2883. '
  2884. * REPLACING old line(s) by new
  2885. 20096 ' $SUBTITLE: 'CheckRatio - subroutine to print ul/dl ratio'
  2886. ' $PAGE
  2887. '
  2888. '  NAME    -- CheckRatio
  2889. '
  2890. '  INPUTS  --   PARAMETER                    MEANING
  2891. '               TellUser           TELL USER THEIR RATIO
  2892. '               ZDnlds             FILES DOWNLOADED
  2893. '               ZDLBytes!          BYTES DOWNLOADED
  2894. '               ZUplds             FILES UPLOADED
  2895. '               ZULBytes!          BYTES UPLOADED
  2896. '
  2897. '  OUTPUTS --   ZOK                 -1 if okay to download, 0 otherwise
  2898. '
  2899. '  PURPOSE -- To determine whether the users violated
  2900. '             their upload to download restriction
  2901. '
  2902.       SUB CheckRatio (TellUser) STATIC
  2903.       ZOK = ZTrue
  2904. * ------[ first line different ]------
  2905.       IF ZFreeDnld THEN _                                            ' Mpl090202
  2906.          GOTO 20110
  2907. '
  2908. ' Detemine method of ratio checking.  Look ahead to amount downloaded
  2909. '
  2910.       IF ZByteMethod = 1 OR ZByteMethod = 3 THEN _
  2911.          Method$ = "Bytes" : _
  2912.          ULWork# = ZULBytes! : _
  2913.          DLWork# = ZDLBytes! + ZNumDnldBytes!
  2914.       IF ZByteMethod = 0 OR ZByteMethod = 2 THEN _
  2915.          Method$ = "Files" : _
  2916.          ULWork# = ZUplds : _
  2917.          DLWork# = ZDnlds + ZDownFiles
  2918.       IF ULWork# < ZInitialCredit# THEN _
  2919.          ULWork# = ZInitialCredit#
  2920.       IF ZByteMethod = 2 THEN _
  2921.          Today# = ZRatioRestrict# - ZDLToday! - ZDownFiles
  2922.       IF ZByteMethod = 3 THEN _
  2923.          Today# = ZRatioRestrict# - ZBytesToday! - ZNumDnldBytes!
  2924. '
  2925.       Ratio# = 0
  2926.       RatioSuffix$ = ":0"
  2927.       IF ULWork# > 0 THEN _
  2928.          Ratio# = (DLWork# / ULWork#) : _
  2929.          RatioSuffix$ = ":1"
  2930.       IF ZByteMethod > 1 THEN                                        ' DGS070301-DS
  2931.          IF ZBytesToday! > 0 THEN                                    ' DGS070301-DS
  2932.             DGSTemp! = ZBytesToday!                                  ' DGS070301-DS
  2933.          END IF                                                      ' DGS070301-DS
  2934.          DGSTemp! = DGSTemp! + ZNumDnldBytes!                        ' DGS070301-DS
  2935.          ZOutTxt$ = ZFG6$ + "Today's Downloaded Files: " + _         ' DD090202
  2936.               ZFGF$ + STR$(ZDLToday! + ZDownFiles)+ZCrLf$ + _        ' DD090202
  2937.               ZFGC$ + "Number of Bytes Today: " + _                  ' DD090701
  2938.               ZFGF$ + STR$(DGSTemp!) + _                             ' DGS070301-DS
  2939.               ZEmphasizeOff$                                         ' DGS070301-DS
  2940.          ZSubParm = 5                                                ' DGS070301-DS
  2941.          CALL TPut                                                   ' DGS070301-DS
  2942.          CALL SkipLine (1)                                           ' DGS070301-DS
  2943.          GOTO 20100                                                  ' DGS070301-DS
  2944.       END IF                                                         ' DGS070301-DS
  2945.       WasX$ = STR$(Ratio#)
  2946.       X = INSTR(WasX$,CHR$(46))                                      ' DD021301
  2947.       IF X > 0 THEN _
  2948.          WasX$ = LEFT$(WasX$,X+1)
  2949.       ZOutTxt$ = ZFG6$ + Method$ + " Downloaded: " + _               ' DD081801
  2950.            ZFGF$ + STR$(DLWork#)+ZCrLf$ + _                          ' DD081801
  2951.            ZFGC$ + Method$ + " Uploaded:   " + _                     ' DD081801
  2952.            ZFGF$ + STR$(ULWork#) + ZCrLf$                            ' DD081801
  2953.       ZOutTxt$ = ZoutTxt$ +  ZFG5$ + _                               ' DD081801
  2954.            "Today's Downloaded Files: " + ZFGF$ + _                  ' DD081801
  2955.            STR$(ZDLToday! + ZDownFiles) + ZCrLf$ + _                 ' DD081801
  2956.            ZFG2$ + "Your Ratio: " + ZFGF$ + _                        ' DD081801
  2957.            WasX$ + RatioSuffix$ +ZEmphasizeOff$
  2958.       ZSubParm = 5
  2959.       CALL TPut
  2960. '
  2961. '  CHECK TO SEE IF THE USER HAS VIOLATED THEIR UL/DL RESTRICTION
  2962. '
  2963. * REPLACING old line(s) by new
  2964. * ------[ first line different ]------
  2965. 20100 IF NOT ZEnforceRatios OR ZRatioRestrict# <= 0 THEN _           ' Mpl090202
  2966.          GOTO 20110                                                  'Pe 02/16/90
  2967.       IF NOT (ZRatioRestrict# > 0 AND TellUser) THEN _
  2968.          EXIT SUB
  2969.       IF ZByteMethod <= 1 THEN _
  2970.          GOTO 20105
  2971.       IF Today# < 0 THEN                                             ' DGS070301-DS
  2972.          ZOutTxt$ = ZFGF$ + ZBG4$ + _                                ' DD082301
  2973.               "Sorry, Today's Daily Download limit of"               ' DGS070301-DS
  2974.          IF ZBytesToday! < 0 THEN                                    ' DGS070301-DS
  2975.             ZOutTxt$ = ZOutTxt$ + STR$(ZRatioRestrict# - ZBytesToday!) ' DGS070301-DS
  2976.          ELSE                                                        ' DGS070301-DS
  2977.             ZOutTxt$ = ZOutTxt$ + STR$(ZRatioRestrict#)              ' DGS070301-DS
  2978.          END IF                                                      ' DGS070301-DS
  2979.          ZOutTxt$ = ZOutTxt$ + SPACE$(1) + Method$ + " Reached" + _  ' DGS070301-DS
  2980.                     ZBG0$ + ZEmphasizeOff$                           ' DD082301
  2981.          CALL SmartPause                                             ' DD062602
  2982.          NotOver = ZFalse                                            ' DD070403
  2983.          ZNumDnldBytes! = 0                                          ' DGS070301-DS
  2984.       ELSE                                                           ' DGS070301-DS
  2985.          ZOutTxt$ = ZFG5$ + "Download balance:" + _                  ' DD082301
  2986.                 ZFG6$ + STR$(Today#) + SPACE$(1) + _                 ' DGS070301-DS                       ' DD021301
  2987.                 ZFG6$ + Method$ + ZEmphasizeOff$                     ' DD082301
  2988.          NotOver = ZTrue                                             ' DD070403
  2989.       END IF                                                         ' DGS070301-DS
  2990.       ZSubParm = 5
  2991.       CALL TPut
  2992.       CALL SkipLine(1)
  2993.       GOSUB 20106                                                    ' DD070403
  2994.       ZOK = NotOver                                                  ' DD070403
  2995.       EXIT SUB
  2996. '
  2997. * REPLACING old line(s) by new
  2998. 20105 IF Ratio# > ZRatioRestrict# OR ULWork# = 0 THEN _
  2999. * ------[ first line different ]------
  3000.          CALL PutCom (ZBellRinger$) : _                              ' DD070402
  3001.          ZOK = ZFalse : _
  3002.          ZOutTxt$ = ZFGD$ + "Sorry, DL/UL ratio of" + _              ' DD082301
  3003.               ZFGE$ + STR$(ZRatioRestrict#) + _                      ' DD082301
  3004.               ":1 " + ZFGD$ + _
  3005.               Method$ + " exceeded" + ZEmphasizeOff$ : _             ' DD070402
  3006.          ZSubParm = 5 : _
  3007.          CALL TPut : _
  3008.          ZOutTxt$ = ZFG6$ + "Minimum upload of" + ZFGB$ + _          ' DD082301
  3009.               STR$(INT(((DLWork# - (ULWork# * ZRatioRestrict#)) _
  3010.               / ZRatioRestrict#) + 1)) + _
  3011.               + SPACE$(1) + Method$ + ZFG6$ + _                      ' DD021301
  3012.               " required to download" + ZEmphasizeOff$ : _           ' DD052003
  3013.          ZDownFiles = 0 : _                                          ' DGS070301-DS
  3014.          CALL SkipLine (1) : _                                       ' DD070403
  3015.          CALL SmartPause : _                                         ' DD062602
  3016.          GOSUB 20106 : _                                             ' DD070403
  3017.          ZOK = ZFalse _
  3018.       ELSE ZOutTxt$ = ZFGE$ + _                                      ' DD082301
  3019.                 "Balance remaining before upload required:" + _      ' DD082301
  3020.                 ZFGF$ + _                                            ' DD082301
  3021.                 STR$(INT((ULWork# * ZRatioRestrict#)-DLWork#)) + _
  3022.                 SPACE$(1) + ZFGE$ +  Method$ + ZEmphasizeOff$ + _    ' DD060402
  3023.                 ZCRLf$                                               ' DD060402
  3024.       ZSubParm = 3                                                   ' DD052003
  3025.       CALL TPut
  3026. '     CALL SkipLine (1)                                              ' DD052003
  3027.       EXIT SUB                                                       ' DD070403
  3028. * INSERTING new line(s)
  3029. 20106 FilName$ = ZHelpPath$ + "RATIO" + ZHelpExtension$              ' DD070403
  3030.       CALL Graphic (FilName$)                                        ' DD070403
  3031.       CALL BufFile (FilName$,X)                                      ' DD070403
  3032.       CALL SmartPause                                                ' DD070403
  3033.       RETURN                                                         ' DD070403
  3034. * REPLACING old line(s) by new
  3035. 20141 IF ZAnsIndex >= ZLastIndex THEN _
  3036.          IF LEN(ZDefaultExtension$) > 0 THEN _
  3037. * ------[ first line different ]------
  3038.             CALL QuickTPut1 (ZFGE$ + "Default extension is " + _     ' DD092502
  3039.                              ZFGB$ + ZDefaultExtension$ + _          ' DD092502
  3040.                              ZEmphasizeOff$)                         ' DD092502
  3041.       WasZ$ = CHR$(86)                                      'V       ' DD021301
  3042.       CALL AskItems (CHR$(86),WasZ$,ZFalse,"file",ZMarkedFiles$)     ' DD021301
  3043.       IF ZSubParm = -1 OR ZWasQ = 0 THEN _
  3044.          EXIT SUB
  3045.       ZViolation$ = "View ARC"
  3046.       WasX = ZAnsIndex
  3047.       ZAnsIndex = WasX
  3048. * REPLACING old line(s) by new
  3049. 20142 IF ZAnsIndex > ZLastIndex THEN _
  3050. * ------[ first line different ]------
  3051.          IF ZLastIndex > 1 OR Drive$ <> "" THEN _                    ' KG091001
  3052.             EXIT SUB _
  3053.          ELSE GOTO 20141
  3054.       GOSUB 20143
  3055.       IF ZSubParm < 0 THEN _
  3056.          EXIT SUB
  3057.       ZAnsIndex = ZAnsIndex + 1
  3058.       GOTO 20142
  3059. * REPLACING old line(s) by new
  3060. 20143 ZWasZ$ = ZUserIn$(ZAnsIndex)
  3061.       CALL UnMarkItems (ZMarkedFiles$,ZAnsIndex, ZLastIndex,Temp,ZFalse)
  3062.       ZWasZ$ = ZUserIn$(ZAnsIndex)
  3063.       WasZ$ = ZWasZ$
  3064.       CALL AllCaps (ZWasZ$)
  3065.       CALL BreakFileName (ZWasZ$,Drive$,Prefix$,Ext$,ZFalse)
  3066.       IF Ext$ = "" THEN _
  3067.          Ext$ = ZDefaultExtension$ : _
  3068. * ------[ first line different ]------
  3069.          ZWasZ$ = ZWasZ$ + CHR$(46) + ZDefaultExtension$             ' DD021301
  3070.       ZLastExt$ = Ext$                                               'Pe 08/12/91
  3071.       ZFileNameHold$ = ZWasZ$
  3072.       ZFileName$ = ZWasZ$
  3073.       WasI = 1                                                       'Pe 04/21/92
  3074.       CALL BadFile (Prefix$,BadFileNameIndex)
  3075.       ON BadFileNameIndex GOTO 20144,20146,20147
  3076. * REPLACING old line(s) by new
  3077. * ------[ first line different ]------
  3078. 20145 IF Drive$ <> "" THEN _                                         ' KG091001
  3079.          ZFileNameHold$ = Prefix$ + CHR$(46) + Ext$ : _              ' DD021301
  3080.          CALL FindFile (ZFileName$,ZOK) _                            ' KG091001
  3081.       ELSE CALL RotorsDir (ZFileName$,ZSubDir$(),ZSubDirCount + (NOT ZSysop),ZTrue,CHR$(86)) ' DD021301
  3082.       IF ZOK THEN _
  3083.          GOTO 20148
  3084.       IF ZPersonalDnld THEN _                                        'Pe 08/12/91
  3085.          ZFileName$ = ZPersonalDrvPath$ + ZWasZ$ : _                 'Pe 08/12/91
  3086.          CALL FindFile (ZFileName$,ZOK)                              'Pe 08/12/91
  3087.       IF ZOK THEN _                                                  'Pe 08/12/91
  3088.          GOTO 20148                                                  'Pe 08/12/91
  3089.       ZWasZ$ = ZFileName$                                            'Pe 04/21/92
  3090.       CALL BreakFileName (ZFileName$,DR$,Prefix$,Ext$,ZFalse)        'Pe 04/21/92
  3091.       WasJ = INSTR(MID$(ZCompressedExt$+". ",WasI),CHR$(46))         ' DD021301
  3092.       IF WasJ = 0 THEN _                                             'Pe 04/21/92
  3093.          GOTO 20146                                                  'Pe 04/21/92
  3094.       Check$ = MID$(ZCompressedExt$,WasI,WasJ-1)                     'Pe 04/21/92
  3095.       WasI = WasI + WasJ                                             'Pe 04/21/92
  3096.       ZFileName$ = Prefix$ + CHR$(46) + Check$                       ' DD021301
  3097.       ZLastExt$ = Check$                                             'Pe 04/21/92
  3098.       ZFileNameHold$ = ZFileName$                                    'Pe 04/21/92
  3099.       GOTO 20145                                                     'Pe 04/21/92
  3100. * REPLACING old line(s) by new
  3101. 20147 CALL SecViolation
  3102.       IF ZDenyAccess THEN _
  3103.          EXIT SUB
  3104. * ------[ first line different ]------
  3105.       IF DGSViewVio THEN _                                           ' DGS-DS/TH
  3106.          EXIT SUB                                                    ' DGS-DS/TH
  3107.       GOTO 20146
  3108. * REPLACING old line(s) by new
  3109. * ------[ first line different ]------
  3110. 20148 WasX$ = ZDiskForDos$ + "VIEWFILE.BAT"                          ' DD052201
  3111.       CALL FindIt (WasX$)
  3112.       IF NOT ZOK THEN _
  3113.          GOTO 20150
  3114.       ZGSRAra$(3) = MID$(RIGHT$(ZComPort$,1)+"0",1-ZLocalUser, 1)
  3115.       CALL ReadDir (2,1)
  3116.       IF EOF(2) THEN                                                 ' DD052201
  3117.          ZWasZ$ = ZOutTxt$                                           ' DD052201
  3118.          ZGSRAra$(1) = ZFileName$                                    ' DD052201
  3119.          ZGSRAra$(2) = ZArcWork$                                     ' DD052201
  3120.       ELSE                                                           ' DD052201
  3121.          CALL TimeRemain(MinsRemaining)                              ' DD052201
  3122.          TimeStr$ = MID$(STR$(INT(MinsRemaining)),2)                 ' DD052201
  3123.          ZWasZ$ = WasX$ + " " + ZFileName$ + _                       ' DD052201
  3124.                 " " + ZArcWork$ + " " + ZGSRAra$(3) + " " + Ext$ + _ ' DD052201
  3125.                 " " + TimeStr$ + " " + _                             ' DD052201
  3126.                 LTRIM$(STR$(ZWaitBeforeDisconnect)) + " " + _        ' DD062201
  3127.                 LTRIM$(STR$(ZPageLength))                            ' DD052201
  3128.       END IF                                                         ' DD052201
  3129.       CALL FilSecChk (ZViolation$, ZFileName$, ZOK)                  ' DGS-DS/TH
  3130.       IF NOT ZOK THEN _                                              ' DGS-DS/TH
  3131.          DGSViewVio = ZTrue : _                                      ' DGS-DS/TH
  3132.          GOTO 20147                                                  ' DGS-DS/TH
  3133.       IF ZPersonalDnld THEN                                          ' DD040101
  3134.          CALL PersFilSecChk (ZViolation$,ZFileName$,ZOK)             ' DD040101
  3135.          IF NOT ZOK THEN                                             ' DD040101
  3136.             GOTO 20147                                               ' DD040101
  3137.          END IF                                                      ' DD040101
  3138.       END IF                                                         ' DD040101
  3139.       IF ZErrCode = 53 THEN _                                        ' DGS-DS/TH
  3140.          CALL UpdtCalr ("Missing file " + ZFileSecFile$,2)           ' DGS-DS/TH
  3141.       IF ZErrCode = 62 THEN _                                        ' DGS-DS/TH
  3142.          CALL UpdtCalr (ZFileSecFile$ + " Bad format!",2)            ' DGS-DS/TH
  3143.       CALL QuickTPut1 (ZFGA$ + ZFileNameHold$ + _                    ' DD092502
  3144.                        ZFGE$ + " has these files:" + _               ' DD092502
  3145.                        ZEmphasizeOff$)                               ' DD092502
  3146.       CALL ShellExit (ZWasZ$)
  3147.       CALL BufFile (ZArcWork$,WasX)
  3148.       RETURN
  3149. 20150'WasX = INSTR(".ARC.PAK.ZIP.LZH.","."+Ext$+".")                 ' DD040101
  3150.       'IF (WasX < 1) OR (WasX = 1 AND NOT ZTurboRBBS) THEN _
  3151. '     IF (WasX < 1) THEN _                                           ' DD040101
  3152.          CALL QuickTPut1 ("View for "+Ext$+" not implemented")       ' DD040101
  3153. '        RETURN                                                      ' DD040101
  3154. '     CALL QuickTPut1 (ZFileNameHold$ + " has these files")          ' DD040101
  3155. '     CALL ViewArc                                                   ' DD040101
  3156.       RETURN
  3157.       END SUB
  3158. * DELETING old line(s)
  3159. 20150
  3160. * REPLACING old line(s) by new
  3161. 20235 ' $SUBTITLE: 'BadName - subroutine to find bad file names'
  3162. ' $PAGE
  3163. '
  3164. '  NAME    -- BadName
  3165. '
  3166. '  INPUTS  --     PARAMETER                    MEANING
  3167. '               ZActiveMessageFile$
  3168. '               ZActiveUserFile$
  3169. '               ZCallersFile$
  3170. '               ZCmntsFile$
  3171. '               CONFIG.FILEANAME$
  3172. '               ZMainMsgBackup$
  3173. '               ZMainMsgFile$
  3174. '               ZMaxViolations
  3175. '               ZPswdFile$
  3176. '               ZRBBSBat$
  3177. '               ZRCTTYBat$
  3178. '               ZSubDir$()
  3179. '               ZSubDirIndex
  3180. '               ZViolation$
  3181. '               ZViolationsThisSession
  3182. '               ZWasZ$                          NAME OF FILE
  3183. '               ProtectExt              -1 if check for extension
  3184. '                                        0 to allow any extension
  3185. '
  3186. '  OUTPUTS  -- BadFileNameIndex         1 = FILE NAME IS OK
  3187. '                                       2 = SECURITY BREACH TRIED
  3188. '
  3189. '  PURPOSE -- To protect RBBS-PC against the use of bad file names
  3190. '             to either crash the system or to breach RBBS-PC's security
  3191. '
  3192.       SUB BadName (BadFileNameIndex,ProtectExt) STATIC
  3193. '
  3194. '
  3195. ' *  TEST FOR SYSTEM FILE ATTEMPT
  3196. '
  3197.       BadFileNameIndex = 2
  3198.       ZWasZ$ = ZFileName$
  3199.       CALL BreakFileName (ZFileName$,DR$,Prefix$,Extension$,ZFalse)
  3200.       IF LEN(Extension$) = 3 AND ProtectExt THEN _
  3201. * ------[ first line different ]------
  3202.          IF INSTR("DEF,MNU,OLD,PUI,BAK,",Extension$+CHR$(44)) > 0 THEN _ ' DD021301
  3203.             EXIT SUB
  3204.       ZOK = 0
  3205.       IF ProtectExt THEN _
  3206.          CALL FileNameCheck (ZActiveMessageFile$,Prefix$,Extension$)
  3207.       CALL FileNameCheck (ZActiveUserFile$,Prefix$,Extension$)
  3208.       CALL FileNameCheck (ZCallersFile$,Prefix$,Extension$)
  3209.       CALL FileNameCheck (ZCmntsFile$,Prefix$,Extension$)
  3210.       CALL FileNameCheck (ZFileSecFile$,Prefix$,Extension$)
  3211.       CALL FileNameCheck (ZMainMsgBackup$,Prefix$,Extension$)
  3212.       CALL FileNameCheck (ZOrigMsgFile$,Prefix$,Extension$)
  3213.       CALL FileNameCheck (ZOrigUserFile$,Prefix$,Extension$)
  3214.       CALL FileNameCheck (ZPswdFile$,Prefix$,Extension$)
  3215.       CALL FileNameCheck (ZRBBSBat$,Prefix$,Extension$)
  3216.       CALL FileNameCheck (ZRCTTYBat$,Prefix$,Extension$)
  3217.       CALL FileNameCheck (ZConfigFileName$,Prefix$,Extension$)
  3218.       IF ZOK = 0 THEN _
  3219.          BadFileNameIndex = 1
  3220.       END SUB
  3221. * REPLACING old line(s) by new
  3222. 20246 IF BaudTest! = 14400 THEN _
  3223.          BPS = -9 _
  3224.       ELSE IF BaudTest! = 16800 THEN _
  3225.          BPS = -10 _
  3226.       ELSE IF BaudTest! = 7200 THEN _
  3227.          BPS = -6 _
  3228.       ELSE IF BaudTest! = 12000 THEN _
  3229.          BPS = -8 _
  3230.       ELSE BPS = -7       ' 9600
  3231.       END SUB
  3232. * ------[ first line different ]------
  3233. '
  3234. * INSERTING new line(s)
  3235. 20340 ' $SUBTITLE: 'QuickPeek - Easy find user to send message to'   ' DD062502
  3236. ' $PAGE                                                              ' DD062502                                                                     ' DD062502
  3237. '  NAME    -- QuickPeek - A Dan & Howard Mod - Dan Drinnon 1992      ' DD062502
  3238. '                                                                    ' DD062502
  3239. '  INPUTS  --     PARAMETER                    MEANING               ' DD062502
  3240. '                                                                    ' DD062502
  3241. '  OUTPUTS --     ZUserIn$                Search String User Input   ' DD062502
  3242. '                 MsgTo$                  Who Message is To          ' DD062502
  3243. '  PURPOSE -- Save User keystrokes when looking for message addressee' DD062502
  3244. '                                                                    ' DD062502
  3245.       SUB QuickPeek (ZUserIn$,MsgTo$,Found)  Static                  ' DD070801
  3246.       IF Found = ZTrue THEN EXIT SUB                                 ' DD070801
  3247.       IF ZFileSysParm < 1 THEN                                       ' DD041302
  3248.          Action$ = "Send "                                           ' DD041302
  3249.       ELSE                                                           ' DD041302
  3250.          Action$ = "Upload "                                         ' DD041302
  3251.       END IF                                                         ' DD041302
  3252.       ZLastDateTimeOnSave$ = ZLastDateTimeOn$                        ' DD062502
  3253.       HoldRecordPosition$ = ZUserRecord$                             ' DD081401
  3254.       UserInName$ = ZUserIn$                                         ' DD062502
  3255.       WhichUser = 1                                                  ' DD062502
  3256.       CALL QuickTPut (ZFG5$ + "Searching For " + _                   ' DD041302
  3257.                       ZFGB$ + MsgTo$ + ZEmphasizeOff$,0)             ' DD041302
  3258.       NumDots = 0                                                    ' DD081401
  3259.       CALL OpenUser (ZHighestUserRecord)                             ' DD062502
  3260.       WHILE NOT EOF(5)                                               ' DD062502
  3261.          GET #5, WhichUser                                           ' DD062502
  3262.          TempMsgTo$ = ZUserName$                                     ' DD062502
  3263.          CALL TRIM (TempMsgTo$)                                      ' DD062502
  3264.          IF UserInName$ = TempMsgTo$ THEN EXIT SUB                   ' DD062502
  3265.          IF INSTR(TempMsgTo$,UserInName$) > 0 THEN                   ' DD062502
  3266.          IF TempMsgTo$ = ZSecretName$ AND _                          ' DD121002
  3267.             UCASE$(ZSecretName$) <> ZSysopFirstName$ + SPACE$(1) + _ ' DD030501
  3268.             LEFT$(ZSysopLastName$,LEN(ZSysopLastName$)-1) THEN _     ' DD030501
  3269.             GOTO 20350                                               ' DD121002
  3270.          ZSubParm = 1                                                ' DD062502
  3271.          CALL QuickTPut (ZBackSpace$,0)                              ' DD041302
  3272.          CALL SkipLine (1)                                           ' DD031302
  3273.          CALL QuickTPut (ZFGE$ + Action$ + "To: " + ZFG2$ + _        ' DD041302
  3274.                          TempMsgTo$ + ZEmphasizeOff$,0)              ' DD041302
  3275.          ZoutTxt$ = " (Y)es,[N]o,A)bort)"                            ' DD041302
  3276.          ZTurboKey = -ZTurboKeyUser                                  ' DD062502
  3277.          CALL PopCmdStack                                            ' DD062502
  3278.          IF ZSubParm = -1 THEN _                                     ' DD062502
  3279.             LSET ZUserRecord$ = HoldRecordPosition$ : _              ' DD081401
  3280.             EXIT SUB                                                 ' DD062502
  3281.          ZWasZ$ = ZUserIn$(1)                                        ' DD062502
  3282.          CALL AllCaps (ZWasZ$)                                       ' DD062502
  3283.          IF ZWasZ$ = CHR$(65) THEN _                        'A       ' DD021301
  3284.             MsgTo$ = "" : _                                          ' DD062502
  3285.             Found = ZTrue : _                                        ' DD070801
  3286.             LSET ZUserRecord$ = HoldRecordPosition$ : _              ' DD081401
  3287.             EXIT SUB                                                 ' DD062502
  3288.          IF ZWasZ$ = CHR$(89) THEN                          'Y       ' DD021301
  3289.             MsgTo$ = TempMsgTo$                                      ' DD062502
  3290.             ZUserIn$ = TempMsgTo$                                    ' DD062502
  3291.             Found = ZTrue                                            ' DD070801
  3292.             LSET ZUserRecord$ = HoldRecordPosition$                  ' DD081401
  3293.             ZLastDateTimeOn$ = ZLastDateTimeOnSave$                  ' DD062502
  3294.             EXIT SUB                                                 ' DD062502
  3295.          ELSE                                                        ' DD062502
  3296.             WhichUser=WhichUser+1 : _                                ' DD081401
  3297.             NumDots = 0 : _                                          ' DD081401
  3298.             CALL QuickTPut (ZFG5$ + "Searching For " + _             ' DD041302
  3299.                             ZFGB$ + ZUserIn$ + ZEmphasizeOff$,0)     ' DD041302
  3300.          END IF                                                      ' DD062502
  3301.          ELSE                                                        ' DD062502
  3302. 20350       WhichUser=WhichUser+1                                    ' DD080301
  3303.          END IF                                                      ' DD062502
  3304.          CALL MarkTime (NumDots)                                     ' DD012602
  3305.       WEND                                                           ' DD062502
  3306.       CALL SkipLine (1)                                              ' DD081401
  3307.       Found = ZFalse                                                 ' DD070801
  3308.       LSET ZUserRecord$ = HoldRecordPosition$                        ' DD081401
  3309.       ZLastDateTimeOn$ = ZLastDateTimeOnSave$                        ' DD062502
  3310.       END SUB                                                        ' DD062502
  3311.