home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / BBS_UTIL / BM0406_A.ZIP / 0406.ZIP / RSB30406.MRG < prev    next >
Text File  |  1994-04-06  |  130KB  |  2,608 lines

  1. * ------------[ BLED merge (c) Ken Goosens ]-------------
  2. * Merge this against RBBSSUB3.BAS to produce RBBSSUB3.BAS
  3. * RBBSSUB3.BAS:  Date 6-20-1992  Size 129071 bytes
  4. * BusiMod (tm) mods for RBBS v17.4 - (c) 1993,94 by respective authors
  5. * RBBS v17.4 (c) 1986,1992 by D Thomas Mack
  6. * ------------[ Created 04-06-1994 22:00:00 ]------------
  7. * REPLACING old line(s) by new
  8. 20310 ' $SUBTITLE: 'TestUser - interrogate user for AUTO-Downloading support'
  9. ' $PAGE
  10. '
  11. '  NAME    -- TestUser
  12. '
  13. '  INPUTS  -- NONE
  14. '
  15. '  OUTPUTS -- ZAutoDownYes         -1 IF USER'S COMMUNICATION
  16. '                                  SOFTWARE CAN DO AUTODOWNLOADING
  17. '
  18. '             ZAutoDownVerified    TRUE IF COMMUNICATIONS PGM
  19. '                                  EVER CHECKED
  20. '
  21. '  PURPOSE -- Send the user an <ESCAPE><XON> and if response
  22. '             is a recognized package, set appropriate flag.
  23. '
  24. * ------[ first line different ]------
  25.       SUB TestUser                                                   ' RM11159302
  26. '
  27. '
  28. ' *    TEST FOR COMMUNICATIONS USING WasN,8,1 Protocol AND EXECPC Talk VER 2.0+
  29. ' *     TO SEE IF CALLER CAN USE THE AUTODOWNLOAD FEATURE
  30. '
  31. '
  32.       ZAbort = ZFalse
  33.       ZAutoDownVerified = ZTrue
  34.       CALL FlushCom(ZWasY$)                          ' FLUSH THE COMM BUFFER
  35.       IF ZSubParm = -1 THEN _
  36.          EXIT SUB
  37.       CALL PutCom (ZEscape$ + ZXOn$)
  38.       IF ZAbort = ZTrue THEN _
  39.          GOTO 20315
  40.       CALL DelayTime (2)                         ' WAIT TWO SECONDS FOR Reply
  41. * REPLACING old line(s) by new
  42. 20705 ' $SUBTITLE: 'UpdtUpload -- Updates upload directory'
  43. ' $PAGE
  44. '  NAME    -- UpdtUpload
  45. '
  46. '  INPUTS  -- PARAMETER             MEANING
  47. * ------[ first line different ]------
  48. '             WasFF               1 - get description                               ' BTCH174
  49. '                                 2 - test file and update directory                ' BTCH174
  50. '                                 3 - update directory with extended description    ' BTCH174
  51. '             ZFileName$
  52. '             ZUpldDir$
  53. '             ZFileNameHold$
  54. '             ZShareIt
  55. '             ZFMSDirectory$
  56. '             ZWasQ!
  57. '             ZSecsUsedSession!
  58. '
  59. '  OUTPUTS -- ZBytesInFile#
  60. '             ZSecsPerSession!
  61. '
  62. '  PURPOSE -- Upon a successful upload, add entry to the upload
  63. '             directory and give any session time credit.
  64. '
  65.       SUB UpdtUpload (ZCategoryName$(1),ZCategoryCode$(1), LinesInDesc,WasFF) STATIC ' BTCH174
  66.       ON WasFF GOTO 20710,20707,20706
  67. * INSERTING new line(s)
  68. 20706 GOTO 20723                                                     ' RM02289401
  69. 20707 GOSUB 20734                                                    ' BTCH174
  70.       IF ZHighSpeedTransfer OR ZWasBatchTransfer THEN _              ' BTCH174/RM111301
  71.          GOSUB 20738                                                 ' BTCH174
  72.       IF NOT ZAlreadyGiven AND NOT ZHighSpeedTransfer AND NOT ZWasBatchTransfer THEN ' BTCH174/RM111301
  73.          CALL TimeRemain (MinsRemaining)
  74.          IF ZPrivateDoor THEN _
  75.             WasX! = ZUpldTimeFactor! * ZWasQ! _
  76.          ELSE WasX! = ZUpldTimeFactor! * (ZSecsUsedSession! - ZWasQ!)
  77.       END IF                                                         ' BTCH174
  78.       IF ZAbort = ZTrue THEN _                                       ' BTCH174
  79.          EXIT SUB                                                    ' BTCH174
  80.       CALL BreakFileName (ZFileName$,Pre$,Body$,Ext$,ZFalse)
  81.       WasX$ = ZDiskForDos$ + "TEST.BAT"                              ' ADPARAMS/RM112401
  82.       CALL Graphic (WasX$)                                           ' CT174/RM032401
  83.       IF NOT ZOK THEN _
  84.          GOTO 20708
  85.       CALL SkipLine (1)                                              ' BTCH174
  86.       CALL QuickTPut1 (ZFG5$ + "Testing " + ZFileNameHold$ + "  Please Wait..." + ZEmphasizeOff$) ' BTCH174/RM101601
  87.       CALL ReadDir (2,1)
  88.       ZGSRAra$(2) = ZNodeWorkDrvPath$ + "VCHK" + ZNodeFileID$
  89.       IF EOF(2) THEN _
  90.          WasX$ = ZOutTxt$ : _
  91.          ZGSRAra$(1) = ZFileName$ _
  92.       ELSE _                                                         ' BTCH174/RM111701
  93.          WasX$ = WasX$ + " " + ZFileName$ + " " + ZGSRAra$(2) + _    ' BTCH174/RM111701
  94.                   " " + ZComPort$ + " " + Ext$                       ' BTCH174/RM111701/ADPARAMS/RM112402/RM04069401
  95.       IF ZWasBatchTransfer OR ZHighSpeedTransfer THEN _              ' BTCH174/RM111601
  96.          CALL TimeBack (1)                                           ' BTCH174/RM111601
  97.       CALL ShellExit (WasX$)
  98.       CALL FindIt (ZGSRAra$(2))
  99.       IF ZOK THEN _
  100.          IF LOF(2) > 2 THEN _
  101.             ZBytesInFile# = 0.0 : _
  102.             WasX$ = "Deleting BAD upload " + ZFileNameHold$ : _
  103.             CALL QuickTPut1 (WasX$) : _
  104.             CALL UpdtCalr (WasX$,2) : _
  105.             CALL KillWork (ZFileName$) : _
  106.             ZGetExtDesc = ZFalse : _                                 ' BTCH174/RM111502
  107.             CLOSE 2 : _                                              ' BTCH174/RM120602
  108.             CALL KillWork (ZGSRAra$(2)) : _                          ' BTCH174/RM120602
  109.             EXIT SUB
  110.       IF ZWasBatchTransfer OR ZHighSpeedTransfer THEN _              ' BTCH174/RM111601
  111.          CALL TimeBack (2)                                           ' BTCH174/RM111601
  112. * REPLACING old line(s) by new
  113. 20708 WasX$ = ZDiskForDos$ + "C" + Ext$ + ZDefaultExtension$ + ".BAT"
  114.       CALL FindIt (WasX$)
  115.       IF NOT ZOK THEN _
  116. * ------[ first line different ]------
  117.          IF ZGetDescAfterTransfer THEN _                             ' RM02289401
  118.             GOTO 20740 _                                             ' RM02289401
  119.          ELSE _                                                      ' RM02289401
  120.             GOTO 20712                                               ' BTCH174
  121.       ZOutTxt$ = "Converting"
  122.       IF Ext$ = ZDefaultExtension$ THEN _
  123.          ZOutTxt$ = "Re-" + ZOutTxt$
  124.       CALL QuickTPut1 (ZOutTxt$ + " upload to "+ZDefaultExtension$+".  Please wait...")
  125.       CALL ReadDir (2,1)
  126.       IF EOF(2) THEN _
  127.          WasX$ = ZOutTxt$
  128.       ZGSRAra$(1) = ZFileName$
  129.       CALL BreakFileName (ZFileName$,Pre$,Body$,Ext$,ZTrue)
  130.       ZFileNameHold$ = Body$ + "." + ZDefaultExtension$
  131.       ZUserIn$(0) = ZFileName$
  132.       ZFileName$ = Pre$ + ZFileNameHold$
  133.       CALL ShellExit (WasX$ + " " + Body$ + " " + ZNodeID$)
  134.       CALL FindIt (ZFileName$)
  135.       IF NOT ZOK THEN _
  136.          ZFileName$ = ZGSRAra$(1) : _
  137.          CALL FindIt (ZFileName$) : _
  138.          ZFileNameHold$ = Body$ + Ext$ : _
  139.          IF ZOK THEN _
  140.             ZFileName$ = ZFileNameHold$                              ' BTCH174
  141.       IF ZGetDescAfterTransfer THEN _                                ' RM02289401
  142.          GOTO 20740                                                  ' RM02289401
  143.       GOTO 20712                                                     ' BTCH174
  144. * DELETING old line(s)
  145. 20709
  146. * REPLACING old line(s) by new
  147. * ------[ first line different ]------
  148. 20710 ZAlreadyGiven = ZFalse                                         ' BTCH174
  149.       ZAbort = ZFalse                                                ' BTCH174
  150.       UsingDIZ = ZFalse                                              ' RM03209401
  151.       CALL QuickTPut1 (ZFG6$ + "Describe " + ZFG7$ + ZFileNameHold$ + ZEmphasizeOff$) ' BTCH174
  152.       ZOutTxt$ = ZFG6$ + "(Begin with '" + ZFG7$ + "/" + ZFG6$ + "' if for SysOp only)." ' BTCH174/RM112401/RM022401
  153.       IF NOT ZFoundExtra AND NOT ZGetDescAfterTransfer THEN _        ' BTCH174/RM112401/RM03079401
  154.          ZOutTxt$ = ZOutTxt$ + "  Enter" + ZFG7$ + " ABORT " + ZFG6$ + _
  155.                     "to cancel." + ZEmphasizeOff$                    ' BTCH174/RM112401
  156.       CALL QuickTPut1 (ZOutTxt$)                                     ' BTCH174/RM112401
  157.       CALL QuickTPut1 (ZFG7$ + LEFT$("          Min                                       ", _ ' BTCH174/RM022401
  158.                  ZMaxDescLen) + "Max" + ZEmphasizeOff$)              ' BTCH174/RM022401
  159.       CALL QuickTPut1 (ZFG5$ + LEFT$(" |----+---1+0---+---2+0---+---3+0---+---4+0---+----|", _ ' BTCH174/RM022401
  160.                  ZMaxDescLen) + "-|" + ZEmphasizeOff$)               ' BTCH174/RM022401
  161.       CALL QuickTPut (ZFG7$ + "? " + ZEmphasizeOff$,0)               ' BTCH174
  162.       ZOutTxt$ = ""
  163.       ZSubParm = 1
  164.       ZParseOff = ZTrue
  165.       CALL TGet
  166.       CALL Carrier
  167.       IF ZSubParm = -1 THEN _
  168.          ZDesc$ = " >>> Description Unavailable <<< " : _            ' RM082901
  169.          ZUCat$ = "***" : _                                          ' BTCH174/RM082901/RM111001
  170.          ZWhoTo$ = "SYSOP" : _                                       ' BTCH174/RM111001
  171.          GOTO 20722                                                  ' RM082901
  172.       TempUserIn$ = ZUserIn$                                         ' BTCH174
  173.       CALL AllCaps (TempUserIn$)                                     ' BTCH174
  174.       IF TempUserIn$ = "ABORT" THEN _                                ' BTCH174
  175.          IF ZGetDescAfterTransfer THEN _                             ' RM02289401
  176.             GOTO 20710 _                                             ' RM02289401
  177.          ELSE _                                                      ' RM02289401
  178.             ZAbort = ZTrue : _                                       ' BTCH174
  179.             TempUserIn$ = "" : _                                     ' BTCH174
  180.             EXIT SUB                                                 ' BTCH174
  181.       IF LEFT$(TempUserIn$,10) = "          " THEN _                 ' BTCH174/RM071193
  182.          CALL SkipLine(1) : _                                        ' BTCH174/RM071193
  183.          CALL QuickTPut1 (ZFG5$ + "Blank Spaces " + ZFG7$ + _        ' BTCH174/RM071193
  184.                         "ARE NOT" + ZFG5$ + " a Description!" + _    ' BTCH174/RM071193
  185.                          ZEmphasizeOff$) : _                         ' BTCH174/RM071193
  186.          CALL SkipLine (1) : _                                       ' BTCH174/RM071193
  187.          GOTO 20710                                                  ' BTCH174/RM071193
  188.       IF LEN(ZUserIn$) > ZMaxDescLen OR LEN(ZUserIn$) < 10 THEN _
  189.          CALL Skipline (1) : _                                       ' BTCH174/RM112401
  190.          CALL QuickTPut1 (ZFG7$ + "10" + ZFG6$ + " chars min," + _
  191.                          ZFG7$ + STR$(ZMaxDescLen) + ZFG6$ + " max") : _' BTCH174/RM112401
  192.          CALL SkipLine (1) : _                                       ' BTCH174/RM112401
  193.          GOTO 20710
  194.       GOTO 20713                                                     ' BTCH174
  195. * REPLACING old line(s) by new
  196. * ------[ first line different ]------
  197. 20712 ZOK = 0                                                        ' BTCH174
  198.       CALL CheckNovell (ZOK)
  199.       IF ZOK <> -1 THEN _
  200.          CALL SetSharedAttr (ZFileName$, ZOK) : _
  201.          IF ZOK <> 0 THEN _
  202.             CALL PScrn ("Error setting to shared")
  203.       UsingDIZ = ZFalse                                              ' RM02289401
  204.       DIZTemp$ = ZNodeWorkDrvPath$ + "NODE" + ZNodeID$ + "DIZ"       ' BTCH174/RM102501
  205.       IF ZWhoTo$ = "ALL" THEN                                        ' BTCH174/RM102701
  206.          CALL FindItX (DIZTemp$,7)                                   ' BTCH174/RM102501
  207.          IF ZOK THEN                                                 ' BTCH174/RM102501
  208.             UsingDIZ = ZTrue                                         ' RM02289401
  209.             ZGetExtDesc = ZTrue                                      ' BTCH174/RM102501
  210.             IF LEFT$(ZDesc$,1) <> "/" AND LEFT$(ZDesc$,1) <> "\" THEN  ' BTCH174/RM102901
  211.                LINE INPUT #7,Temp$                                   ' RM02239401
  212.                CALL RemNonAlf (Temp$,31,126)                         ' RM03319401
  213.                DO WHILE LEN(Temp$) < ZMaxDescLen AND NOT EOF(7)      ' RM03319401
  214.                   LINE INPUT #7,ZOutTxt$(1)                          ' RM02239401
  215.                   Temp$ = Temp$ + " " + ZOutTxt$(1)                  ' RM02239401
  216.                   CALL RemNonAlf (Temp$,31,126)                      ' RM03319401
  217.                LOOP                                                  ' RM03319401
  218.                IF LEN(Temp$) > ZMaxDescLen THEN                      ' RM02239401
  219.                   IF MID$(Temp$,ZMaxDescLen + 1,1) <> " " THEN       ' RM02239401
  220.                      ZDesc$ = MID$(Temp$,1,ZMaxDescLen)              ' RM02239401
  221.                      FOR X = ZMaxDescLen TO 1 STEP - 1               ' RM02239401
  222.                      IF MID$(ZDesc$,X,1) <> " " THEN _               ' RM02239401
  223.                         ZDesc$ = MID$(ZDesc$,1,X - 1) _              ' RM02239401
  224.                      ELSE _                                          ' RM02239401
  225.                         X = 1                                        ' RM02239401
  226.                      NEXT                                            ' RM02239401
  227.                   ELSE                                               ' RM02239401
  228.                      ZDesc$ = MID$(Temp$,1,ZMaxDescLen)              ' RM02239401
  229.                   END IF                                             ' RM02239401
  230.                   IF LEN(ZDesc$) < 2 THEN _                          ' RM02239401
  231.                      ZDesc$ = MID$(Temp$,1,ZMaxDescLen)              ' RM02239401
  232.                ELSE                                                  ' RM02239401
  233.                   ZDesc$ = Temp$                                     ' RM02239401
  234.                END IF                                                ' RM02239401
  235.             END IF                                                   ' RM02239401
  236.             WasLL = ZRightMargin                                     ' BTCH174/RM102501
  237.             ZRightMargin = 30 + ZMaxDescLen                          ' BTCH174/RM102501
  238.             IF ZRightMargin > 74 THEN _                              ' BTCH174/RM102501
  239.                ZRightMargin = 74                                     ' BTCH174/RM102501
  240.             LinesInDesc = 0                                          ' BTCH174/RM102501
  241.             WHILE NOT EOF(7) AND LinesInDesc < ZMaxExtendedLines     ' BTCH174/RM102501/RM102901/RM02249401
  242.                LinesInDesc = LinesInDesc + 1                         ' BTCH174/RM102501
  243.                LINE INPUT #7,ZOutTxt$(LinesInDesc)                   ' BTCH174/RM102501
  244.                IF LinesInDesc = 1 THEN _                             ' RM02239401
  245.                   IF LEN(Temp$) > ZMaxDescLen THEN _                 ' RM02239401
  246.                      ZOutTxt$(LinesInDesc) = MID$(Temp$,LEN(ZDesc$) + 1) + " " + _
  247.                                               ZOutTxt$(LinesInDesc)  ' RM02239401
  248.                Temp$ = ZOutTxt$(LinesInDesc)                         ' BTCH174/RM022301
  249.                I = 1                                                 ' BTCH174/RM022301
  250.                L = LEN(Temp$)                                        ' BTCH174/RM022301
  251.                WHILE I <= L                                          ' BTCH174/RM022301
  252.                   C$ = MID$(Temp$,I,1)                               ' BTCH174/RM022301
  253.                   IF ASC(C$) = 32 THEN                               ' BTCH174/RM022301
  254.                      IF I = 1 THEN _                                 ' BTCH174/RM022301
  255.                         Temp$ = MID$(Temp$,2,L - 1) : _              ' BTCH174/RM022301
  256.                         L = L - 1 : _                                ' BTCH174/RM022301
  257.                         I = I - 1 _                                  ' BTCH174/RM022301
  258.                      ELSE _                                          ' BTCH174/RM022301
  259.                         IF I = L THEN _                              ' BTCH174/RM022301
  260.                            Temp$ = MID$(Temp$,1,L - 1) _             ' BTCH174/RM022301
  261.                      ELSE _                                          ' BTCH174/RM022301
  262.                         IF ASC(MID$(Temp$,I + 1,1)) < 33 OR _
  263.                           ASC(MID$(Temp$,I + 1,1)) > 125 THEN _      ' BTCH174/RM022301
  264.                            Temp$ = MID$(Temp$,1,I - 1) + MID$(Temp$,I + 1,L - I) : _ ' BTCH174/RM022301
  265.                            L = L - 1 : _                             ' BTCH174/RM022301
  266.                            I = I - 1                                 ' BTCH174/RM022301
  267.                      ZOutTxt$(LinesInDesc) = Temp$                   ' BTCH174/RM022301
  268.                   ENDIF                                              ' BTCH174/RM022301
  269.                   IF ASC(C$) < 32 OR ASC(C$) > 125 THEN              ' BTCH174/RM022301
  270.                      IF I = 1 THEN _                                 ' BTCH174/RM022301
  271.                         Temp$ = MID$(Temp$,2,L - 1) : _              ' BTCH174/RM022301
  272.                         L = L - 1 : _                                ' BTCH174/RM022301
  273.                         I = I - 1 _                                  ' BTCH174/RM022301
  274.                      ELSE _                                          ' BTCH174/RM022301
  275.                         IF I = L THEN _                              ' BTCH174/RM022301
  276.                            Temp$ = MID$(Temp$,1,L - 1) _             ' BTCH174/RM022301
  277.                      ELSE _                                          ' BTCH174/RM022301
  278.                         Temp$ = MID$(Temp$,1,(I - 1)) + MID$(Temp$,(I + 1),(L - I)) : _ ' BTCH174/RM022301
  279.                         L = L - 1 : _                                ' BTCH174/RM022301
  280.                         I = I - 1                                    ' BTCH174/RM022301
  281.                      ZOutTxt$(LinesInDesc) = Temp$                   ' BTCH174/RM022301
  282.                   ENDIF                                              ' BTCH174/RM022301
  283.                   I = I + 1                                          ' BTCH174/RM022301
  284.                WEND                                                  ' BTCH174/RM022301
  285.                IF LEN(ZOutTxt$(LinesInDesc)) < 1 THEN _              ' BTCH174/RM022301
  286.                   LinesInDesc = LinesInDesc - 1 _                    ' BTCH174/RM022301
  287.                ELSE _                                                ' BTCH174/RM022301
  288.                IF LEN(ZOutTxt$(LinesInDesc - 1)) < (ZRightMargin - 10) AND _
  289.                   LinesInDesc > 1 THEN _                             ' BTCH174/RM110101
  290.                   ZOutTxt$(LinesInDesc - 1) = ZOutTxt$(LinesInDesc - 1) + _
  291.                      " " + ZOutTxt$(LinesInDesc) : _                 ' BTCH174/RM110101
  292.                   ZOutTxt$(LinesInDesc) = "" : _                     ' BTCH174/RM110101
  293.                   ZOutTxt$(LinesInDesc + 1) = "" : _                 ' BTCH174/RM110101
  294.                   LinesInDesc = LinesInDesc - 1                      ' BTCH174/RM110101
  295.             WEND                                                     ' BTCH174/RM102501
  296.             IF LinesInDesc = 0 AND LEN(ZDesc$) > 0 AND EOF(7) AND _
  297.                 LEN(Temp$) > ZMaxDescLen AND ZMaxExtendedLines > 0 THEN _ ' RM02239401/RM02249401
  298.                LinesInDesc = 1 : _                                   ' RM02239401
  299.                ZOutTxt$(LinesInDesc) = MID$(Temp$,LEN(ZDesc$) + 1)   ' RM02239401
  300.             CLOSE 7                                                  ' BTCH174/RM102501
  301.             CALL WordWrap (ZRightMargin,LinesInDesc,ZOutTxt$())      ' BTCH174/RM102501
  302.             CALL KillWork (DIZTemp$)                                 ' BTCH174/RM102501/RM02289401
  303.             IF ZGetDescAfterTransfer THEN _                          ' RM02289401
  304.                RETURN                                                ' RM02289401
  305.             CALL QuickTPut1 (ZEmphasizeOn$ + _
  306.                "Using Description contained within archive." + _
  307.                 ZEmphasizeOff$)                                      ' BTCH174/RM103001/RM01099402
  308.             GOSUB 20717                                              ' BTCH174/RM102501
  309.             ZGetExtDesc = ZFalse                                     ' BTCH174/RM102501
  310.             ZRightMargin = WasLL                                     ' BTCH174/RM102501
  311.             GOTO 20726                                               ' BTCH174/RM102501
  312.          END IF                                                      ' BTCH174/RM102501
  313.       END IF                                                         ' BTCH174/RM102501
  314.       CALL FindFile (DIZTemp$,ZOK)                                   ' RM02289401
  315.       IF ZOK THEN _                                                  ' RM02289401
  316.          CALL KillWork (DIZTemp$)                                    ' RM02289401
  317.       IF ZGetDescAfterTransfer THEN _                                ' RM02289401
  318.          RETURN                                                      ' RM02289401
  319.       IF ZGetExtDesc THEN _                                          ' BTCH174
  320.          EXIT SUB                                                    ' BTCH174
  321.       GOSUB 20717                                                    ' BTCH174
  322.       GOTO 20726                                                     ' BTCH174
  323. * INSERTING new line(s)
  324. 20713 ZDesc$ = ZUserIn$                                              ' BTCH174
  325.       IF NOT ZLimitSearchToFMS THEN                                  ' RM02289401
  326.          IF ZFMSDirectory$ <> ZUpldDir$ THEN
  327.             IF LEFT$(ZUserIn$,1) = "/" OR LEFT$ (ZUserIn$,1) = "\" THEN ' BTCH174
  328.                IF ZGetDescAfterTransfer THEN                         ' RM02289401
  329.                   GOTO 20722                                         ' RM02289401
  330.                ELSE                                                  ' RM02289401
  331.                   GOSUB 20739                                        ' BTCH174/RM102901
  332.                   GOTO 20722                                         ' BTCH174
  333.                END IF                                                ' RM02289401
  334.             ELSE
  335.                GOTO 20718
  336.             END IF
  337.          END IF
  338.       END IF
  339. * REPLACING old line(s) by new
  340. * ------[ first line different ]------
  341. 20715 IF LEFT$(ZUserIn$,1) = "/" OR LEFT$(ZUserIn$,1) = "\" THEN _   ' BTCH174
  342.          ZUCat$ = "***" : _                                          ' BTCH174/RM02289401
  343.          IF ZGetDescAfterTransfer THEN _                             ' RM02289401
  344.             GOTO 20722 _                                             ' RM02289401
  345.          ELSE _                                                      ' RM02289401
  346.             GOSUB 20739 : _                                          ' BTCH174/RM102901
  347.             GOTO 20722
  348.       ZUCat$ = ZDefaultCatCode$                                      ' BTCH174
  349.       GOTO 20718                                                     ' BTCH174
  350. * REPLACING old line(s) by new
  351. 20717 CALL FindItX (ZNodeWorkFile$,7)
  352. * ------[ first line different ]------
  353.       ZUserIn$ = ZDesc$                                              ' BTCH174
  354.       WasX$ = DATE$
  355.       ZWasZ$ = LEFT$(WasX$,6) + _
  356.            RIGHT$(WasX$,2)
  357.       NumPersonals = 0
  358.       IF NOT ZOK THEN _
  359.          GOTO 20723
  360.       UserFileIndexSave = ZUserFileIndex
  361.       UserRecordHold$ = ZUserRecord$
  362.       WHILE NOT EOF(7)
  363.          CALL ReadParmsX (7,ZWorkAra$(),2,1)
  364.          IF LEFT$(ZWorkAra$(1),4) <> "ALL " AND ZWorkAra$(1) <> "ALL" THEN _
  365.             ZWasEN$ = ZPersonalDir$ : _                              ' BTCH174/RM102301
  366.             NumPersonals = NumPersonals + 1 : _
  367.             ZUCat$ = ZWorkAra$(1) : _                                ' BTCH174
  368.             GOSUB 20737 : _                                          ' KG082201
  369.             GOSUB 20730 : _                                          ' BTCH174
  370.             RcvrRecNum = VAL (ZWorkAra$(2)) : _
  371.             CALL SetUserFlag (RcvrRecNum,4096,"file") : _            ' MR062303
  372.             ZWasY$ = ZFileNameHold$ + " ^Uploaded^ to " + ZWorkAra$(1) : _ ' MR062303
  373.             CALL UpdtCalr(ZWasY$,1)                                  ' MR062303
  374.       WEND
  375.       CLOSE 7
  376.       IF NumPersonals > 0 THEN _
  377.          ZUserFileIndex = UserFileIndexSave : _
  378.          LSET ZUserRecord$ = UserRecordHold$ : _
  379.          NumPersonals = 0 : _                                        ' BTCH174/RM102301
  380.          GOTO 20726                                                  ' BTCH174
  381.       GOTO 20723
  382. * REPLACING old line(s) by new
  383. * ------[ first line different ]------
  384. 20718 IF NOT ZGetDescAfterTransfer THEN _                            ' RM02289401
  385.          GOSUB 20739                                                 ' BTCH174/RM102801
  386.       IF ZSubParm = -1 OR _                                          ' BTCH174/RM102801
  387.          ZUserSecLevel < ZSLCategorizeUplds THEN _
  388.          GOTO 20722
  389. * REPLACING old line(s) by new
  390. * ------[ first line different ]------
  391. 20719 IF ZWhoTo$ <> "ALL" THEN _                                     ' BTCH174/RM102301
  392.          GOTO 20722                                                  ' BTCH174/RM102301
  393.       TempIndex = ZLastIndex                                         ' BTCH174/RM102301 old 20719
  394.       CALL BufFile (ZUpcatHelp$,WasX)                                ' BTCH174
  395.       ZLastIndex = TempIndex                                         ' BTCH174
  396. * REPLACING old line(s) by new
  397. 20720 ZOutTxt$= "Upload best fits what category (D=default,H=help)"
  398.       ZSubParm = 1
  399.       CALL TGet
  400.       CALL AraAllCaps (ZUserIn$(),1)
  401. * ------[ first line different ]------
  402.       IF ZSubParm = -1 THEN _                                        ' BTCH174
  403.          EXIT SUB                                                    ' BTCH174
  404.       IF ZUserIn$(1) = "D" THEN _                                    ' BTCH174
  405.          ZUCat$ = ZDefaultCatCode$ : _                               ' BTCH174
  406.          GOTO 20722
  407.       IF ZWasQ = 0 THEN _
  408.          GOTO 20719
  409.       IF ZUserIn$(1) = "H" OR _
  410.          ZUserIn$(1) = "*" OR _
  411.          ZUserIn$(1) = "?" THEN _
  412.          GOTO 20719
  413.       CALL SearchArray (ZUserIn$(1),ZCategoryName$(),ZNumCategories,Found)
  414.       IF Found > 0 THEN _
  415.          ZUCat$ = ZCategoryCode$(Found) : _                          ' BTCH174
  416.          IF LEN(ZUCat$) > 0 AND LEN(ZUCat$) < 4 AND INSTR(ZUCat$,",") = 0 THEN _ ' BTCH174
  417.             GOTO 20722
  418.       ZUCat$ = ""                                                    ' BTCH174
  419.       IF NOT ZLimitSearchToFMS THEN _
  420.          StrewTo$ = ZDirPath$ + _
  421.                      ZUserIn$(1) + _
  422.                      "." + _
  423.                      ZDirExtension$ : _
  424.          CALL FindIt (StrewTo$) : _
  425.          IF ZOK THEN _
  426.             GOTO 20722 _
  427.          ELSE CALL WordInFile (ZUpcatHelp$,ZUserIn$(1),ZOK) : _
  428.               IF ZOK THEN _
  429.                  GOTO 20722
  430.       StrewTo$ = ""
  431.       CALL QuickTPut1 ("No such category " + ZUserIn$(1))
  432.       GOTO 20719
  433. * REPLACING old line(s) by new
  434. * ------[ first line different ]------
  435. 20722 IF NOT ZGetDescAfterTransfer THEN _                            ' RM02289401
  436.          IF ZUpBatchTransfer THEN _                                  ' BTCH174
  437.             CALL FileLister (1) : _                                  ' BTCH174/RM111502
  438.             EXIT SUB _                                               ' BTCH174
  439.          ELSE _                                                      ' BTCH174
  440.             CALL FileLister (1)                                      ' BTCH174/RM111502
  441.       IF ZUserSecLevel >= ZAskExtendedDesc AND ZWhoTo$ = "ALL" AND _ ' BTCH174/RM102701
  442.          ZMaxExtendedLines > 0 AND ZSubParm <> -1 AND NOT ZFoundExtra AND _
  443.          NOT UsingDIZ THEN                                           ' BTCH174/RM082901/RM02289401/RM02289401
  444.          ZOutTxt$ = "Add an extended description of " + _
  445.               ZFileNameHold$ + " ([Y],N)"
  446.          ZTurboKey = -ZTurboKeyUser
  447.          ZSubParm = 1
  448.          CALL TGet
  449.          IF ZSubParm <> -1 THEN                                      ' RM02289401
  450.             IF NOT ZNo THEN                                          ' RM02289401
  451.                IF ZGetDescAfterTransfer THEN                         ' RM02289401
  452.                   ZGetExtDesc = ZTrue                                ' RM02289401
  453.                ELSE
  454.                   CALL SkipLine (2)                                  ' BTCH174
  455.                   CALL QuickTPut1 ( ZFG6$ + " Description will be entered " + _ ' BTCH174
  456.                   ZFG7$ + "AFTER" + ZFG6$ + " the " + ZFG7$ + "UPLOAD" + ZFG6$ + _ ' BTCH174
  457.                   " is completed" + ZEmphasizeOff$ + ZCrLF$)         ' BTCH174
  458.                   CALL DelayTime (2)                                 ' BTCH174
  459.                   ZGetExtDesc = ZTrue                                ' BTCH174
  460.                END IF                                                ' RM02289401
  461.             END IF
  462.          END IF
  463.       END IF
  464.       IF ZGetDescAfterTransfer THEN _                                ' RM02289401
  465.          RETURN _                                                    ' RM02289401
  466.       ELSE _                                                         ' RM02289401
  467.          EXIT SUB
  468. * REPLACING old line(s) by new
  469. * ------[ first line different ]------
  470. 20723 ZUserIn$ = ZDesc$                                              ' BTCH174
  471.       WasX$ = DATE$
  472.       ZWasZ$ = LEFT$(WasX$,6) + _
  473.            RIGHT$(WasX$,2)
  474.       ZWasEN$ = StrewTo$
  475.       GOSUB 20730                                                    ' BTCH174
  476.       ZWasEN$ = ZAllwaysStrewTo$
  477.       GOSUB 20730                                                    ' BTCH174
  478. * INSERTING new line(s)
  479. 20725 IF ZPrivateDoor THEN _                                         ' BTCH174
  480.          ZWasEN$ = ZUpldDoor$ _
  481.       ELSE ZWasEN$ = ZUpldDir$
  482.       GOSUB 20730                                                    ' BTCH174
  483. * REPLACING old line(s) by new
  484. * ------[ first line different ]------
  485. 20726 ZWasDF$ = " >> uploaded << "                                   ' BTCH174
  486.       CALL AMorPM                                                    ' BTCH174/RM101502
  487.       CALL BreakFileName (ZFileName$,DR$,WasX$,Extension$,ZTrue)     ' BTCH174
  488.       ZWasZ$ = WasX$ + Extension$ + ZWasDF$ + " at " + ZTime$ + _    ' BTCH174
  489.                " using " + ZWasFT$ + STR$(ZBytesInFile#)             ' BTCH174
  490.       CALL UpdtCalr (ZWasZ$,2)                                       ' BTCH174
  491.       ZUplds = ZUplds + 1
  492.       ZGlobalUplds = ZGlobalUplds + 1
  493.       ZULBytes! = ZULBytes! + ZBytesInFile#
  494.       ZGlobalULBytes! = ZGlobalULBytes! + ZBytesInFile#
  495.       CALL Muzak (7)
  496.       IF ZHighSpeedTransfer OR ZWasBatchTransfer THEN _              ' BTCH174/RM111301
  497.          ZAlreadyGiven = ZFalse                                      ' BTCH174
  498.       IF NOT ZAlreadyGiven THEN                                      ' BTCH174
  499.       CALL TimeRemain (MinsRemaining)
  500.       MinsToAdd = WasX! / 60
  501.       CALL ChkAddedTime (MinsToAdd)
  502.       WasX! = MinsToAdd * 60!
  503.       ZTimeCredits! = ZTimeCredits! + WasX!
  504.       ZSecsPerSession! = ZSecsPerSession! + WasX!
  505.       IF ZHighSpeedTransfer OR ZWasBatchTransfer THEN _              ' BTCH174/RM111301
  506.          WasX! = WasX! / 60.0 : _                                    ' BTCH174
  507.          GOTO 20727                                                  ' BTCH174
  508.       IF ZPrivateDoor THEN _
  509.          WasX! = (WasX! - ZWasQ!) / 60 _
  510.       ELSE WasX! = (WasX! - ZSecsUsedSession! + ZWasQ!)/60.0
  511. * REPLACING old line(s) by new
  512. * ------[ first line different ]------
  513. 20727 WasX$ = STR$(FIX(WasX!*10.0))                                  ' BTCH174
  514.       WasX$ = LEFT$(WasX$,LEN(WasX$)-1) + "." + RIGHT$(WasX$,1)
  515.       IF WasX! > 1 THEN _
  516.          IF ZHighSpeedTransfer THEN _                                ' BTCH174
  517.             CALL QuickTPut1 (ZFG6$ + "Upload Time Credit of " + WasX$ + _ ' BTCH174
  518.                         " minutes returned." + ZEmphasizeOff$) _     ' BTCH174
  519.          ELSE _
  520.             CALL QuickTPut1 (ZFG6$ + "Increased session time by" + ZFG7$ + _
  521.                         WasX$ + ZFG6$ + " minutes" + ZEmphasizeOff$) ' RM061001
  522.       ZAlreadyGiven = ZTrue                                          ' BTCH174
  523.       END IF                                                         ' BTCH174
  524.       CALL QuickTPut1 (ZFG8$ + "Thanks for the upload!" + ZEmphasizeOff$) ' RM061001
  525.       ZMenuNewUpld = ZMenuNewUpld + 1                                ' MENU174
  526.       ZGetExtDesc = ZFalse
  527.       ZPrivateDoor = ZFalse
  528.       EXIT SUB
  529. * DELETING old line(s)
  530. 20728
  531. 20729
  532. * INSERTING new line(s)
  533. 20730 '          ---[ lock file ]---                                 ' BTCH174
  534.       IF ZWasEN$ = "" THEN _
  535.          RETURN
  536.       FMSFormat = ZFalse
  537.       IF (ZWasEN$ = ZFMSDirectory$ OR ZLimitSearchToFMS _
  538.           OR NumPersonals > 0 OR (ZPrivateDoor AND ZFMSDoor)) THEN _
  539.              FMSFormat = ZTrue _
  540.       ELSE CALL FindIt (ZWasEN$) : _
  541.            IF ZOK THEN _
  542.               CALL ReadDir (2,1) : _
  543.               IF ZErrCode = 0 THEN _
  544.                  FMSFormat = (LEFT$(ZOutTxt$,4) = "\FMS")
  545.       IF NOT FMSFormat THEN _
  546.          ReadBackwards = ZFalse : _
  547.          FixedLen = 0 : _
  548.          ZUserIn$ = ZDesc$ : _                                       ' BTCH174
  549.          GOTO 20731                                                  ' BTCH174
  550.       FixedLen = 34 + ZMaxDescLen 
  551.       IF NumPersonals > 0 THEN _
  552.          WasX$ = "*" : _
  553.          MaxLen = ZPersonalLen _
  554.       ELSE MaxLen = 3 : _
  555.            WasX$ = ""
  556.       ZUCat$ = LEFT$(ZUCat$,MaxLen)                                  ' BTCH174
  557.       ZUCat$ = ZUCat$ + SPACE$(MaxLen - LEN(ZUCat$))                 ' BTCH174
  558.       ZUserIn$ = ZDesc$ + _                                          ' BTCH174
  559.                  SPACE$(ZMaxDescLen - LEN(ZDesc$)) + _               ' BTCH174
  560.                  ZUCat$ + WasX$                                      ' BTCH174
  561.       ReadBackwards = ZTrue
  562.       CALL FindIt (ZWasEN$)
  563.       IF ZOK THEN _
  564.          CALL ReadDir (2,1) : _
  565.          IF ZErrCode = 0 THEN _
  566.             ReadBackwards = (INSTR(ZOutTxt$," TOP ") = 0)
  567. * REPLACING old line(s) by new
  568. * ------[ first line different ]------
  569. 20731 CALL LockAppend                                                ' BTCH174
  570.       IF ZErrCode <> 0 THEN _
  571.          GOTO  20732                                                 ' BTCH174
  572.       '          ---[ append ]---
  573.       IF (ZWasEN$ <> ZPersonalDir$) AND _                            ' CM03129401
  574.          (ZNoWUW <> ZTrue) THEN _                                    ' CM03129401
  575.          IF ReadBackwards THEN _                                     ' BTCH174
  576.             PRINT #2, using LEFT$("\                             " _ ' BTCH174
  577.                                 + "                              " _ ' BTCH174
  578.                                 + "                    ", _          ' BTCH174
  579.                       ZMaxDescLen + 32) + "\  ."; _                  ' BTCH174
  580.                       "  Uploaded by:  "+ ZActiveUserName$           ' BTCH174
  581.       IF ZGetExtDesc THEN _
  582.          IF ReadBackwards THEN _
  583.             FOR WasI = LinesInDesc TO 1 STEP -1 : _
  584.                GOSUB 20733 : _                                       ' BTCH174
  585.             NEXT
  586.       PRINT #2,USING "\           \########  &  &"; _
  587.                      ZFileNameHold$; _
  588.                      ZBytesInFile#; _
  589.                      ZWasZ$; _
  590.                      ZUserIn$
  591.       IF ZGetExtDesc THEN _
  592.          IF NOT ReadBackwards THEN _
  593.             FOR WasI = 1 TO LinesInDesc : _
  594.                GOSUB 20733 : _                                       ' BTCH174
  595.             NEXT
  596.       IF (ZWasEN$ <> ZPersonalDir$) AND _                            ' CM03129401
  597.          (ZNoWUW <> ZTrue) THEN _                                    ' CM03129401
  598.          IF NOT ReadBackwards THEN _                                 ' BTCH174
  599.             PRINT #2, using LEFT$("\                             " _ ' BTCH174
  600.                                 + "                              " _ ' BTCH174
  601.                                 + "                    ", _          ' BTCH174
  602.                       ZMaxDescLen + 32) + "\  ."; _                  ' BTCH174
  603.                       "  Uploaded by:  "+ ZActiveUserName$           ' BTCH174
  604. * REPLACING old line(s) by new
  605. * ------[ first line different ]------
  606. 20732 CALL UnLockAppend                                              ' BTCH174
  607.       FixedLen = 0
  608.       RETURN
  609. * INSERTING new line(s)
  610. 20733 WasX$ = ZOutTxt$(WasI)                                         ' BTCH174
  611.       CALL Trim (WasX$)
  612.       IF WasX$ = "" THEN _
  613.          RETURN
  614.       IF NOT FMSFormat THEN _
  615.          PRINT #2,"  ";ZOutTxt$(WasI) : _
  616.          RETURN
  617.       IF FixedLen > LEN(ZOutTxt$(WasI)) THEN _
  618.          WasX$ = SPACE$(FixedLen - 1 - LEN(ZOutTxt$(WasI))) + "." _
  619.       ELSE WasX$ = ""
  620.       PRINT #2, "  ";LEFT$(ZOutTxt$(WasI),FixedLen);WasX$
  621.       RETURN
  622. * REPLACING old line(s) by new
  623. 20736 IF NOT ZOK THEN _
  624. * ------[ first line different ]------
  625.          ZBytesInFile# = 0.0 _
  626.       ELSE ZBytesInFile# = LOF(2)
  627.       IF ZBytesInFile# < 2.0 THEN _
  628.          ZGetExtDesc = ZFalse : _                                    ' BTCH174/RM111502
  629.          CLOSE 2 : _                                                 ' RM02289401
  630.          EXIT SUB
  631.       CLOSE 2                                                        ' RM02289401
  632.       RETURN
  633. * INSERTING new line(s)
  634. 20737 CALL CheckInt (ZUCat$)                                         ' KG082201
  635.       IF ZTestedIntValue > 0 THEN _                                  ' KG082201
  636.          ZUCat$ = " " + ZUCat$                                       ' KG082201
  637.       RETURN                                                         ' KG082201
  638. 20738 WasX! = ZBytesInFile# / _                                      ' BTCH174
  639.         (VAL(MID$("00000300045012002400480072009601200144016801920216024002640288038405760", -4 * ZCBPS,4)) * ZSpeedFactor!) ' BTCH174/BB09039301/RM11279301
  640.       IF ZHighSpeedTransfer THEN _                                   ' BTCH174/RM111501
  641.          HSFactor = ZUpldTimeFactor! - 1 _                           ' BTCH174
  642.       ELSE _                                                         ' BTCH174/RM111501
  643.          HSFactor = ZUpldTimeFactor!                                 ' BTCH174/RM111501
  644.       IF HSFactor < 0 THEN _                                         ' BTCH174
  645.          HSFactor = 0                                                ' BTCH174
  646.       WasX! = FIX(WasX!) * HSFactor                                  ' BTCH174
  647.       RETURN                                                         ' BTCH174
  648. 20739 IF NOT ZWhoToSet THEN                                          ' BTCH174/RM102701
  649.          ZWhoTo$ = ""                                                ' BTCH174/RM102701
  650.          WasY$ = ZFileName$                                          ' BTCH174/RM102701
  651.          CALL KillWork (ZNodeWorkfile$)                              ' BTCH174/RM102701
  652.          CALL CmdStackPushPop (1)                                    ' BTCH174/RM103001
  653.          ZLastIndex = 0                                              ' BTCH174/RM103001
  654.          IF ZUserSecLevel >= ZMinSecPersUpld THEN _                  ' BTCH174/RM102701
  655.             CALL SetWhoTo (ZTrue,ZWhoTo$,"",RcvrRecNum,Found,ZTrue) _ ' BTCH174/RM102701/KG012502
  656.          ELSE _                                                      ' BTCH174/RM102701
  657.             ZWhoTo$ = "ALL"                                          ' BTCH174/RM102701
  658.          CALL CmdStackPushPop (2)                                    ' BTCH174/RM103001
  659.          ZWhoToSet = ZTrue                                           ' BTCH174/RM102701
  660.          ZFileName$ = WasY$                                          ' BTCH174/RM102701
  661.       END IF                                                         ' BTCH174/RM102701
  662.       IF ZWhoTo$ <> "ALL" AND NOT ZAddingDescOnly AND NOT ZGetDescAfterTransfer THEN _ ' RM01219401/RM01289401/RM02049401/RM02289401
  663.          ZUpldSubDir$ = ZPersonalDrvPath$ : _                        ' RM01219401/RM02049401
  664.          CALL BreakFileName (ZFileName$,Pre$,Body$,Ext$,ZTrue) : _   ' RM01219401/RM02049401
  665.          ZFileName$ = ZUpldSubDir$ + Body$ + Ext$                    ' RM01219401/RM02049401
  666.       RETURN                                                         ' BTCH174/RM102301
  667. 20740 ZWhoToSet = ZFalse                                             ' RM02289401
  668.       ZWhoTo$ = ""                                                   ' RM02289401
  669.       ZGetExtDesc = ZFalse                                           ' RM02289401
  670.       GOSUB 20739                                                    ' RM02289401
  671.       GOSUB 20712                                                    ' RM02289401
  672.       IF UsingDIZ THEN _                                             ' RM02289401
  673.          ZUserIn$ = ZDesc$ : _                                       ' RM02289401
  674.          GOSUB 20713 _                                               ' RM02289401
  675.       ELSE _                                                         ' RM02289401
  676.          GOSUB 20710                                                 ' RM02289401
  677.       IF ZGetExtDesc AND NOT UsingDIZ THEN                           ' RM02289401
  678.          ZMsgHeader$ = "Extended Description for " + ZFileNameHold$  ' RM02289401
  679.          ZSysopComment = ZTrue                                       ' RM02289401
  680.          WasLL = ZRightMargin                                        ' RM02289401
  681.          ZRightMargin = 30 + ZMaxDescLen                             ' RM02289401
  682.          IF ZRightMargin > 74 THEN _                                 ' RM02289401
  683.             ZRightMargin = 74                                        ' RM02289401
  684.          ZMaxMsgLines = ZMaxExtendedLines                            ' RM02289401
  685.          MParm = 12                                                  ' RM02289401
  686.          CALL MsgSys (MParm, ActionFlag, LogOff$, LogonMailNew, UtilMarginChange) ' RM02289401
  687.          ZMaxMsgLines = ZMaxMsgLinesDef                              ' RM02289401
  688.          ZRightMargin = WasLL                                        ' RM02289401
  689.          GOTO 20723                                                  ' RM02289401
  690.       END IF                                                         ' RM02289401
  691.       IF UsingDIZ THEN _                                             ' RM02289401
  692.          CALL QuickTPut1 (ZEmphasizeOn$ + _
  693.                "Using Description contained within archive." + _
  694.                   ZEmphasizeOff$) : _                                ' RM02289401
  695.          ZMaxMsgLines = ZMaxMsgLinesDef : _                          ' RM02289401
  696.          ZRightMargin = WasLL                                        ' RM02289401
  697.       GOTO 20717                                                     ' RM02289401
  698.       END SUB
  699. * REPLACING old line(s) by new
  700. 20741 ' $SUBTITLE: 'BadFile - subroutine to find bad file names'
  701. ' $PAGE
  702. '
  703. '  NAME    -- BadFile
  704. '
  705. '  INPUTS  --     PARAMETER                    MEANING
  706. '               ZViolation$
  707. '               ZViolationsThisSession
  708. '               FilName$                      NAME OF FILE
  709. '
  710. '  OUTPUTS -- Result                      1 = FILE NAME IS OK
  711. '                                         2 = CHARACTER NOT ALLOWED
  712. '                                         3 = SYSTEM CRASH ATTEMPT
  713. '             ZViolationsThisSession     NUMBER OF VIOLATIONS
  714. '             FilName$                    Gets capitalized
  715. '
  716. '  PURPOSE -- To protect RBBS-PC against the use of bad file names
  717. '             to either crash the system or to breach RBBS-PC's security.
  718. '
  719.       SUB BadFile (FilName$,Result) STATIC
  720. '
  721. '
  722. ' *  TEST FOR INVALID CHARACTERS IN FILENAME
  723. '
  724. '
  725.       Result = 2
  726.       IF LEN(FilName$) < 1 THEN _
  727.          EXIT SUB
  728.       CALL BadFileChar (FilName$,ZOK)
  729.       IF NOT ZOK THEN _
  730.          EXIT SUB
  731.       CALL AllCaps (FilName$)
  732.       WasXX = INSTR(FilName$,".")
  733.       IF WasXX > 0 THEN _
  734.          IF WasXX < LEN(FilName$) THEN _
  735.             WasXX = INSTR(WasXX + 1,FilName$,".") : _
  736.             IF WasXX > 0 THEN _
  737.                EXIT SUB
  738.       WasXX = LEN(FilName$)
  739.       IF WasXX => 3 THEN _
  740.          IF INSTR("PRN:CON:AUX:NUL:",FilName$) THEN _
  741.             GOTO 20742
  742.       IF WasXX => 4 THEN _
  743. * ------[ first line different ]------
  744.          IF INSTR("COM1:COM2:COM3:COM4:LPT1:LPT2:LPT3:SCRN:KYBD:CONS:",FilName$) THEN _ ' RM10059301
  745.             GOTO 20742
  746.       CALL BreakFileName (FilName$,Pre$,Body$,Ext$,ZFalse)
  747.       IF LEN(Pre$) > 64 OR LEN(Body$) > 8 OR LEN(Body$) < 1 OR LEN(Ext$) > 3 THEN _
  748.          EXIT SUB
  749.       WasXX = LEN(Body$)
  750.       IF WasXX => 3 THEN _
  751.          IF INSTR("PRN:CON:AUX:NUL:",Body$) THEN _
  752.             GOTO 20742
  753.       IF WasXX => 4 THEN _
  754.          IF INSTR("COM1:COM2:COM3:COM4:LPT1:LPT2:LPT3:SCRN:KYBD:CONS:",Body$) THEN _ ' RM10059301
  755.             GOTO 20742
  756.       Result = 1
  757.       EXIT SUB
  758. * REPLACING old line(s) by new
  759. 21598 ' $SUBTITLE: 'XferType - sub to identify file xfer protocol'
  760. ' $PAGE
  761. '
  762. '  NAME    -- XferType
  763. '
  764. '  INPUTS  --     PARAMETER                    MEANING
  765. '               Index            = 1       Manual select for up/download
  766. '                                = 2       Default select
  767. '                                = 3       Set transfer default
  768. '               ZOutTxt$
  769. '               ZUserIn$(1)
  770. '               ZWasQ
  771. '               ZReliableMode
  772. '               ZTransferOption$
  773. '               ZUserXferDefault$
  774. '               ZXferSupport
  775. '
  776. '  OUTPUTS   -- ZCheckSum
  777. '               ZFLen
  778. '               ZWasFT$
  779. '
  780. '  PURPOSE -- To identify the file transfer protocol (either
  781. '             from the user's default or via explicit selection)
  782. '
  783.       SUB XferType (Index,SkipHelp) STATIC
  784. * ------[ first line different ]------
  785.       IF ZTransferOption$ = "" OR ZUserSecLevel <> PrevUSL OR PrevDef$ <> ZProtoDef$ OR ZHighSpeedTransfer THEN _ ' BTCH174
  786.          CALL Protocol : _
  787.          PrevDef$ = ZProtoDef$ : _
  788.          PrevUSL = ZUserSecLevel
  789.       WasX$ = ZOutTxt$ + "Protocol"
  790.       ON Index GOTO 21600,21620,21600
  791. '
  792. '
  793. ' *  MANUAL SELECT OF Transfer Protocol
  794. '
  795. '
  796. * REPLACING old line(s) by new
  797. 21623 CALL ReadParms (ZWorkAra$(),13,ZFF)
  798.       IF ZErrCode > 0 THEN _
  799.          ZFF = LEN(ZDefaultXfer$) : _
  800.          ZProtoPrompt$ = "None" : _
  801.          GOTO 21625
  802.       ZProtoPrompt$ = ZWorkAra$(1)
  803.       IF LEN(ZProtoPrompt$) > 2 THEN _
  804.          IF MID$(ZProtoPrompt$,2,1) = ")" THEN _
  805.             ZProtoPrompt$ = LEFT$(ZProtoPrompt$,1) + MID$(ZProtoPrompt$,3)
  806.       WasX = INSTR(ZProtoPrompt$+ZCrLf$,ZCrLf$)
  807.       ZProtoPrompt$ = LEFT$(ZProtoPrompt$,WasX-1)
  808.       CALL Trim (ZProtoPrompt$)
  809. * ------[ first line different ]------
  810.       ZProtoMethod$ = ZWorkAra$(3)                                   ' KG020501
  811.       CALL AllCaps (ZProtoMethod$)
  812.       ZReq8Bit = (LEFT$(ZWorkAra$(4),1) = "8")
  813.       ZDownTemplate$ = ZWorkAra$(12)
  814.       ZUpTemplate$ = ZWorkAra$(13)
  815.       WasX$ = ZWorkAra$(11)
  816.       WasX = INSTR(WasX$,"=")
  817.       ZAdvanceProtoWrite = ZFalse
  818.       IF WasX < 2 OR WasX >= LEN(WasX$) THEN _
  819.          ZFailureParm = 4 : _
  820.          ZFailureString$ = "F" _
  821.       ELSE ZFailureParm = VAL(LEFT$(WasX$,WasX-1)) : _
  822.            ZFailureString$ = MID$(WasX$,WasX+1) : _
  823.            WasX = INSTR(ZFailureString$,"=") : _
  824.            IF WasX > 0 THEN _
  825.               ZAdvanceProtoWrite = (MID$(ZFailureString$,WasX) = "=A") : _
  826.               ZFailureString$ = LEFT$(ZFailureString$,WasX-1)
  827.       ZProtoMacro$ = ZWorkAra$(10)
  828.       ZFakeXRpt = (LEFT$(ZWorkAra$(8),1) = "F")
  829.       ZBatchProto = (LEFT$(ZWorkAra$(6),1) = "B")
  830.       ZHighSpeedTransfer = (LEFT$(ZWorkAra$(5),1) = "H")             ' BTCH174
  831.       ZExtFileSysProcessor = (RIGHT$(ZWorkAra$(5),1) = "N")          ' RM02269401
  832.       IF ZExtFileSysProcessor THEN _                                 ' RM02269401
  833.          ZGetDescAfterTransferSave = ZGetDescAfterTransfer : _       ' RM02269401
  834.          ZGetDescAfterTransfer = ZTrue                               ' RM02269401
  835.       ZSpeedFactor! = VAL(ZWorkAra$(9))
  836.       IF ZSpeedFactor! < 0.1 THEN _
  837.          ZSpeedFactor! = 0.87
  838.       ZBlockSize = VAL(ZWorkAra$(7))
  839.       ZFLen = ZBlockSize
  840.       IF ZFLen < 1 THEN _
  841.          ZFLen = 128
  842. * REPLACING old line(s) by new
  843. 22000 IF ZMsgFileLock = ZTrue THEN _
  844.          RETURN
  845.       ZMsgFileLock = ZTrue
  846.       MID$(ZLockStatus$,1,2) = "LM"
  847.       ZSubParm = 2
  848.       CALL Line25
  849.       ZLockFileName$ = ZActiveMessageFile$
  850. * ------[ first line different ]------
  851.       ON ZNetworkType GOTO 22100,22200,22300,22400,22500,29700,29700 ' RM01109402
  852.       RETURN
  853. '
  854. '
  855. ' *  LOCK MESSAGE FILE (MULTI-LINK)
  856. '
  857. '
  858. * REPLACING old line(s) by new
  859. 25000 IF NOT ZMsgFileLock THEN _
  860.          RETURN
  861.       ZMsgFileLock = ZFalse
  862.       MID$(ZLockStatus$,1,2) = "UM"
  863.       ZSubParm = 2
  864.       CALL Line25
  865.       ZLockFileName$ = ZActiveMessageFile$
  866. * ------[ first line different ]------
  867.       ON ZNetworkType GOTO 25100,25200,25300,25400,25500,29800,29800 ' RM01109402
  868.       RETURN
  869. '
  870. '
  871. ' *  UNLOCK MESSAGE FILE (MULTI-LINK)
  872. '
  873. '
  874. * REPLACING old line(s) by new
  875. 26000 IF ZUserFileLock = ZTrue THEN _
  876.          RETURN
  877.       ZUserFileLock = ZTrue
  878.       MID$(ZLockStatus$,4,2) = "LU"
  879.       ZSubParm = 2
  880.       CALL Line25
  881.       ZLockFileName$ = ZActiveUserFile$
  882. * ------[ first line different ]------
  883.       ON ZNetworkType GOTO 26100,26200,22300,26300,22500,29720,29720 ' RM01109402
  884.       RETURN
  885. '
  886. '
  887. ' *  LOCK USER FILE (MULTI-LINK)
  888. '
  889. '
  890. * REPLACING old line(s) by new
  891. 26500 IF ZUserBlockLock = ZTrue THEN _
  892.          RETURN
  893.       ZUserBlockLock = ZTrue
  894.       ZBlk = (ZUserFileIndex / 4) + .26
  895.       MID$(ZLockStatus$,7,2) = "LB"
  896.       ZSubParm = 2
  897.       CALL Line25
  898. * ------[ first line different ]------
  899.       ON ZNetworkType GOTO 26600,26700,26800,26750,26900,29730,29730 ' RM01109402
  900.       RETURN
  901. '
  902. '
  903. ' *  LOCK 4 RECORD BLOCK IN USER FILE (MULTI-LINK)
  904. '
  905. '
  906. * REPLACING old line(s) by new
  907. 27000 IF NOT ZUserFileLock THEN _
  908.          RETURN
  909.       ZUserFileLock = ZFalse
  910.       MID$(ZLockStatus$,4,2) = "UU"
  911.       ZSubParm = 2
  912.       CALL Line25
  913.       ZLockFileName$ = ZActiveUserFile$
  914. * ------[ first line different ]------
  915.       ON ZNetworkType GOTO 27100,27200,25300,27300,25500,29820,29820 ' RM01109402
  916.       RETURN
  917. '
  918. '
  919. ' *  UNLOCK USER FILE (MULTI-LINK)
  920. '
  921. '
  922. * REPLACING old line(s) by new
  923. 27500 IF NOT ZUserBlockLock THEN _
  924.          RETURN
  925.       ZUserBlockLock = ZFalse
  926.       ZBlk = (ZUserFileIndex / 4) + .26
  927.       MID$(ZLockStatus$,7,2) = "UB"
  928.       ZSubParm = 2
  929.       CALL Line25
  930. * ------[ first line different ]------
  931.       ON ZNetworkType GOTO 27600,27700,27800,27750,27900,29830,29830 ' RM01109402
  932.       RETURN
  933. '
  934. '
  935. ' *  UNLOCK 4 RECORD BLOCK IN USER FILE (MULTI-LINK)
  936. '
  937. '
  938. * REPLACING old line(s) by new
  939. 29000 IF LockedEn$ = ZWasEN$ THEN _
  940.          RETURN
  941.       LockedEn$ = ZWasEN$
  942.       MID$(ZLockStatus$,10,2) = "LD"
  943.       ZSubParm = 2
  944.       CALL Line25
  945.       ZLockFileName$ = ZWasEN$
  946. * ------[ first line different ]------
  947.       ON ZNetworkType GOTO 29100,29010,22300,29300,22500,29710,29710 ' RM01109402
  948. * REPLACING old line(s) by new
  949. 29500 IF LockedEn$ <> ZWasEN$ THEN _
  950.          RETURN
  951.       LockedEn$ = ""
  952.       MID$(ZLockStatus$,10,2) = "UD"
  953.       ZSubParm = 2
  954.       CALL Line25
  955.       ZLockFileName$ = ZWasEN$
  956. * ------[ first line different ]------
  957.       ON ZNetworkType GOTO 29600,29510,25300,29650,25500,29810,29810 ' RM01109402
  958. * REPLACING old line(s) by new
  959. 30000 ' $SUBTITLE: 'InitIBM - sub to create/open NetBIOS semaphore file'
  960. ' $PAGE
  961. '
  962. '  NAME    -- InitIBM   (Written by Doug Azzarito)
  963. '
  964. '  INPUTS  -- NONE
  965. '
  966. '  OUTPUTS -- ZSubParm = -1   Abort RBBS
  967. '
  968. '  PURPOSE -- Open semaphore file "IBMFLAGS" on default drive as file #6
  969. '             Create file if it does not exits.
  970. '
  971. * ------[ first line different ]------
  972.       SUB InitIBM                                                    ' RM11159302
  973. '
  974. '
  975. ' *  SEE IF FILE EXISTS
  976. '
  977. '
  978.       ZShareIt = ZTrue
  979.       CALL BreakFileName (ZMainMsgFile$,IBMFlagFile$,Dummy$,Dummy$,ZTrue)
  980.       IBMFlagFile$ = IBMFlagFile$ + _
  981.                        "IBMFLAGS"
  982.       CALL FindIt (IBMFlagFile$)
  983.       CLOSE 2
  984.       IF ZOK THEN _
  985.          GOTO 30020
  986. '
  987. '
  988. ' *  CREATE A NEW FILE, EACH RECORD IS A SEMAPHORE
  989. '
  990. '
  991.       OPEN IBMFlagFile$ ACCESS WRITE AS #6 LEN=2
  992.       FIELD 6, 2 AS LockBuf$
  993.       LSET LockBuf$ = MKI$(0)
  994.       FOR WasI = 1 TO 3
  995.          PUT 6
  996.       NEXT
  997.       CLOSE #6
  998. * REPLACING old line(s) by new
  999. 30500 ' $SUBTITLE: 'OpenMsg - open the MESSAGES file'
  1000. ' $PAGE
  1001. '
  1002. '  NAME    -- OpenMsg
  1003. '
  1004. '  INPUTS  --     PARAMETER                    MEANING
  1005. '              ZActiveMessageFile$
  1006. '              ZShareIt
  1007. '
  1008. '  OUTPUTS --  ZMsgRec$
  1009. '
  1010. * ------[ first line different ]------
  1011.       SUB OpenMsg                                                    ' RM11159302
  1012. '
  1013. '
  1014. ' *  OPEN AND DEFINE MESSAGE FILE
  1015. '
  1016. '
  1017.       CLOSE 1
  1018.       IF ZShareIt THEN _
  1019.          OPEN ZActiveMessageFile$ ACCESS READ WRITE SHARED AS #1 _
  1020.       ELSE OPEN "R",1,ZActiveMessageFile$
  1021.       FIELD 1,128 AS ZMsgRec$
  1022.       END SUB
  1023. * REPLACING old line(s) by new
  1024. 30600 IF ZKeyboardStack$ = "" THEN _
  1025.          ZKeyPressed$ = INKEY$ _
  1026.       ELSE ZKeyPressed$ = ZKeyboardStack$ : _
  1027.            ZKeyboardStack$ = ""
  1028.       ZFunctionKey = 0
  1029.       IF LEN(ZKeyPressed$) <> 2 THEN _
  1030.          GOTO 33970
  1031.       ZKeyPressed = ASC(RIGHT$(ZKeyPressed$,1))
  1032.       IF ZLocalUser AND NOT ZSysop THEN _
  1033.          ZKeyPressed$ = "" : _
  1034.          GOTO 33970
  1035.       IF ZKeyPressed => ZF1Key AND _
  1036.          ZKeyPressed <= ZF10Key THEN _
  1037.              ZFunctionKey = ZKeyPressed - 58 : _
  1038.              GOTO 30610
  1039.       IF ZKeyPressed = 117 THEN _    'Ctrl-End
  1040.          ZFunctionKey = 11
  1041.       IF ZKeyPressed = 73 THEN _     'PgUp
  1042.          ZFunctionKey = 12
  1043.       IF ZKeyPressed = 72 THEN _     'up arrow
  1044.          ZFunctionKey = 13
  1045.       IF ZKeyPressed = 80 THEN _     'Down arrow
  1046.          ZFunctionKey = 14
  1047.       IF ZKeyPressed = 81 THEN _     'PgDn
  1048.          ZFunctionKey = 15
  1049.       IF ZKeyPressed = 75 THEN _     'left arrow
  1050.          ZFunctionKey = 16
  1051.       IF ZKeyPressed = 77 THEN _     'Right arrow
  1052.          ZFunctionKey = 17
  1053.       IF ZKeyPressed = 141 THEN _    'CTRL-up arrow
  1054.          ZFunctionKey = 18
  1055.       IF ZKeyPressed = 132 THEN _    'CTRL-PgUp (same as CTRL-UP)
  1056.          ZFunctionKey = 18
  1057.       IF ZKeyPressed = 145 THEN _    'CTRL-down arrow
  1058.          ZFunctionKey = 19
  1059.       IF ZKeyPressed = 118 THEN _    'CTRL-PgDn (same as CTRL-DOWN)
  1060.          ZFunctionKey = 19
  1061.       IF ZKeyPressed = 115 THEN _    'CTRL-left arrow
  1062.          ZFunctionKey = 20
  1063.       IF ZKeyPressed = 116 THEN _    'CTRL-right arrow
  1064.          ZFunctionKey = 21
  1065.       IF ZKeyPressed = 79 THEN _     'End (a nice way to kick user off)
  1066.          ZFunctionKey = 22
  1067. * ------[ first line different ]------
  1068.       IF ZKeyPressed = 94 THEN _     'CTRL-F1 (kick off twit - SysOp config) ' RM12159301
  1069.          ZFunctionKey = 23                                           ' RM12159301
  1070. * REPLACING old line(s) by new
  1071. 30610 ZKeyPressed$ = ""
  1072. * ------[ first line different ]------
  1073.       IF ZWasCM THEN _                                               ' CHAT174/RM100101
  1074.          IF (ZFunctionKey > 0 AND (ZFunctionKey =< 12)) OR _         ' CHAT174
  1075.             (ZFunctionKey = 15) OR (ZFunctionKey > 17 AND (ZFunctionKey =< 22)) THEN _ ' CHAT174
  1076.             EXIT SUB                                                 ' CHAT174
  1077.       IF ZFunctionKey < 1 OR ZFunctionKey > 23 THEN _                ' RM12159301
  1078.          GOTO 33970
  1079.       IF ZFunctionKey < 10 AND (ZFunctionKey <> 8) THEN _
  1080.          GOTO 30620
  1081.       IF ZToggleOnly THEN _
  1082.          ZSubParm = 1 : _
  1083.          GOTO 33970
  1084. * REPLACING old line(s) by new
  1085. 30620 ON ZFunctionKey GOTO  31000, _            '  1 =  F1
  1086.                             32000, _            '  2 =  F2
  1087.                             33000, _            '  3 =  F3
  1088.                             33040, _            '  4 =  F4
  1089.                             33060, _            '  5 =  F5
  1090.                             33070, _            '  6 =  F6
  1091.                             33090, _            '  7 =  F7
  1092.                             33110, _            '  8 =  F8
  1093.                             33130, _            '  9 =  F9
  1094.                             33150, _            ' 10 = F10
  1095.                             31398, _            ' 11 = CTRL END
  1096.                             33200, _            ' 12 = PGUP
  1097.                             33170, _            ' 13 = UP ARROW
  1098.                             33180, _            ' 14 = DOWN ARROW
  1099.                             33220, _            ' 15 = PGDN
  1100.                             33240, _            ' 16 = LEFT ARROW
  1101.                             33250, _            ' 17 = RIGHT ARROW
  1102.                             33170, _            ' 18 = CTRL-UP ARROW
  1103.                             33180, _            ' 19 = CTRL-DOWN
  1104.                             33245, _            ' 20 = CTRL-LEFT
  1105.                             33255, _            ' 21 = CTRL-RIGHT
  1106. * ------[ first line different ]------
  1107.                             31398, _            ' 22 = END           ' RM12159301
  1108.                             31398               ' 23 = CTRL-F1       ' RM12159301
  1109. '
  1110. '
  1111. ' * F1 - COMMAND FROM LOCAL KEYBOARD (IMMEDIATE EXIT TO DOS)
  1112. '
  1113. '
  1114. * REPLACING old line(s) by new
  1115. * ------[ first line different ]------
  1116. 31399 IF ZFunctionKey = 22 THEN                                      ' RM12159301
  1117.          ZFileName$ = ZHelpPath$ + "NEEDSYS.MSG"                     ' RM031301/RM12159301 - Nice
  1118.          CALL FindFile (ZFileName$,Found)                            ' RM12159301
  1119.          IF Found THEN _                                             ' RM12159301
  1120.             GOSUB 31405 : _                                          ' RM12159301
  1121.             GOTO 33970 _                                             ' RM12159301
  1122.          ELSE _                                                      ' RM12159301
  1123.             CALL QuickTPut1 ("Sorry, " + ZFirstName$ + ", SysOp needs the system") : _
  1124.             GOSUB 31410 : _                                          ' RM12159301
  1125.             GOTO 33970
  1126.       ENDIF                                                          ' RM12159301
  1127.       IF ZFunctionKey = 23 THEN                                      ' RM12159301
  1128.          ZFileName$ = ZHelpPath$ + "TWIT.MSG"                        ' RM12159301 - Line Noise or whatever
  1129.          CALL FindFile (ZFileName$,Found)                            ' RM12159301
  1130.          IF Found THEN _                                             ' RM12159301
  1131.             GOSUB 31405 : _                                          ' RM12159301
  1132.             GOTO 33970 _                                             ' RM12159301
  1133.          ELSE _                                                      ' RM12159301
  1134.             CALL QuickTPut1 ("ë !┴  ╟ ├   σ Γ   ╓ σ# ⌐σ#^ ╞├┬σ     #σ") : _ ' RM12159301
  1135.             GOSUB 31415 : _                                          ' RM12159301
  1136.             GOTO 33970                                               ' RM12159301
  1137.       ENDIF                                                          ' RM12159301
  1138.       ZFileName$ = ZHelpPath$ + "KICKOFF.MSG"                        ' RM12159301 - Nasty
  1139.       CALL Findfile (ZFileName$,Found)                               ' RM12159301
  1140.       IF Found THEN _                                                ' RM12159301
  1141.          GOSUB 31405 : _                                             ' RM12159301
  1142.          GOTO 33970                                                  ' RM12159301
  1143.       CALL QuickTPut1 (ZFirstName$ + ", goodbye and don't call back")
  1144.       CALL DelayTime (8 + ZBPS) : _
  1145.       IF ZUserFileIndex < 1 THEN _
  1146.          ZSubParm = -6 : _
  1147.          GOTO 33970
  1148.       ZUserSecLevel = ZMinLogonSec - 1
  1149.       CALL DenyAccess
  1150.       ZSubParm = -7
  1151.       GOTO 33970
  1152. * INSERTING new line(s)
  1153. 31405 CALL Graphic (ZFileName$)                                      ' RM031301/RM12159301
  1154.       ZNonStop = ZTrue                                               ' RM031301
  1155.       CALL BufFile (ZFileName$, ZWasX)                               ' RM031301
  1156. 31410 CALL DelayTime (8 + ZBPS)
  1157. 31415 CALL UpdtCalr ("Logged off by SysOp",1)                        ' RM031301
  1158.       ZSubParm = -6
  1159.       RETURN                                                         ' RM12159301
  1160. '
  1161. '
  1162. ' * F2 - COMMAND FROM LOCAL KEYBOARD (SYSOP EXIT TO DOS AND RETURN)
  1163. '
  1164. '
  1165. * REPLACING old line(s) by new
  1166. 33160 CALL UpdtCalr ("Sysop began chat",1)
  1167.       ZPageStatus$ = ""
  1168. * ------[ first line different ]------
  1169.       IF ZRIPTest THEN _                                             ' RM11039301
  1170.          CALL QuickTPut1 (ZRIPReset$)                                ' RM11079301
  1171.       IF (ZANSITest = ZTrue OR ZWasGR > 1) AND ZDosANSI THEN _       ' CHAT174/RM030101/RM101701
  1172.          CALL TimeBack (1) : _                                       ' CHAT174/RM110801
  1173.          CALL SysopChat (2) _                                        ' CHAT174/RM100101
  1174.       ELSE _                                                         ' CHAT174/RM030101
  1175.          CALL SkipLine (1) : _                                       ' CHAT174/RM030101
  1176.          CALL QuickTPut1 ("Hi " + _
  1177.               ZFirstName$ + _
  1178.               ", this is " + _
  1179.               ZSysopFirstName$ + _
  1180.               " " + _
  1181.               ZSysopLastName$ + _
  1182.               ".  Sorry to break in to CHAT but..") : _              ' CHAT174/RM030101
  1183.               CALL TimeBack (1) : _                                  ' CHAT174/RM030101
  1184.               CALL SysopChat (1)                                     ' CHAT174/RM100101
  1185.       CALL TimeBack (2)
  1186.       ZCommPortStack$ = CHR$(13)
  1187.       IF ZSubParm < 0 THEN _                                         ' RM12189303
  1188.          GOTO 33970                                                  ' RM12189303
  1189.       GOTO 33155
  1190. '
  1191. '
  1192. ' * UP / CTRL-UP: INCREASE THE ON-LINE USER'S SECURITY BY ONE / FIVE
  1193. '
  1194. '
  1195. * REPLACING old line(s) by new
  1196. * ------[ first line different ]------
  1197. 33970 IF ZFunctionKey < 23 AND ZFunctionKey > 15 THEN _              ' DGS-L25/RM12159301
  1198.          MinsRemaining = (ZSecsPerSession! - ZSecsUsedSession!) / 60 : _ ' DGS-L25
  1199.          CALL Line25                                                 ' DGS-L25
  1200.       END SUB
  1201. * REPLACING old line(s) by new
  1202. 33990 ' $SUBTITLE: 'PageUp - Display user profile to Sysop'
  1203. ' $PAGE
  1204. '
  1205. '  NAME    -- PageUp
  1206. '
  1207. '  INPUTS  --     PARAMETER                    MEANING
  1208. '                 ZActiveUserName$       CURRENT USER NAME
  1209. '                 ZDnlds                 # OF FILES DOWNLOADED
  1210. '                 ZExpirationDate$       REGISTRATION EXPIRATION
  1211. '                 ZLastDateTimeOnSave$   Last DATE & TIME ON SYSTEM
  1212. '                 ZLastMsgRead           Last MESSAGE READ BY USER
  1213. '                 ZPswdSave$             USERS PASSWORD
  1214. '                 ZTimesLoggedOn         TIMES USER HAS LOGGED ON
  1215. '                 ZUplds                 # OF FILES UPLOADED
  1216. '                 ZUserSecSave           USERS SECURITY LEVEL
  1217. '
  1218. '  OUTPUTS -- ZMsgRec$
  1219. '
  1220. * ------[ first line different ]------
  1221.       SUB PageUp                                                     ' RM11159302
  1222.       CALL LPrnt (" ",1)
  1223.       CALL LPrnt ("USER NAME : " + ZActiveUserName$,1)
  1224.       CALL LPrnt ("SECURITY  :" + STR$(ZUserSecSave),1)
  1225.       CALL LPrnt ("PASSWORD  :" + ZPswdSave$,1)
  1226.       CALL LPrnt ("READ MSG. :" + STR$(ZLastMsgRead),1)
  1227.       CALL LPrnt ("TIMES ON  :" + STR$(ZTimesLoggedOn),1)
  1228.       CALL LPrnt ("LAST ON   :" + ZLastDateTimeOnSave$,1)
  1229.       CALL LPrnt ("DOWNLOADS :" + STR$(ZDnlds),1)
  1230.       CALL LPrnt ("UPLOADS   :" + STR$(ZUplds),1)
  1231.       IF ZEnforceRatios THEN _
  1232.          CALL LPrnt ("DL-BYTES  :" + STR$(ZDLBytes!),1) : _
  1233.          CALL LPrnt ("UL-BYTES  :" + STR$(ZULBytes!),1)
  1234.       IF ZRestrictByDate THEN _
  1235.          CALL LPrnt ("EXPIRATION: " + ZExpirationDate$,1)
  1236.       CALL LPrnt ("User's Profile",1)
  1237.       END SUB
  1238. * REPLACING old line(s) by new
  1239. 35000 ' $SUBTITLE: 'FlushKeys - Completely flush all user input'
  1240. ' $PAGE
  1241. '
  1242. '  NAME    -- FlushKeys
  1243. '
  1244. * ------[ first line different ]------
  1245.       SUB FlushKeys                                                  ' RM11159302
  1246.       CALL FlushCom (ZWasY$)
  1247.       ZLastIndex = 0
  1248.       REDIM ZUserIn$(ZMsgDim)
  1249.       END SUB
  1250. * INSERTING new line(s)
  1251. 41007 ' $SUBTITLE: 'CheckTimeRemain - Kicks off if no time remaining'
  1252. ' $PAGE
  1253. '
  1254. '  NAME    -- CheckTimeRemain
  1255. '
  1256. '  INPUTS  -- PARAMETER                 MEANING
  1257. '
  1258. '  OUTPUTS -- PARAMETER                 MEANING
  1259. '             MinsRemaining         TIME IN MINUTES LEFT IN SESSION
  1260. '             ZSecsUsedSession!     TIME USED IN SECONDS
  1261. '             ZSubParm              -1 IF No TIME LEFT
  1262. '
  1263.       SUB CheckTimeRemain (MinsRemaining) STATIC
  1264.       CALL TimeRemain (MinsRemaining)
  1265.       IF ZBypassTimeCheck THEN _
  1266.          EXIT SUB
  1267.       IF MinsRemaining < 1 THEN                                      ' RM122401
  1268.          IF ZBankTime < 1 THEN _                                     ' BANK174/RM09229302
  1269.             ZSubParm = -1 : _                                        ' BANK174
  1270.             EXIT SUB                                                 ' BANK174/RM120401/RM09229302
  1271.          IF ZTimeBankInActive THEN _                                 ' BB09039301
  1272.             CALL QuickTPut1 (" Your Time has Expired") : _           ' BB09039301
  1273.             CALL QuickTPut1 ("Sorry Time Bank In-Active at this time") : _' BB09039301
  1274.             ZSubParm = - 1 : _                                       ' RM09229302
  1275.             EXIT SUB                                                 ' BB09039301/RM09229302
  1276.          CALL Carrier                                                ' BANK174/RM120201
  1277.          IF ZSubParm = -1 THEN _                                     ' BANK174/RM120201
  1278.             EXIT SUB                                                 ' BANK174/RM120201/RM120401/RM09229302
  1279.          ZOutTxt$ = ZFG7$ + " Your Time has Expired" + ZFG5$ + _     ' BANK174
  1280.                     " - Access the Time Bank ([Y]" + ZFG5$ + ",N) " + ZEmphasizeOff$ ' BANK174
  1281.          ZTurboKey = -ZTurboKeyUser                                  ' BANK174
  1282.          CALL TGet                                                   ' BANK174
  1283.          IF ZSubParm = -1 THEN _                                     ' BANK174
  1284.             EXIT SUB                                                 ' BANK174/RM120401/RM09229302
  1285.          IF ZNO THEN _                                               ' BANK174
  1286.             ZSubParm = -1 : _                                        ' BANK174
  1287.             EXIT SUB                                                 ' BANK174/RM120401/RM09229302
  1288.          CALL BankTime                                               ' BANK174
  1289.          CALL TimeRemain (MinsRemaining)                             ' BANK174
  1290.          IF MinsRemaining <= 0 THEN _                                ' BANK174
  1291.             ZSubParm = -1                                            ' BANK174
  1292.             EXIT SUB                                                 ' BANK174/RM120401
  1293.       END IF                                                         ' RM09229302
  1294.       IF MinsRemaining <= 3 AND NOT ZNonStop THEN _                  ' ST119201
  1295.          IF MinsRemaining > 0 THEN _                                 ' RM120401
  1296.             CALL QuickTPut1 (ZEmphasizeOn$ + "ALERT:" + ZFG7$ + _
  1297.                         " Auto-Disconnect in (" + ZFG5$ + _          ' ST119201/RM120401
  1298.                  STR$(MinsRemaining) + ZFG7$ + ") min.!" + _         ' ST119201
  1299.                  ZEmphasizeOff$)                                     ' ST119201
  1300.       END SUB                                                        ' BANK174
  1301. * DELETING old line(s)
  1302. 41008
  1303. * REPLACING old line(s) by new
  1304. 41032 ' $SUBTITLE: 'DispTimeRemain - Display users time remaining'
  1305. ' $PAGE
  1306. '
  1307. '  NAME    -- DispTimeRemain
  1308. '
  1309. '  INPUTS  --     PARAMETER                    MEANING
  1310. '              MinsRemaining
  1311. '
  1312. '  OUTPUTS --     PARAMETER                    MEANING
  1313. '                MinsRemaining               TIME IN MINUTES LEFT IN SESSION
  1314. '
  1315. * ------[ first line different ]------
  1316.       SUB DispTimeRemain (MinsRemaining)                             ' RM11159302
  1317.       CALL TimeRemain (MinsRemaining)
  1318.       CALL QuickTPut1 (ZEmphasizeOff$ + STR$(MinsRemaining) + " min left")
  1319.       END SUB
  1320. * REPLACING old line(s) by new
  1321. 41498 ' $SUBTITLE: 'AMorPM - give time of day in AM/PM format'
  1322. ' $PAGE
  1323. '
  1324. '  NAME    -- AMorPM
  1325. '
  1326. '  INPUTS  --     PARAMETER                    MEANING
  1327. '
  1328. '  OUTPUTS -- ZCurDate$                 CURRENT DATE (MM-DD-YY)
  1329. '             ZTime$                    CURRENT TIME (I.E. 1:13 PM)
  1330. '
  1331. '  PURPOSE -- To set the time and date and
  1332. '             describe the time as "AM" or "PM."
  1333. '
  1334. * ------[ first line different ]------
  1335.       SUB AMorPM                                                     ' RM11159302
  1336. '
  1337. '
  1338. ' *  CALCULATE CURRENT TIME FOR AM OR PM
  1339. '
  1340. '
  1341. * REPLACING old line(s) by new
  1342. 42000 ' $SUBTITLE: 'Carrier - sub to monitor carrier on comm. port'
  1343. ' $PAGE
  1344. '
  1345. '  NAME    -- Carrier
  1346. '
  1347. '  INPUTS  --     PARAMETER                    MEANING
  1348. '              ZAutoLogoffReq                  -1 if in autologoff request
  1349. '
  1350. '  OUTPUTS --  ZSubParm = 0                    CONTINUE
  1351. '              ZSubParm = -1                   TERMINATE (No Carrier)
  1352. '
  1353. '  PURPOSE --  To test whether should continue in RBBS.  Reasons
  1354. '              NOT to continue are:  autologoff, out of time, or
  1355. '              carrier dropped.
  1356. '
  1357. * ------[ first line different ]------
  1358.       SUB Carrier                                                    ' RM11159302
  1359.       'IF ZAutoLogoffReq THEN _
  1360.       '   IF NOT ZSuspendAutologoff THEN _
  1361.       '      ZSubParm = -1 : _
  1362.       '      EXIT SUB
  1363.       CALL CheckCarrier
  1364.       END SUB
  1365. * REPLACING old line(s) by new
  1366. 42020 ZSubParm = -1
  1367.       IF Speedy < -8 THEN _
  1368.          EXIT SUB
  1369.       IF AlreadyWritten = -9 THEN _
  1370.          EXIT SUB
  1371.       CALL TakeOffHook
  1372.       ZModemOffHook = -1
  1373.       AlreadyWritten = -9
  1374. * ------[ first line different ]------
  1375.       IF ZTransferFunction = 3 THEN _                                ' RM03269403
  1376.          CALL UpdtCalr ("Log-Off from User Verify Door",1) : _       ' RM03269403
  1377.       ELSE _                                                         ' RM03269403
  1378.          CALL UpdtCalr ("Carrier dropped",1) : _
  1379.          CALL DropCarrier                                            ' DROP174
  1380.       END SUB
  1381. * INSERTING new line(s)
  1382. 43020 ' $SUBTITLE: 'Graphic2 - sub to find graphic version of a file'' RM03199402
  1383. ' $PAGE                                                              ' RM03199402
  1384. '
  1385. '  NAME    -- Graphic2
  1386. '
  1387. '  INPUTS  --     PARAMETER                    MEANING
  1388. '                 Default$              USERS Graphic DEFAULT
  1389. '                 ZWasGR                WHETHER GRAPHICS ARE AVAILABLE
  1390. '                 FilName$              FILE TO CHECK
  1391. '
  1392. '  OUTPUTS --     FilName$              SUBSTITUTES NAME OF GRAPHICS
  1393. '                                       FILE (IF IT EXISTS).
  1394. '
  1395. '  PURPOSE -- Checks whether there is a graphics version of
  1396. '             a file, based on users graphics perference.
  1397. '             Sets file name to graphics file if it exists,
  1398. '             Otherwise leaves file name intact.  Returns file
  1399. '             name to use.  Does NOT open the file.
  1400. '
  1401.       SUB Graphic2 (FilName$)                                        ' RM03199402
  1402.       ZOK = ZFalse                                                   ' RM03199402
  1403.       IF ZWasGR THEN                                                 ' RM03199402
  1404.          CALL BreakFileName (FilName$,DR$,WasX$,Extension$,ZTrue)    ' RM03199402
  1405.          IF LEN(WasX$) < 8 THEN                                      ' RM03199402
  1406.             Temp$ = ZUserGraphicDefault$                             ' RM03199402
  1407. 43023       ZWasDF$ = DR$ + _                                        ' RM03199402
  1408.                   WasX$ + _                                          ' RM03199402
  1409.                   Temp$ + _                                          ' RM03199402
  1410.                   Extension$                                         ' RM03199402
  1411.              CALL FindFile(ZWasDF$,ZOK)                              ' RM03199402
  1412.              IF Temp$ = "R" AND NOT ZOK THEN                         ' RM03199402
  1413.                 Temp$ = "C"                                          ' RM03199402
  1414.                 GOTO 43023                                           ' RM03199402
  1415.              END IF                                                  ' RM03199402
  1416.              IF ZOK THEN                                             ' RM03199402
  1417.                 FilName$ = ZWasDF$                                   ' RM03199402
  1418.                 IF ZUserGraphicDefault$ = "C" OR ZUserGraphicDefault$ = "R" THEN ' RM03199402
  1419.                    ZLinesPrinted = 0                                 ' RM03199402
  1420.                 END IF                                               ' RM03199402
  1421.              END IF                                                  ' RM03199402
  1422.          END IF                                                      ' RM03199402
  1423.       END IF                                                         ' RM03199402
  1424.       IF NOT ZOK THEN _                                              ' RM03199402
  1425.          CALL FindFile (FilName$,ZOK)                                ' RM03199402
  1426.       END SUB                                                        ' RM03199402
  1427. * REPLACING old line(s) by new
  1428. 43031 ' $SUBTITLE: 'GraphicX - sub to find graphic version of a file'
  1429. ' $PAGE
  1430. '
  1431. '  NAME    -- GraphicX
  1432. '
  1433. '  INPUTS  --     PARAMETER                    MEANING
  1434. '                 Default$              USERS Graphic DEFAULT
  1435. '                 ZWasGR                WHETHER GRAPHICS ARE AVAILABLE
  1436. '                 FilName$              FILE TO CHECK
  1437. '                 FileNum               # of file to use
  1438. '
  1439. '  OUTPUTS --     FilName$              SUBSTITUTES NAME OF GRAPHICS
  1440. '                                       FILE (IF IT EXISTS).
  1441. '
  1442. '  PURPOSE -- Checks whether there is a graphics version of
  1443. '             a file, based on users graphics perference.
  1444. '             Sets file name to graphics file if it exists,
  1445. '             Otherwise leaves file name intact.  Returns file
  1446. '             name to use.
  1447. '
  1448.       SUB GraphicX (FilName$,FileNum) STATIC
  1449.       ZOK = ZFalse
  1450. * ------[ first line different ]------
  1451.       IF ZWasGR THEN                                                 ' RM07159301/RIP
  1452.          CALL BreakFileName (FilName$,DR$,WasX$,Extension$,ZTrue)    ' RM07159301/RIP
  1453.          IF LEN(WasX$) < 8 THEN                                      ' RM07159301/RIP
  1454.             Temp$ = ZUserGraphicDefault$                             ' RM07159301/RIP
  1455. * INSERTING new line(s)
  1456. 43033       ZWasDF$ = DR$ + _                                        ' RM07159301/RIP
  1457.                   WasX$ + _
  1458.                   Temp$ + _                                          ' RM07159301/RIP
  1459.                   Extension$                                         ' RM07159301/RIP
  1460.              CALL FINDITX (ZWasDF$,FileNum)                          ' RM07159301/RIP
  1461.              IF Temp$ = "R" AND NOT ZOK THEN                         ' RM07159301/RIP
  1462.                 Temp$ = "C"                                          ' RM07159301/RIP
  1463.                 GOTO 43033                                           ' RM07159301/RIP
  1464.              END IF                                                  ' RM07159301/RIP
  1465.              IF ZOK THEN                                             ' RM07159301/RIP
  1466.                 FilName$ = ZWasDF$
  1467.                 IF ZUserGraphicDefault$ = "C" OR ZUserGraphicDefault$ = "R" THEN   ' RM07159301/RIP
  1468.                    ZLinesPrinted = 0
  1469.                 END IF                                               ' RM07159301/RIP
  1470.              END IF                                                  ' RM07159301/RIP
  1471.          END IF                                                      ' RM07159301/RIP
  1472.       END IF                                                         ' RM07159301/RIP
  1473.       IF NOT ZOK THEN _
  1474.          CALL FINDITX (FilName$,FileNum)
  1475.       END SUB
  1476. ' Sets Graphic version but uses file # 2 always
  1477.       SUB Graphic (FilName$)                                         ' RM11159302
  1478.       IF FilName$ = ZWelcomeFile$ AND NOT ZConfMode THEN             ' RM05219301
  1479.          ZOK = ZFalse                                                ' RM05219301
  1480.          RANDOMIZE TIMER                                             ' KC042601
  1481.          Choose = INT(RND * 4) + 1                                   ' KC042601
  1482.          SELECT CASE Choose                                          ' KC042601
  1483.            CASE 1                                                    ' KC042601
  1484.               FilName$ = ZWelcomeFileDrvPath$ + "WELCO1"             ' KC042601
  1485.            CASE 2                                                    ' KC042601
  1486.               FilName$ = ZWelcomeFileDrvPath$ + "WELCO2"             ' KC042601
  1487.            CASE 3                                                    ' KC042601
  1488.               FilName$ = ZWelcomeFileDrvPath$ + "WELCO3"             ' KC042601
  1489.            CASE 4                                                    ' KC042601
  1490.               FilName$ = ZWelcomeFile$                               ' KC042601
  1491.          END SELECT                                                  ' KC042601
  1492.          CALL ALLCaps (FilName$)                                     ' RM05219301
  1493.          CALL FindFile (FilName$,ZOK)                                ' KC042601/RM05219301
  1494.          IF NOT ZOK THEN _                                           ' KC042601/RM05219301
  1495.             FilName$ = ZWelcomeFile$                                 ' KC042601
  1496.       END IF                                                         ' RM05219301
  1497.       CALL GraphicX (FilName$,2)
  1498.       END SUB
  1499. * REPLACING old line(s) by new
  1500. 43070 ZActiveMessageFile$ = ZOrigMsgFile$
  1501.       ZSubParm = 3
  1502.       CALL FileLock
  1503.       CALL OpenMsg
  1504.       FIELD 1, 128 AS ZMsgRec$
  1505.       GET 1,ZNodeRecIndex
  1506.       IF ZGlobalSysop THEN _
  1507.          MID$(ZMsgRec$,1,30) = "SYSOP" + SPACE$(25)
  1508.       MID$(ZMsgRec$,40,2) = STR$(ZExitToDoors)
  1509.       MID$(ZMsgRec$,42,2) = STR$(ZEightBit)
  1510.       MID$(ZMsgRec$,44,2) = RIGHT$(STR$(-ZBPS),2)
  1511.       MID$(ZMsgRec$,46,2) = STR$(ZUpperCase)
  1512.       MID$(ZMsgRec$,48,5) = MKS$(ZNumDnldBytes!) + MID$(STR$(-ZBatchTransfer),2)
  1513.       MID$(ZMsgRec$,53,2) = STR$(ZWasGR)
  1514.       MID$(ZMsgRec$,55,2) = STR$(ZSysop)
  1515.       MID$(ZMsgRec$,65,3) = CHR$(VAL(LEFT$(ZOrigTimeLoggedOn$,2))) + _
  1516.                             CHR$(VAL(MID$(ZOrigTimeLoggedOn$,4,2))) + _
  1517.                             CHR$(VAL(MID$(ZOrigTimeLoggedOn$,7,2)))
  1518.       MID$(ZMsgRec$,72,2) = STR$(ZPrivateDoor)
  1519.       MID$(ZMsgRec$,74,1) = MID$(STR$(ZTransferFunction),2,1)
  1520.       MID$(ZMsgRec$,75,1) = ZWasFT$
  1521. * ------[ first line different ]------
  1522.       MID$(ZMsgRec$,113,2) = MKI$(CINT(ZTimeCredits!)/60)            ' KG012803
  1523.       MID$(ZMsgRec$,91,2) = STR$(ZReliableMode)
  1524.       CALL BreakFileName (ZCurPUI$,ZOutTxt$,ZUserIn$,ZWasZ$,ZFalse)
  1525.       MID$(ZMsgRec$,93,8) = ZUserIn$ + SPACE$(8 - LEN(ZUserIn$))
  1526.       IF ZLocalUser THEN _
  1527.          ZWasZ$ = ZCarriageReturn$ + ZCarriageReturn$ _
  1528.       ELSE ZWasZ$ = " 0"
  1529.       MID$(ZMsgRec$,101,2) = ZWasZ$
  1530.       MID$(ZMsgRec$,103,2) = STR$(ZLocalUserMode)
  1531.       ZConfName$ = LEFT$(ZConfName$,INSTR(ZConfName$ + " "," ") - 1)
  1532.       MID$(ZMsgRec$,105,8) = ZConfName$ + SPACE$(8 - LEN(ZConfName$))
  1533.       MID$(ZMsgRec$,115,1) = MID$(STR$(ZAutoLogoffReq),2,1)
  1534.       MID$(ZMsgRec$,117,2) = STR$(ZMenuIndex)
  1535.       MID$(ZMsgRec$,119,2) = LEFT$(DATE$,2)
  1536.       MID$(ZMsgRec$,121,2) = MID$(DATE$,4,2)
  1537.       MID$(ZMsgRec$,123,2) = RIGHT$(DATE$,2)
  1538.       MID$(ZMsgRec$,125,2) = LEFT$(TIME$,2)
  1539.       MID$(ZMsgRec$,127,2) = MID$(TIME$,4,2)
  1540. ' ***   Save additional parameters for door restoral
  1541.       CALL OpenOutW (ZNodeWorkDrvPath$+"DRST"+ZNodeFileID$+".DEF")
  1542.       CALL PrintWorkA (STR$(ZLimitMinsPerSession))
  1543.       CALL PrintWorkA (ZWasNG$)
  1544.       CALL PrintWorkA (ZIndivValue$)
  1545.       CALL PrintWorkA (ZOrigDateTimeOn$)
  1546.       CALL PrintWorkA (ZOrigTimeLoggedOn$)
  1547.       CALL PrintWorkA (STR$(ZUserFileIndex))
  1548.       CALL PrintWorkA (ZUpldDir$)
  1549.       ZOutTxt$ = STR$(ZUpldDir$ = ZFMSDirectory$ OR ZLimitSearchToFMS)
  1550.       CALL PrintWorkA (ZOutTxt$)
  1551.       CALL PrintWorkA (ZCBaud$)
  1552.       CALL PrintWorkA (STR$(ZGetExtDesc))                            ' BTCH174
  1553.       CALL PrintWorkA (STR$(ZAutoLogoffReq))                         ' BTCH174
  1554.       CALL PrintWorkA (STR$(ZHighSpeedTransfer))                     ' BTCH174
  1555.       CALL PrintWorkA (STR$(ZWasBatchTransfer))                      ' BTCH174/RM082902
  1556.       CALL PrintWorkA (ZWhoTo$)                                      ' BTCH174/RM111101
  1557.       CALL PrintWorkA (STR$(ZAlreadyGiven))                          ' BTCH174/RM112401
  1558.       CALL PrintWorkA (STR$(ZSpeedFactor!))                          ' BTCH174/RM112101
  1559.       CALL PrintWorkA (STR$(ZWelcomeAboard))                         ' NEWU174/RM122701
  1560.       CALL PrintWorkA (ZMenuNewDate$)                                ' MENU174/RM100501
  1561.       CALL PrintWorkA (ZMenuNewTime$)                                ' MENU174/RM100501
  1562.       CALL PrintWorkA (STR$(ZMenuNewUpld))                           ' MENU174/RM100501
  1563.       CALL PrintWorkA (STR$(ZMenuNewUsers))                          ' MENU174/RM100501
  1564.       CALL PrintWorkA (STR$(ZMenuNewCalls))                          ' MENU174/RM100501
  1565.       CALL PrintWorkA (STR$(ZMenuNewSysop))                          ' MENU174/RM100501
  1566.       CALL PrintWorkA (STR$(ZRIPTest))                               ' RM07159301/RIP
  1567.       CALL PrintWorkA (ZUpldSubDir$)                                 ' RM01219401
  1568.       CALL PrintWorkA (STR$(ZGetDescAfterTransfer))                  ' RM02269401
  1569.       CALL PrintWorkA (STR$(ZExtFileSysProcessor))                   ' RM02269]01
  1570.       CALL PrintWorkA (STR$(ZCDRom))                                 ' RM03259401
  1571.       CALL PrintWorkA (ZDooredTo$)                                   ' KG012803
  1572.       CLOSE 2
  1573.       IF ZMarkedFiles$ <> "" THEN _                                  ' DGS092201-DS/MARKFILES
  1574.          CALL OpenOutW (ZNodeWorkDrvPath$+"MARK"+ZNodeID$+".LST") : _ ' DGS092201-DS/MARKFILES
  1575.          CALL PrintWorkA (ZMarkedFiles$) : _                         ' DGS092201-DS/MARKFILES
  1576.          CLOSE 2                                                     ' DGS092201-DS/MARKFILES
  1577. * REPLACING old line(s) by new
  1578. 44000 ' $SUBTITLE: 'ReadProf - subroutine to restore a user profile'
  1579. ' $PAGE
  1580. '
  1581. '  NAME    -- ReadProf
  1582. '
  1583. '  INPUTS  --     PARAMETER                    MEANING
  1584. '              ZNodeRecIndex               NODE RECORD TO USE
  1585. '              ZSysopPswd1$               Sysop'S PSEUDONYM 1
  1586. '              ZSysopPswd2$               Sysop'S PSEUDONYM 2
  1587. '
  1588. '  OUTPUTS -- USER'S OPTIONS AND COMMUNICATIONS PARAMETERS
  1589. '             UPON EXITING RBBS-PC TO A "DOOR"
  1590. '
  1591. '  PURPOSE -- Reset a user's options and communications parameters
  1592. '             that were saved in the node record when a user exited
  1593. '             to a "door" so that he is in the same status as when
  1594. '             he exited.
  1595. '
  1596.       SUB ReadProf STATIC
  1597.       FIELD 1, 128 AS ZMsgRec$
  1598.       GET 1,ZNodeRecIndex
  1599.       ZReliableMode = VAL(MID$(ZMsgRec$,91,2))
  1600.       MID$(ZMsgRec$,40,2) = "00"
  1601.       ZEightBit = VAL(MID$(ZMsgRec$,42,2))
  1602.       ZBPS = -VAL(MID$(ZMsgRec$,44,2))
  1603.       CALL CommInfo
  1604.       ZBaudTest! = VAL(MID$(ZBaudRates$,(-5 * ZBPS),5))
  1605.       ZUpperCase = VAL(MID$(ZMsgRec$,46,2))
  1606.       ZNumDnldBytes! = CVS(MID$(ZMsgRec$,48,4))
  1607.       ZBatchTransfer = (MID$(ZMsgRec$,52,1) = "1")
  1608.       ZWasGR = VAL(MID$(ZMsgRec$,53,2))
  1609.       HourLoggedOn$ = RIGHT$("0"+MID$(STR$(ASC(MID$(ZMsgRec$,65,1))),2),2)
  1610.       MinLoggedOn$  = RIGHT$("0"+MID$(STR$(ASC(MID$(ZMsgRec$,66,1))),2),2)
  1611.       SecLoggedOn$  = RIGHT$("0"+MID$(STR$(ASC(MID$(ZMsgRec$,67,1))),2),2)
  1612.       ZTimeLoggedOn$ = HourLoggedOn$ + _
  1613.                         ":" + _
  1614.                         MinLoggedOn$ + _
  1615.                         ":" + _
  1616.                         SecLoggedOn$
  1617.       ZTransferFunction = VAL(MID$(ZMsgRec$,74,1))
  1618.       ZWasFT$ = MID$(ZMsgRec$,75,1)
  1619.       ZTimeCredits! = 60!*CVI(MID$(ZMsgRec$,113,2))                  ' KKG030901
  1620. * ------[ first line different ]------
  1621.       ZMenuIndex = VAL(MID$(ZMsgRec$,117,2))
  1622.       ZCurPUI$ = MID$(ZMsgRec$,93,8)
  1623.       CALL Remove (ZCurPUI$," ")
  1624.       IF ZCurPUI$ <> "" THEN _
  1625.          CALL BreakFileName (ZMainPUI$,ZOutTxt$,ZUserIn$,ZWasZ$,ZTrue) : _
  1626.          ZCurPUI$ = ZOutTxt$ + ZCurPUI$ + ZWasZ$
  1627.       ZCustomPUI = (ZCurPUI$ <> "")
  1628.       ZLocalUser = (MID$(ZMsgRec$,101,2) = ZCarriageReturn$ + ZCarriageReturn$)
  1629.       ZLocalUserMode = VAL(MID$(ZMsgRec$,103,2))
  1630.       ZHomeConf$ = MID$(ZMsgRec$,105,8)
  1631.       ZAutoLogoffReq = (VAL(MID$(ZMsgRec$,115,1)) <> 0)
  1632.       CALL Trim (ZHomeConf$)
  1633.       IF ZHomeConf$ = "MAIN" THEN _
  1634.          ZHomeConf$ = ""
  1635.       IF ZRequiredRings > 0 AND _
  1636.          INSTR(ZModemInitCmd$,"S0=255") THEN _
  1637.          COLOR 7,0,0 _
  1638.       ELSE COLOR ZFG,ZBG,ZBorder
  1639.       IF ZLocalUserMode THEN _
  1640.          GOTO 44003
  1641.       CALL SetBaud
  1642. * REPLACING old line(s) by new
  1643. 44003 ZUserLogonTime! = VAL(HourLoggedOn$) * 3600! + _
  1644.                         VAL(MinLoggedOn$) * 60! + _
  1645.                         VAL(SecLoggedOn$)
  1646.       HourLoggedOn$ = ""
  1647.       MinLoggedOn$ = ""
  1648.       SecLoggedOn$ = ""
  1649.       IF ZMinsPerSession < 1 THEN _
  1650.          ZMinsPerSession = 3
  1651.       IF NOT ZEightBit THEN _
  1652.          OUT ZLineCntlReg,&H1A
  1653.       IF LEFT$(ZMsgRec$,7) = "SYSOP  " THEN _
  1654.          ZFirstName$ = ZSysopPswd1$ : _
  1655.          ZActiveUserName$ = ZSecretName$ _
  1656.       ELSE ZFirstNameEnd = INSTR(ZMsgRec$," ") : _
  1657.            ZLastNameEnd = INSTR(ZFirstNameEnd + 1,ZMsgRec$ + " ","  ") : _
  1658.            ZFirstName$ = LEFT$(ZMsgRec$,ZFirstNameEnd-1) : _
  1659.            ZLastName$ = MID$(ZMsgRec$,ZFirstNameEnd + 1,ZLastNameEnd - (ZFirstNameEnd + 1)) : _
  1660.            ZActiveUserName$ = MID$(ZFirstName$ + " " + ZLastName$,1,31)
  1661.       ZWasZ$ = ZFirstName$
  1662.       CALL OpenWork (2,ZNodeWorkDrvPath$+"DRST"+ZNodeFileID$+".DEF")
  1663.       CALL ReadDir (2,1)
  1664.       ZLimitMinsPerSession = VAL (ZOutTxt$)
  1665.       CALL ReadDir (2,1)
  1666.       ZWasNG$ = ZOutTxt$
  1667.       CALL ReadDir (2,1)
  1668.       ZIndivValue$ = ZOutTxt$
  1669.       CALL ReadDir (2,1)
  1670.       ZOrigDateTimeOn$ = ZOutTxt$
  1671.       CALL ReadDir (2,1)
  1672.       ZOrigTimeLoggedOn$ = ZOutTxt$
  1673.       CALL ReadDir (2,1)
  1674.       ZUserFileIndex = VAL(ZOutTxt$)
  1675.       CALL ReadDir (2,1)
  1676.       ZUpldDoor$ = ZOutTxt$
  1677.       CALL ReadDir (2,1)
  1678.       ZFMSDoor = VAL(ZOutTxt$)
  1679.       CALL ReadDir (2,1)
  1680.       ZCBaud$ = ZOutTxt$
  1681. * ------[ first line different ]------
  1682.       CALL ReadDir (2,1)                                             ' BTCH174
  1683.       ZGetExtDesc = VAL (ZOutTxt$)                                   ' BTCH174
  1684.       CALL ReadDir (2,1)                                             ' BTCH174
  1685.       ZAutoLogoffReq = VAL (ZOutTxt$)                                ' BTCH174
  1686.       CALL ReadDir (2,1)                                             ' BTCH174
  1687.       ZHighSpeedTransfer = VAL (ZOutTxt$)                            ' BTCH174
  1688.       CALL ReadDir (2,1)                                             ' BTCH174/RM082902
  1689.       ZWasBatchTransfer = VAL (ZOutTxt$)                             ' BTCH174/RM082902
  1690.       CALL ReadDir (2,1)                                             ' BTCH174/RM111101
  1691.       ZWhoTo$ = ZOutTxt$                                             ' BTCH174/RM111101
  1692.       CALL ReadDir (2,1)                                             ' BTCH174/RM112401
  1693.       ZAlreadyGiven = VAL (ZOutTxt$)                                 ' BTCH174/RM112401
  1694.       CALL ReadDir (2,1)                                             ' BTCH174/RM112101
  1695.       ZSpeedFactor! = VAL (ZOutTxt$)                                 ' BTCH174/RM112101
  1696.       CALL ReadDir (2,1)                                             ' NEWU174/RM122701
  1697.       ZWelcomeAboard = VAL(ZOutTxt$)                                 ' NEWU174/RM122701
  1698.       CALL ReadDir (2,1)                                             ' MENU174/RM100501
  1699.       ZMenuNewDate$ = ZOutTxt$                                       ' MENU174/RM100501
  1700.       CALL ReadDir (2,1)                                             ' MENU174/RM100501
  1701.       ZMenuNewTime$ = ZOutTxt$                                       ' MENU174/RM100501
  1702.       CALL ReadDir (2,1)                                             ' MENU174/RM100501
  1703.       ZMenuNewUpld = VAL (ZOutTxt$)                                  ' MENU174/RM100501
  1704.       CALL ReadDir (2,1)                                             ' MENU174/RM100501
  1705.       ZMenuNewUsers = VAL (ZOutTxt$)                                 ' MENU174/RM100501
  1706.       CALL ReadDir (2,1)                                             ' MENU174/RM100501
  1707.       ZMenuNewCalls = VAL (ZOutTxt$)                                 ' MENU174/RM100501
  1708.       CALL ReadDir (2,1)                                             ' MENU174/RM100501
  1709.       ZMenuNewSysop = VAL (ZOutTxt$)                                 ' MENU174/RM100501
  1710.       CALL ReadDir (2,1)                                             ' RM07159301/RIP
  1711.       ZRIPTest = VAL (ZOutTxt$)                                      ' RM07159301/RIP
  1712.       CALL ReadDir (2,1)                                             ' RM01219401
  1713.       ZUpldSubDir$ = ZOutTxt$                                        ' RM01219401
  1714.       CALL ReadDir (2,1)                                             ' RM02269401
  1715.       ZGetDescAfterTransfer = (VAL(ZOutTxt$) <> 0)                   ' RM02269401/RM03209401
  1716.       CALL ReadDir (2,1)                                             ' RM02269401
  1717.       ZExtFileSysProcessor = (VAL(ZOutTxt$) <> 0)                    ' RM02269401/RM03209401
  1718.       CALL ReadDir (2,1)                                             ' RM02269401
  1719.       ZCDRom = (VAL(ZOutTxt$) <> 0)                                  ' RM02269401/RM03209401
  1720.       CALL ReadDir (2,1)                                             ' KG012803
  1721.       ZDooredTo$ = ZOutTxt$                                          ' KG012803
  1722.       IF ZExitToDoors AND ZDooredTo$ <> "" THEN _                    ' KG012803
  1723.          CALL OpenWork (2,ZDoorsDef$) : _                            ' KG012803
  1724.          IF ZErrCode = 0 THEN _                                      ' KG012803
  1725.             CALL ReadParms (ZOutTxt$(),8,1) : _                      ' KG012803
  1726.             WHILE ZErrCode = 0 AND ZOutTxt$(1) <> ZDooredTo$ : _     ' KG012803
  1727.                CALL ReadParms (ZOutTxt$(),8,1) : _                   ' KG012803
  1728.             WEND : _                                                 ' KG012803
  1729.             IF ZOutTxt$(1) = ZDooredTo$ THEN _                       ' KG012803
  1730.                ZDoorSkipsPswd = (ZOutTxt$(6) <> "Y")                 ' KG012803
  1731.       CLOSE 2
  1732.       ZErrCode = 0                                                   ' KG012803
  1733.       CALL FindFile (ZNodeWorkDrvPath$+"MARK"+ZNodeID$+".LST",ZOK)   ' DGS092201-DS/MARKEDFILES
  1734.       IF ZOK THEN                                                    ' DGS092201-DS/MARKEDFILES
  1735.          ZMarkedFiles$ = ""                                          ' DGS092201-DS/MARKEDFILES
  1736.          CALL OpenWork (2,ZNodeWorkDrvPath$+"MARK"+ZNodeID$+".LST")  ' DGS092201-DS/MARKEDFILES
  1737.          IF ZErrCode <> 0 THEN _                                     ' DGS092201-DS/MARKEDFILES
  1738.             ZErrCode = 0 : _                                         ' DGS092201-DS/MARKEDFILES
  1739.             GOTO 44010                                               ' DGS092201-DS/MARKEDFILES
  1740.          CALL ReadDir(2,1)                                           ' DGS092201-DS/MARKEDFILES
  1741.          DO                                                          ' DGS102801-DS/MARKEDFILES
  1742.            CALL Trim(ZOutTxt$)                                       ' DGS092201-DS/MARKEDFILES
  1743.            ZMarkedFiles$ = ZMarkedFiles$ + ZOutTxt$ + _              ' DGS092201-DS/MARKEDFILES
  1744.                     ZCarriageReturn$                                 ' DGS092201-DS/MARKEDFILES
  1745.            CALL ReadDir(2,1)                                         ' DGS092201-DS/MARKEDFILES
  1746.          LOOP WHILE NOT EOF(2)                                       ' DGS102801-DS/MARKEDFILES
  1747.          CLOSE 2                                                     ' DGS092201-DS/MARKEDFILES
  1748.          CALL KillWork (ZNodeWorkDrvPath$+"MARK"+ZNodeID$+".LST")    ' DGS092201-DS/MARKEDFILES
  1749.       END IF
  1750. * INSERTING new line(s)
  1751. 44010 CALL DoorReturn                                                ' DGS092201-DS/MARKEDFILES
  1752.       END SUB
  1753. * REPLACING old line(s) by new
  1754. 44020 ' $SUBTITLE: 'CommInfo - sub for variable of users baud/parity'
  1755. ' $PAGE
  1756. '
  1757. '  NAME    -- CommInfo
  1758. '
  1759. '  INPUTS  --     PARAMETER                    MEANING
  1760. '                 ZBPS                BAUD RATE INDICATOR
  1761. '                 ZEightBit           INDICATE FOR N/8/1
  1762. '
  1763. '  OUTPUTS -- ZBaudParity$
  1764. '
  1765. '  PURPOSE -- Create a string that shows a users baud rate and parity
  1766. '
  1767. * ------[ first line different ]------
  1768.       SUB CommInfo                                                   ' RM11159302
  1769. '
  1770. '
  1771. ' *  DETERMINE BAUD AND PARITY
  1772. '
  1773. '
  1774.   IF ZReliableMode THEN _
  1775.      ReliableMode$ = "-R," _
  1776.   ELSE ReliableMode$ = ","
  1777.   ZBaudParity$ = MID$(ZBaudRates$,(-5 * ZBPS),5) + _
  1778.                  " BPS" + _
  1779.                  ReliableMode$ + _
  1780.                  MID$("N,8,1E,7,1",6 + 5 * ZEightBit,5)
  1781.   ZBaudTest! = VAL(ZBaudParity$)
  1782.   END SUB
  1783. * REPLACING old line(s) by new
  1784. 50495 ' $SUBTITLE: 'DelayTime - sub to wait number of seconds specified'
  1785. ' $PAGE
  1786. '
  1787. '  NAME    -- DelayTime
  1788. '
  1789. '  INPUTS  --     PARAMETER                    MEANING
  1790. '                 DelaySecs           NUMBER OF SECONDS TO DELAY
  1791. '                                      (0 TO 3,600)
  1792. '
  1793. '  OUTPUTS -- NONE
  1794. '
  1795. '  PURPOSE -- To wait the number of seconds indicated before
  1796. '             returning control to the calling routine.
  1797. '
  1798. * ------[ first line different ]------
  1799.       SUB DelayTime (DelaySecs)                                      ' RM11159302
  1800.       IF DelaySecs < 1 THEN _
  1801.          EXIT SUB
  1802.       ZDelay! = TIMER + DelaySecs
  1803. * REPLACING old line(s) by new
  1804. 50500 CALL CheckTime(ZDelay!, TempElapsed!, 1)
  1805.       IF TempElapsed! > 0 THEN _
  1806. * ------[ first line different ]------
  1807.          CALL GoIdle : _                                             ' RM08079302
  1808.          GOTO 50500
  1809.       END SUB
  1810. * REPLACING old line(s) by new
  1811. 57100 IF INSTR(ZOutTxt$,"LOGON DENIED") OR INSTR(ZOutTxt$,"Lvl ")THEN _
  1812.          IF NOT ZSysOp THEN _
  1813.             RETURN
  1814.       IF ZJumpSearching THEN _
  1815.          ZWasDF$ = ZOutTxt$ : _
  1816.          CALL AllCaps (ZWasDF$) : _
  1817.          IF INSTR(ZWasDF$,ZJumpTo$) = 0 THEN _
  1818.             RETURN _
  1819.          ELSE CALL CheckColor (ZOutTxt$,ZJumpTo$,"") : _
  1820.               ZJumpSearching = ZFalse
  1821.       ZSubParm = 5
  1822.       CALL TPut
  1823.       WasX = 1
  1824.       CALL AskMore ("",ZTrue,ZTrue,WasX,ZFalse)
  1825. * ------[ first line different ]------
  1826.       IF ZSubParm = -1 THEN _                                        ' RH070402
  1827.          GOTO 57102 _                                                ' RH070402
  1828.       ELSE IF ZNo THEN _                                             ' RH070402
  1829.          GOTO 57101                                                  ' RH070402
  1830.       RETURN
  1831. * REPLACING old line(s) by new
  1832. 57102 ZJumpSupported = ZFalse
  1833. * ------[ first line different ]------
  1834.       IF OrigCal$ <> ZCallersFile$ THEN _                            ' RH070401
  1835.          ZCallersFile$ = OrigCal$ : _
  1836.          CALL SetCall
  1837.       END SUB
  1838. * REPLACING old line(s) by new
  1839. 58050 ' $SUBTITLE: 'AllCaps - sub to convert string to upper case'
  1840. ' $PAGE
  1841. '
  1842. '  NAME    -- AllCaps
  1843. '
  1844. '  INPUTS  --     PARAMETER           MEANING
  1845. '              ConvertField$    STRING TO MAKE UPPER CASE
  1846. '
  1847. '  OUTPUTS --  ConvertField$    CONVERTED STRINGS
  1848. '
  1849. '  PURPOSE -- Subroutine to convert a string to upper case
  1850. '
  1851. * ------[ first line different ]------
  1852.       SUB AllCaps (ConvertField$)                                    ' RM11159302
  1853.       ConvertField$ = UCASE$(ConvertField$)                          ' RM11159304
  1854. '     IF ZTurboRBBS THEN _
  1855. '        CALL RBBSULC (ConvertField$) : _
  1856. '        EXIT SUB
  1857. '     FOR WasZ = 1 TO LEN(ConvertField$)
  1858. '        WasX = ASC(MID$(ConvertField$,WasZ,1))
  1859. '        IF WasX > 96 THEN IF WasX < 123 THEN _
  1860. '           MID$(ConvertField$,WasZ,1) = CHR$(WasX AND 223)
  1861. '     NEXT
  1862.       END SUB
  1863. * REPLACING old line(s) by new
  1864. 58060 ' $SUBTITLE: 'NameCaps - sub to convert name string to Proper Case'
  1865. ' $PAGE
  1866. '
  1867. '  NAME    -- NameCaps
  1868. '
  1869. '  INPUTS  --     PARAMETER           MEANING
  1870. '              ConvertField$    STRING TO CONVERT
  1871. '
  1872. '  OUTPUTS --  ConvertField$    CONVERTED STRINGS
  1873. '
  1874. '  PURPOSE -- Subroutine to convert a string to Proper Case (1st char upper)
  1875. '
  1876. * ------[ first line different ]------
  1877.       SUB NameCaps (ConvertField$)                                   ' RM11159302
  1878.       CALL AllCaps(ConvertField$)
  1879.       FOR WasZ = 2 TO LEN(ConvertField$)
  1880.          IF MID$(ConvertField$,WasZ,1) > "@" AND _
  1881.             MID$(ConvertField$,WasZ,1) < "[" AND _
  1882.             MID$(ConvertField$,WasZ-1,1) <> " " THEN _
  1883.             MID$(ConvertField$,WasZ,1) = CHR$(ASC(MID$(ConvertField$,WasZ,1)) OR 32)
  1884.       NEXT
  1885.       END SUB
  1886. * REPLACING old line(s) by new
  1887. 58070 ' $SUBTITLE: 'CheckTime - sub to see how much time is remaining'
  1888. ' $PAGE
  1889. '
  1890. '  NAME    -- CheckTime
  1891. '
  1892. '  INPUTS  -- PARAMETER               MEANING
  1893. '             TargetTime              TARGET TIME
  1894. '             ChectimeOption      1 = TELL US TIME REMAINING BETWEEN CURRENT
  1895. '                                     TIME AND TargetTime
  1896. '                                 2 = TELL US TIME ELAPSED BETWEEN TargetTime
  1897. '                                     AND CURRENT TIME
  1898. '
  1899. '  OUTPUTS -- PARAMETER               MEANING
  1900. '             TimeRemaining!      POSITIVE OR NEGATIVE NUMBER INDICATING
  1901. '                                 TIME REMAINING OR ELAPSED.  VALUE MAY BE
  1902. '                                 TESTED FOR "TIME EXPIRED".  NEGATIVE
  1903. '                                 OR ZERO, AND THE TIME HAS BEEN REACHED.
  1904. '                                 ELAPSED TIME CAN BE 0 TO 86400 (24 HRS)
  1905. '                                 TIME REMAINING CAN BE 0 TO 43200 OR
  1906. '                                  -43200 TO 0 (+ OR - 12 HRS)
  1907. '             ZSubParm (Option 1 ONLY!)
  1908. '                                 1 = Time REMAINING is > 0
  1909. '                                 2 = Time REMAINING is <= 0
  1910. '
  1911. '
  1912. '  PURPOSE -- Subroutine to provide time measurement functions.  Will
  1913. '             determine whether a target time has been reached, how much
  1914. '             time is remaining, or how much time has elapsed.
  1915. '
  1916. * ------[ first line different ]------
  1917.       SUB CheckTime (TargetTime!, TimeRemaining!, CkOption)          ' RM11159302
  1918.       IF TargetTime! > 86400 THEN _
  1919.          TestTime! = 86400 : _
  1920.          OverTime! = TargetTime! - 86400 _
  1921.       ELSE _
  1922.          TestTime! = TargetTime! : _
  1923.          OverTime! = 0
  1924.       TimeRemaining! = (TestTime! - TIMER) + OverTime!
  1925.       IF CkOption = 2 THEN GOTO 58072
  1926.       IF TimeRemaining! < -43200 THEN _
  1927.          TimeRemaining! = TimeRemaining! + 86400
  1928.       IF TimeRemaining! > 43200 THEN _
  1929.          TimeRemaining! = TimeRemaining! - 86400
  1930.       IF TimeRemaining! >= 0 THEN _
  1931.          ZSubParm = 1 _
  1932.       ELSE _
  1933.          ZSubParm = 2
  1934.       EXIT SUB
  1935. * REPLACING old line(s) by new
  1936. 58080 ' $SUBTITLE: 'HashRBBS - sub to determine where to look for user'
  1937. ' $PAGE
  1938. '
  1939. '  NAME    -- HashRBBS
  1940. '
  1941. '  INPUTS  --     PARAMETER           MEANING
  1942. '               StringToHash$    USER NAME TO LOCATE
  1943. '               MaxPosition      MAXIMUM # USERS
  1944. '
  1945. '  OUTPUTS --     PrimeHash       WHERE TO LOOK First
  1946. '                SecondHash       LOOK THIS FAR AHEAD
  1947. '
  1948. '  PURPOSE -- Where to look for a user in users file
  1949. '             Look first at prime position, then add
  1950. '             SecondHash until find or find unused record
  1951. '
  1952. * ------[ first line different ]------
  1953.       SUB HashRBBS (StringToHash$,MaxPosition,PrimeHash,SecondHash)  ' RM11159302
  1954.       SecondHash = (ASC(MID$(StringToHash$,2,1)) * 10  + 7) MOD _
  1955.            MaxPosition
  1956.       PrimeHash = _
  1957.            ((ASC(StringToHash$) * 100  + _
  1958.              ASC(MID$(StringToHash$,(LEN(StringToHash$) / 2) + .1,1)) * _
  1959.              10  + _
  1960.              ASC(RIGHT$(StringToHash$,1))) _
  1961.              MOD MaxPosition) + 1
  1962.       END SUB
  1963. * REPLACING old line(s) by new
  1964. 58100 ' $SUBTITLE: 'SetOpts - sub to set prompts based on user security'
  1965. ' $PAGE
  1966. '
  1967. '  NAME    -- SetOpts
  1968. '
  1969. '  INPUTS  --     PARAMETER           MEANING
  1970. '                   First             POSITION WHERE START LOOKING
  1971. '                   Last              POSITION WHERE QUIT LOOKING
  1972. '                   ZUserSecLevel     SECURITY OF USER
  1973. '
  1974. '  OUTPUTS -- Options$              LIST OF COMMANDS USER CAN DO
  1975. '
  1976. '  PURPOSE -- String together what commands user can do in a section
  1977. '
  1978. * ------[ first line different ]------
  1979.       SUB SetOpts (Options$,InvalidOptions$,First,Last)              ' RM11159302
  1980.       Options$ = ""
  1981.       InvalidOptions$ = ""
  1982.       FOR WasI = First TO Last
  1983.          IF ZUserSecLevel < ZOptSec(WasI) THEN _
  1984.             InvalidOptions$ = InvalidOptions$ + _
  1985.                                MID$(ZAllOpts$,WasI,1) _
  1986.          ELSE IF MID$(ZAllOpts$,WasI,1) <> " " THEN _
  1987.                  Options$ = Options$ + _
  1988.                             MID$(ZAllOpts$,WasI,1)
  1989.       NEXT
  1990.       CALL SortString (Options$)
  1991.       CALL SortString (InvalidOptions$)
  1992.       END SUB
  1993. * REPLACING old line(s) by new
  1994. 58110 ' $SUBTITLE: 'CheckNewBul - sub to check whether got new bulletins'
  1995. ' $PAGE
  1996. '
  1997. '  NAME    -- CheckNewBul
  1998. '
  1999. '  INPUTS  --     PARAMETER           MEANING
  2000. '                 LastOn$             Last DATE OF LOGON
  2001. '                                   FORMAT MM/DD/YY
  2002. '                 ZActiveBulletins  # OF BULLETING
  2003. '                 ZBulletinPrefix$  FILESPEC FOR BULLETINS
  2004. '
  2005. '  OUTPUTS --     NumNewBullets   NUMBER OF NEW BULLETINS
  2006. '                 NewBullets$      LIST OF NEW BULLET #'S
  2007. '                 ZWasQ            WHERE Last BULLETIN STORED
  2008. '                                  IN ZUserIn$()
  2009. '                 ZOutTxt$()       BULLETINS #'S THAT ARE NEW
  2010. '                                    (2,3,4,...)
  2011. '
  2012. '  PURPOSE -- Checks how many bulletins have system date
  2013. '             at or later than date caller last logged on
  2014. '
  2015.       SUB CheckNewBul (LastOn$,NumNewBullets,NewBullets$) STATIC
  2016.       IF ZExitToDoors OR ZBulletinPrefix$ = ZPrevPrefix$ THEN _
  2017.          EXIT SUB
  2018.       ZPrevPrefix$ = ZBulletinPrefix$
  2019.       NumNewBullets = 0
  2020.       NewBullets$ = ""
  2021.       BaseDate# = VAL(MID$(LastOn$,4,2)) + (100 * VAL(MID$(LastOn$,1,2))) + _
  2022.                    (10000# * (1900 + VAL(MID$(LastOn$,7,2))))
  2023.       CALL FindIt (ZBulletinPrefix$ + ".FCK")
  2024.       WasX = 0
  2025. * ------[ first line different ]------
  2026.       CALL SkipLine(1)                                               ' DGS092501-DS
  2027.       CALL QuickTPut (ZFG7$ + "Checking new bulletins" + ZEmphasizeOff$,0) ' RM051701
  2028.       IF ZOK THEN _
  2029.          WHILE NOT EOF(2) : _
  2030.             INPUT #2,WasBN$ : _
  2031.             GOSUB 58112 : _
  2032.          WEND _
  2033.       ELSE FOR WasI = 1 TO ZActiveBulletins : _
  2034.               WasBN$ = MID$(STR$(WasI),2) : _
  2035.               GOSUB 58112 : _
  2036.            NEXT
  2037.       ZWasQ = NumNewBullets + 1
  2038.       IF NumNewBullets < 1 THEN _
  2039.          NewBullets$ = ""
  2040.       CALL SkipLine (1)
  2041.       IF NumNewBullets > 0 THEN _                                    ' RM10069303
  2042.          ZOutTxt$ = ZFG6$ + "There Are" + ZFG7$ + STR$(NumNewBullets) + _
  2043.            ZFG6$ + " New bulletin(s) since last call" + ZEmphasizeOff$ _ ' RM10069303
  2044.       ELSE _                                                         ' RM10069303
  2045.          ZOutTxt$ = ZFG6$ + "There Are" + ZFG7$ + " NO" + _
  2046.            ZFG6$ + " New bulletin(s) since last call" + ZEmphasizeOff$   ' RM10069303
  2047.       CALL QuickTPut1 (ZOutTxt$)
  2048.       CALL BufString (NewBullets$,4096,WasX)
  2049.       CALL SkipLine (1)
  2050.       EXIT SUB
  2051. * REPLACING old line(s) by new
  2052. 58112 FirstWord$ = WasBN$
  2053.       CALL Trim (FirstWord$)
  2054.       FirstWord$ = LEFT$(FirstWord$,INSTR(FirstWord$+" "," ")-1)
  2055.       IF FirstWord$ = "N" THEN _
  2056.          WasX$ = ZNewsFileName$ + CHR$(0) _
  2057.       ELSE WasX$ = ZBulletinPrefix$ + FirstWord$ + CHR$(0)
  2058.       CALL MarkTime (WasX)
  2059. * ------[ first line different ]------
  2060.       CALL RBBSFind (WasX$,WasIX,TYear,WasMM,WasDD)                  ' MSVB/RM041101
  2061.       IF WasIX = 0 THEN _
  2062.          FDate# = WasDD + (100 * WasMM) + (10000# * (TYear + 1980)) : _ ' MSVB/RM041101
  2063.          IF BaseDate# <= FDate# THEN _
  2064.             NumNewBullets = NumNewBullets + 1 : _
  2065.             ZOutTxt$(NumNewBullets + 1) = FirstWord$ : _
  2066.             NewBullets$ = NewBullets$ + " " + WasBN$
  2067.       RETURN
  2068.       END SUB
  2069. * REPLACING old line(s) by new
  2070. 58130 ' $SUBTITLE: 'AddCommas - sub to format commands in command prompt'
  2071. ' $PAGE
  2072. '
  2073. '  NAME    -- AddCommas
  2074. '
  2075. '  INPUTS  --     PARAMETER           MEANING
  2076. '                 Strng$           STRING TO REPLACE
  2077. '
  2078. '  OUTPUTS --     Strng$           REPLACED STRING
  2079. '
  2080. '  PURPOSE -- Inserts commands between each letter in Strng$
  2081. '             and encloses in pointed brackets
  2082. '
  2083. * ------[ first line different ]------
  2084.       SUB AddCommas (Strng$)                                         ' RM11159302
  2085.       WasL = LEN(Strng$)
  2086.       IF WasL < 1 THEN _
  2087.          EXIT SUB
  2088.       LSET ZLineMes$ = " <" + _
  2089.                       LEFT$(Strng$,1)
  2090.       FOR WasK = 2 TO WasL
  2091.          MID$(ZLineMes$,2 * WasK,2) = "," + _
  2092.                                   MID$(Strng$,WasK,1)
  2093.       NEXT
  2094.       Strng$ = LEFT$(ZLineMes$,2 * WasL + 1) + _
  2095.                ">"
  2096.       END SUB
  2097. * REPLACING old line(s) by new
  2098. 58140 ' $SUBTITLE: 'LoadNew - subroutine to get latest uploads'
  2099. ' $PAGE
  2100. '
  2101. '  NAME    -- LoadNew
  2102. '
  2103. '  INPUTS  --     PARAMETER           MEANING
  2104. '               ZUpldDir$             LIST OF FILES UPLOADED
  2105. '
  2106. '  OUTPUTS --   ZOutTxt$              LATEST UPLOADS
  2107. '
  2108. '  PURPOSE -- Loads table of most recent number of uploads by date
  2109. '
  2110.       SUB LoadNew (Ara(2)) STATIC
  2111.       IF ZFMSDirectory$ = "" THEN _
  2112.          EXIT SUB
  2113.       ZPrevBase$ = ""
  2114. * ------[ first line different ]------
  2115.       ZTurboBase = ZFalse                                            ' RM03169401
  2116.       FirstWarning = ZTrue
  2117.       IF PrevLoadNew$ = ZFMSDirectory$ THEN _
  2118.          Ara(1,1) = 0 : _
  2119.          EXIT SUB
  2120.       CALL SkipLine(1)                                               ' DGS050501/DS
  2121.       CALL QuickTPut (ZFG4$ + "Checking for " + ZFG7$ + "NEW" + ZFG4$ + _
  2122.                      " files " + ZEmphasizeOff$,0)                   ' DGS050501/DS/RM10079301
  2123. * REPLACING old line(s) by new
  2124. 58141 PrevLoadNew$ = ZFMSDirectory$
  2125.       CALL OpenFMS (LastRec,WasL)
  2126.       FIELD 2, 23 AS PreDate$, _
  2127.                 2 AS WasMM$, _
  2128.                 1 AS Fill1$, _
  2129.                 2 AS WasDD$, _
  2130.                 1 AS Fill2$, _
  2131.                 2 AS Year$, _
  2132.                 (2 + ZMaxDescLen) AS Desc$, _
  2133.                 3 AS Category$, _
  2134.                 2 AS Fill4$
  2135.       MaxRecs = UBOUND(Ara,1)
  2136.       IF MaxRecs < 1 THEN _
  2137.          MaxRecs = 1 _
  2138. * ------[ first line different ]------
  2139.       ELSE IF MaxRecs > 200 THEN _                                   ' DGS050501/DS
  2140.               MaxRecs = 200                                          ' DGS050501/DS
  2141.       WasL = 0
  2142.       WasK = LastRec
  2143.       WHILE WasK > 0 AND WasL < MaxRecs
  2144.          NumDots = 0                                                 ' RM10069306/RM10129301
  2145.          CALL MarkTime (NumDots)                                     ' DGS050501/DS
  2146.          GET #2,WasK
  2147.          IF INSTR("*\ ",LEFT$(PreDate$,1)) > 0 THEN _
  2148.             GOTO 58142
  2149.          IF (ZCanDnldFromUp OR Category$ <> ZDefaultCatCode$) THEN _
  2150.             IF VAL(Year$) > 79 THEN _
  2151.                WasL = WasL + 1 : _
  2152.                Ara(WasL,1) = 372! * (VAL(Year$) - 80!) + 31! * VAL(WasMM$) + VAL(WasDD$) _
  2153.             ELSE IF FirstWarning THEN _
  2154.                     FirstWarning = ZFalse : _
  2155.                     ZWasZ$ = "Invalid FMS format " + ZFMSDirectory$ : _
  2156.                     ZSnoop = ZTrue : _
  2157.                     CALL LPrnt (ZWasZ$,1) : _
  2158.                     CALL UpdtCalr (ZWasZ$,2)
  2159.          IF NOT ZCanDnldFromUp THEN _
  2160.             WasX = ZMinSecToView _
  2161.          ELSE IF Category$ = "***" THEN _
  2162.                  WasX = ZSysopSecLevel _
  2163.               ELSE IF Category$ = ZDefaultCatCode$ THEN _
  2164.                       WasX = ZMinSecToView _
  2165.               ELSE IF LEFT$(PreDate$,1) = "=" THEN _
  2166.                       CALL CheckInt (Desc$) : _
  2167.                       WasX = ZTestedIntValue _
  2168.               ELSE WasX = ZOptSec(19)
  2169.          Ara(WasL,2) = WasX
  2170. * REPLACING old line(s) by new
  2171. 58150 ' $SUBTITLE: 'CountNewFiles - sub to count how many files new'
  2172. ' $PAGE
  2173. '
  2174. '  NAME    -- CountNewFiles
  2175. '
  2176. '  INPUTS  --     PARAMETER           MEANING
  2177. '                  LastOn$          Date of last logon
  2178. '                  UPLDS$            Latest uploads
  2179. '
  2180. '  OUTPUTS --    NumNewFiles       How many after last logon
  2181. '                RptPrefix$         Set to "At least " if
  2182. '                                    above is a minimum
  2183. '
  2184. '  PURPOSE -- Checks how many files in UPLDS$ were uploaded on or
  2185. '             after date of last logon that the user can download
  2186. '
  2187.       SUB CountNewFiles (LastOn$,Upld(2),NumUserFiles,RptPrefix$) STATIC
  2188.       BaseDate = 372 * (VAL(MID$(LastOn$,7,2)) - 80) + _
  2189.                   31 * (VAL(MID$(LastOn$,1,2))) + _
  2190.                   VAL(MID$(LastOn$,4,2))
  2191.       NumNewFiles = 1
  2192.       NumUserFiles = 0
  2193.       WHILE (BaseDate <= Upld(NumNewFiles,1) AND _
  2194.                 Upld(NumNewFiles,1) > 0 AND _
  2195.                 NumNewFiles < UBOUND(Upld,1))
  2196.          IF ZUserSecLevel => Upld(NumNewFiles,2) THEN _
  2197.             NumUserFiles = NumUserFiles + 1
  2198.          NumNewFiles = NumNewFiles + 1
  2199.       WEND
  2200.       IF Upld(NumNewFiles,1) < 1 THEN _
  2201.          NumNewFiles = NumNewFiles - 1
  2202. * ------[ first line different ]------
  2203.       IF BaseDate <= Upld(NumNewFiles,1) AND NumNewFiles > 0 THEN _  ' UG070504
  2204.          RptPrefix$ = " At least" _
  2205.       ELSE RptPrefix$ = ""
  2206.       END SUB
  2207. * REPLACING old line(s) by new
  2208. 58160 ' $SUBTITLE: 'CountLines - sub to determine file categories '
  2209. ' $PAGE
  2210. '
  2211. '  NAME    -- CountLines
  2212. '
  2213. '  INPUTS  -- PARAMETER             MEANING
  2214. '             ZDirCatFile$          NAME OF THE FILE THAT HAS THE
  2215. '                                   NUMBER OF CATEGORIES IN IT.
  2216. '
  2217. '  OUTPUTS -- MaxEntries           NUMBER OF FILE CATEGORIES
  2218. '
  2219. '  PURPOSE -- Subroutine to count the number of categories that a
  2220. '             file can be classified into.
  2221. '
  2222. * ------[ first line different ]------
  2223.       SUB CountLines (MaxEntries)                                    ' RM11159302
  2224.       CALL LinesInFile (ZDirCatFile$,MaxEntries)
  2225.       MaxEntries = MaxEntries + 4
  2226.       IF MaxEntries < 10 THEN _
  2227.          MaxEntries = 10
  2228.       END SUB
  2229. * REPLACING old line(s) by new
  2230. * ------[ first line different ]------
  2231. 58161 ' $SUBTITLE: 'LinesInFile - sub to determine lines in file '   ' RM060701
  2232. ' $PAGE
  2233. '
  2234. '  NAME    -- LinesInFile
  2235. '
  2236. '  INPUTS  -- PARAMETER             MEANING
  2237. '             FilName$              Name of file to use
  2238. '
  2239. '  OUTPUTS -- LineCount             Count of # of lines in file
  2240. '
  2241. '  PURPOSE -- Subroutine to count the number of lines in a file      ' RM060701
  2242. '
  2243.       SUB LinesInFile (FilName$,LineCount)                           ' RM11159302
  2244.       CALL FindIt (FilName$)
  2245.       LineCount = 0
  2246.       IF ZOK THEN _
  2247.          WHILE NOT EOF(2) : _
  2248.             LineCount = LineCount + 1 : _
  2249.             LINE INPUT #2,ZOutTxt$ : _
  2250.          WEND
  2251.       CLOSE 2
  2252.       END SUB
  2253. * REPLACING old line(s) by new
  2254. * ------[ first line different ]------
  2255. 58165 ' $SUBTITLE: 'DispUpDir - sub to display upload direcotry'
  2256. ' $PAGE
  2257. '
  2258. '  NAME    -- DispUpDir
  2259. '
  2260. '  INPUTS  -- PARAMETER             MEANING
  2261. '             PassedCats$         FILE "CATEGORIES" TO BE INCLUDED IN
  2262. '                                 THE SEARCH.
  2263. '             SearchString$       STRING TO SEARCH ON WITHIN THE
  2264. '                                 FILE "CATEGORIES" SELECTED
  2265. '             SearchDate$         DATE EQUAL TO OR GREATER THAN TO BE
  2266. '                                 SEARCHED FOR WITH THE "CATEGORIES"
  2267. '                                 AND THE STRING TO SEARCH.
  2268. '             DnldFlag            SET TO RECORD # OF LINE TO BEGIN
  2269. '                                 VIEWING - 0 IF AT END
  2270. '
  2271. '  OUTPUTS -- DnldFlag            WHENEVER DOWNLOAD REQUESTED, SETS
  2272. '                                 TO NEXT RECORD TO VIEW.  OTHERWISE
  2273. '                                 LEAVES AT ZERO
  2274. '  PURPOSE -- Display the files that meet the criteria selected in
  2275. '             RBBS-PC upload management system on the users screen.
  2276. '
  2277.       SUB DispUpDir (PassedCats$,SearchString$, _
  2278.                     SearchDate$,DnldFlag,AbortIndex) STATIC
  2279.       CALL AllCaps (SearchString$)
  2280.       Blank$ = " "
  2281.       ZStopInterrupts = ZFalse
  2282.       ZLastIndex = 0
  2283.       Categories$ = "," + _
  2284.                     PassedCats$ + _
  2285.                     ","
  2286.       IF ZMenuIndex = 6 THEN _                                       ' RM03289401
  2287.          CanDnld = (ZUserSecLevel => ZOptSec(41)) : _                ' RM03289401
  2288.          CanView = (ZUserSecLevel => ZOptSec(45)) _                  ' RM03289401
  2289.       ELSE _                                                         ' RM03289401
  2290.          CanDnld = (ZUserSecLevel => ZOptSec(19)) : _
  2291.          CanView = (ZUserSecLevel => ZOptSec(26))
  2292.       ZJumpSupported = ZTrue
  2293.       ZJumpSearching = ZFalse
  2294.       GOSUB 58185
  2295.       OrigDir$ = ZActiveFMSDir$                                      ' RM01179401
  2296.       IF DnldFlag > 0 THEN _
  2297.          UpldIndex = DnldFlag : _
  2298.          DnldFlag = 0 : _
  2299.          GOTO 58180
  2300.       ZJumpLast$ = ""
  2301.       SearchFor$ = SearchString$
  2302.       ExtraPrompt$ = ""                                              ' RM02199401
  2303.       IF CanView THEN _                                              ' RM02199401
  2304.          ExtraPrompt$ = LEFT$(",V)iew",-4 * (NOT ZExpertUser) + 2)   ' RM02199401
  2305.       IF CanDnld THEN _                                              ' RM01179401
  2306.             ExtraPrompt$ = ExtraPrompt$ + LEFT$(",M)ark",-4 * (NOT ZExpertUser) + 2) + _
  2307.             LEFT$(",D)nld",-4 * (NOT ZExpertUser) + 2)               ' RM01179401/RM02199401
  2308.       MaxPrint = ZPageLength - 1
  2309.       BelowMinSec = (ZUserSecLevel < ZMinSecToView)
  2310.       ZNonStop = ZNonStop OR (ZPageLength < 1)
  2311.       FMSCheckPoint = 0
  2312.       WildSearch = (INSTR(SearchString$,"?") > 0) _
  2313.                      OR (INSTR(SearchString$,"*") > 0)
  2314. * REPLACING old line(s) by new
  2315. 58168 UpldIndex = UpldIndex + ZUpInc
  2316. * ------[ first line different ]------
  2317.       IF UpldIndex = CutoffRec OR UpldIndex < 1 THEN _
  2318.          GOTO 58182
  2319.       GET #2,UpldIndex
  2320.       FMSCheckPoint = FMSCheckPoint + 1
  2321.       ON INSTR("\* =",LEFT$(PartToPrint$,1)) GOTO 58168,58171,58170,58169
  2322.       GOTO 58172
  2323. * REPLACING old line(s) by new
  2324. * ------[ first line different ]------
  2325. 58170 IF ZExtendedOff THEN _
  2326.          GOTO 58168 _
  2327.       ELSE IF LastOK THEN _
  2328.          GOTO 58175 _
  2329.       ELSE IF ZJumpSearching THEN _
  2330.               GOTO 58187 _
  2331.            ELSE IF SearchString$ <> "" AND (NOT WildSearch) AND FailedSearch THEN _
  2332.                    GOTO 58187 _
  2333.                 ELSE GOTO 58168
  2334. * REPLACING old line(s) by new
  2335. * ------[ first line different ]------
  2336. 58171 IF Category$ = "***" THEN _
  2337.          GOTO 58176 _
  2338.       ELSE HoldCat$ = "," + Category$ + "," : _
  2339.            IF INSTR(Categories$,HoldCat$) > 0 THEN _
  2340.               GOTO 58176 _
  2341.            ELSE GOTO 58168
  2342. * REPLACING old line(s) by new
  2343. * ------[ first line different ]------
  2344. 58172 LastOK = ZFalse
  2345.       FailedSearch = ZFalse
  2346.       LastFName = UpldIndex
  2347.       IF Category$ = "***" THEN _
  2348.          IF NOT ZSysop THEN _
  2349.             GOTO 58178
  2350.       IF Category$ = ZDefaultCatCode$ THEN _
  2351.          IF BelowMinSec THEN _
  2352.             GOTO 58178
  2353. * REPLACING old line(s) by new
  2354. 58173 IF LEN(Categories$) > 2 THEN _
  2355. * ------[ first line different ]------
  2356.          HoldCat$ = "," + _
  2357.                 Category$ + _
  2358.                 "," : _
  2359.          CALL Remove (HoldCat$,Blank$) : _
  2360.          IF INSTR(Categories$,HoldCat$) = 0 THEN _
  2361.             GOTO 58178
  2362.       IF ZJumpSearching OR SearchString$ <> "" THEN _
  2363.          ZOutTxt$ = PartToPrint$ : _
  2364.          IF WildSearch THEN _
  2365.             Temp$ = LEFT$(PartToPrint$,INSTR(PartToPrint$," ")-1) : _
  2366.             Temp$ = MID$(Temp$,1-(LEFT$(Temp$,1)="=")) : _
  2367.             CALL WildFile (SearchString$,Temp$,ZOK) : _
  2368.             IF ZOK THEN _
  2369.                FoundString$ = SearchString$ : _
  2370.                GOTO 58175 _
  2371.             ELSE GOTO 58178 _
  2372.          ELSE CALL AllCaps (ZOutTxt$) : _
  2373.               HiLitePos = INSTR(ZOutTxt$,SearchFor$) : _
  2374.               IF HiLitePos = 0 THEN _
  2375.                  FailedSearch = ZTrue : _
  2376.                  GOTO 58178 _
  2377.               ELSE HiLiteRec = UpldIndex : _
  2378.                    FoundString$ = SearchFor$ : _
  2379.                    IF ZJumpSearching THEN _
  2380.                       ZJumpSearching = ZFalse : _
  2381.                       SearchFor$ = PrevSearch$
  2382. * REPLACING old line(s) by new
  2383. 58174 IF SearchDate$ <> "" THEN _
  2384.          HoldCat$ = MID$(PartToPrint$,30,2) + _
  2385.                 MID$(PartToPrint$,24,2) + _
  2386.                 MID$(PartToPrint$,27,2) : _
  2387.          IF HoldCat$ < SearchDate$ THEN _
  2388.             IF ZDateOrderedFMS THEN _
  2389. * ------[ first line different ]------
  2390.                GOTO 58196 _                                          ' RM01179401 - 58183
  2391.             ELSE GOTO 58168
  2392. '
  2393. '
  2394. ' * Allow the FMS to be both fast and interruptable if a local
  2395. ' * user or there is nothing in the input buffer by using QuickTPut.
  2396. '
  2397. '
  2398. * REPLACING old line(s) by new
  2399. 58176 ZWasA = EndDesc
  2400.       IF LEFT$(PartToPrint$,5) = "     " THEN _
  2401.          GOTO 58178
  2402.       ZOutTxt$ = PartToPrint$
  2403. * ------[ first line different ]------
  2404.       CALL TrimTrail (ZOutTxt$," ")
  2405.       CALL ColorDir (ZOutTxt$,"Y")
  2406.       IF UpldIndex = HiLiteRec THEN _
  2407.          HiLiteRec = -1 : _
  2408.          HiLitePos = 0 : _
  2409.          CALL CheckColor (ZOutTxt$,FoundString$,"")
  2410. * REPLACING old line(s) by new
  2411. 58177 IF ZLocalUser THEN _
  2412.          CALL QuickTPut1 (ZOutTxt$) : _
  2413.          GOTO 58178
  2414.       CALL EofComm (Char)
  2415.       IF Char = -1 THEN _
  2416.          CALL QuickTPut1 (ZOutTxt$) _
  2417.       ELSE ZSubParm = 5 : _
  2418.            CALL TPut : _
  2419.            IF ZRet THEN _
  2420. * ------[ first line different ]------
  2421.               GOTO 58183
  2422. * REPLACING old line(s) by new
  2423. 58178 IF ZLinesPrinted <= MaxPrint AND (FMSCheckPoint MOD 1000 <> 0) THEN _
  2424.          GOTO 58168
  2425.       CALL CheckCarrier
  2426.       IF ZSubParm = -1 THEN _
  2427. * ------[ first line different ]------
  2428.          GOTO 58183
  2429.       CALL TimeRemain (MinsRemaining)
  2430.       IF MinsRemaining <= 0 THEN _
  2431.          ZSubParm = -1 : _
  2432.          GOTO 58183
  2433.       IF ZNonStop THEN _
  2434.          GOTO 58168
  2435.       IF ZLinesPrinted <= MaxPrint AND LEFT$(PartToPrint$,1) <> " " THEN _ ' RM03319401
  2436.          IF ZDateOrderedFMS THEN _
  2437.             CALL QuickTPut1 (ZEmphasizeOff$ + _
  2438.                "Files checked thru " + MID$(PartToPrint$,24,8)) _
  2439.          ELSE _
  2440.             CALL QuickTPut1 (ZEmphasizeOff$ + STR$(FMSCheckPoint) + _
  2441.                " files checked")
  2442. * DELETING old line(s)
  2443. 58179
  2444. * REPLACING old line(s) by new
  2445. * ------[ first line different ]------
  2446. 58180 IF AtEndList THEN _                                            ' RM01179401
  2447.          GOTO 58196                                                  ' RM01179401
  2448.       ZTurboKey = -ZTurboKeyUser
  2449.       ZStackC = ZTrue
  2450.       CALL AskMore (ExtraPrompt$,ZTrue,ZFalse,AbortIndex,ZFalse)
  2451.       IF ZSubParm = -1 THEN _
  2452.          GOTO 58183 _                                                ' RM01239401
  2453.       ELSE _                                                         ' RM01239401
  2454.          ZLastIndex = ZWasQ : _                                      ' RM01239401
  2455.          IF NOT ZNo THEN _                                           ' RM01239401
  2456.             ZAnsIndex = 1                                            ' RM01239401
  2457.       IF ZNo THEN _
  2458.          ZLastIndex = 0 : _                                          ' RM01239401
  2459.          ZRet = ZTrue : _                                            ' RM04049401
  2460.          GOTO 58183
  2461. * REPLACING old line(s) by new
  2462. * ------[ first line different ]------
  2463. 58181 CALL AraAllCaps (ZUserIn$(),1)                                 ' RM01179401
  2464.       IF ZUserIn$(1) = "M" AND CanDnld THEN                          ' KG091001/RM01179401
  2465.          Temp$ = "M"                                                 ' RM01209401
  2466.          IsMarking = ZTrue                                           ' RM01209401
  2467.          GOSUB 58194                                                 ' RM01209401
  2468.          IF ZFileSysParm = 4 THEN _                                  ' RM01049401
  2469.             GOTO 58183                                               ' RM01049401/RM01209401
  2470.          GOTO 58180                                                  ' RM01179401
  2471.       END IF
  2472.       IF ZUserIn$(1) = "V" AND CanView THEN                          ' RM01209401
  2473.          ZLastIndex = ZWasQ
  2474.          ZAnsIndex = 1
  2475.          CALL GetArc
  2476.          IF ZFileSysParm = 4 THEN _                                  ' RM01209401
  2477.             GOTO 58183                                               ' RM01209401
  2478.          ZJumpSupported = ZTrue
  2479.          ZWasA = UpldIndex
  2480.          GOSUB 58185
  2481.          UpldIndex = ZWasA
  2482.          GOTO 58180
  2483.       END IF
  2484.       IF ZUserIn$(1) = "D" AND CanDnld THEN                          ' RM01209401
  2485.          Temp$ = "D"                                                 ' RM01179401
  2486.          IsMarking = ZFalse                                          ' RM01209401
  2487.          GOSUB 58194                                                 ' RM01209401
  2488.          IF ZFileSysParm = 4 THEN _                                  ' RM01209401
  2489.             GOTO 58183                                               ' RM01209401
  2490.          IF ZWasQ = 0 THEN _
  2491.             GOTO 58180 _                                             ' RM01179401
  2492.          ELSE _                                                      ' RM01179401
  2493.             DnldFlag = UpldIndex : _                                 ' RM01179401
  2494.             EXIT SUB                                                 ' RM01179401
  2495.       END IF                                                         ' RM01209401
  2496.       IF ZJumpSearching THEN _
  2497.          PrevSearch$ = SearchFor$ : _
  2498.          SearchFor$ = ZJumpTo$ _
  2499.       ELSE SearchFor$ = SearchString$ : _
  2500.            IF LEN(ZUserIn$(1)) > 1 THEN _
  2501.            IF NOT ZYes AND CanDnld THEN _
  2502.               CALL SkipLine (1) : _
  2503.               DnldFlag = UpldIndex : _
  2504.               ZLastIndex = ZWasQ : _
  2505.               ZAnsIndex = 1 : _
  2506.               EXIT SUB
  2507.       IF ZNonStop THEN IF UpldIndex > 999 THEN _
  2508.          IF (SearchDate$ = "" OR NOT ZExpertUser) THEN _
  2509.             ZOutTxt$ = STR$(UpldIndex) + _
  2510.                " lines left to search.  Really go non-stop? (Y,[N])" : _
  2511.             ZNoAdvance = ZTrue : _
  2512.             ZTurboKey = -ZTurboKeyUser : _
  2513.             ZSubParm = 1 : _
  2514.             CALL TGet : _
  2515.             CALL WipeLine (79) : _
  2516.             ZNonStop = ZYes
  2517.       GOTO 58168
  2518. * INSERTING new line(s)
  2519. 58182 IF ZChainedDir$ <> "" THEN _
  2520.          ZActiveFMSDir$ = ZChainedDir$ : _
  2521.          GOSUB 58185 : _
  2522.          GOTO 58168
  2523.       GOTO 58196                                                     ' RM01179401
  2524. * REPLACING old line(s) by new
  2525. * ------[ first line different ]------
  2526. 58183 CLOSE 2
  2527.       ZNonStop = (ZPageLength < 1)
  2528.       ZStopInterrupts = ZFalse
  2529.       ZOutTxt$ = ""
  2530.       ZActiveFMSDir$ = ""
  2531.       ZJumpSupported = ZFalse
  2532.       AtEndList = ZFalse                                             ' RM01179401
  2533.       EXIT SUB
  2534. * DELETING old line(s)
  2535. 58184
  2536. * REPLACING old line(s) by new
  2537. * ------[ first line different ]------
  2538. 58185 CALL OpenFMS (UpldIndex,CatLen)                                ' RM01179401
  2539.       EndDesc = 33 + ZMaxDescLen
  2540.       FIELD 2, EndDesc AS PartToPrint$, _
  2541.                3 AS Category$, _
  2542.                2 AS Filler$
  2543.       PrevFMS$ = ZActiveFMSDir$
  2544.       IF ZUpInc = -1 THEN _
  2545.          CutoffRec = 0 : _
  2546.          UpldIndex = UpldIndex + 1 _
  2547.       ELSE CutoffRec = UpldIndex + 1 : _
  2548.            UpldIndex = 0
  2549.       RETURN
  2550. * DELETING old line(s)
  2551. 58186
  2552. * REPLACING old line(s) by new
  2553. 58187 ZOutTxt$ = PartToPrint$
  2554.       CALL AllCaps (ZOutTxt$)
  2555.       HiLitePos = INSTR(ZOutTxt$,SearchFor$)
  2556.       IF HiLitePos < 1 THEN _
  2557.          GOTO 58168
  2558.       HiLiteRec = UpldIndex
  2559. * ------[ first line different ]------
  2560.       UpldIndex = LastFName
  2561.       GET 2,UpldIndex
  2562.       FoundString$ = SearchFor$
  2563.       IF ZJumpSearching THEN _
  2564.          SearchFor$ = PrevSearch$
  2565.       GOTO 58175
  2566. * DELETING old line(s)
  2567. 58188
  2568. 58189
  2569. 58191
  2570. 58193
  2571. * REPLACING old line(s) by new
  2572. * ------[ first line different ]------
  2573. 58194 CALL AskItems ("DM",Temp$,IsMarking,"file",ZMarkedFiles$,ZPersonalDnld) ' KG091001/RM01209401
  2574.       RETURN                                                         ' RM01209401
  2575. * REPLACING old line(s) by new
  2576. * ------[ first line different ]------
  2577. 58196 Temp$ = "End list. "                                           ' RM01179401
  2578.       AtEndList = ZTrue                                              ' RM01179401
  2579.       UpldIndex = CutOffRec - ZUpInc                                 ' RM01179401
  2580.       ZLastIndex = 0                                                 ' RM01179401
  2581.       CALL QuickTPut (ZEmphasizeOff$,0)                              ' RM01179401
  2582.       CALL Line25                                                    ' RM01179401
  2583.       ZOutTxt$ = Temp$ + "(" + LEFT$("L)ist",-4 * (NOT ZExpertUser) + 1) + _ ' RM02219401
  2584.                  LEFT$(",A)bort",-5 * (NOT ZExpertUser) + 2)         ' RM02199401
  2585.       IF CanView THEN _
  2586.          ZOutTxt$ = ZOutTxt$ + LEFT$(",V)iew",-4 * (NOT ZExpertUser) + 2) ' RM02199401
  2587.       IF CanDnld THEN _
  2588.          ZOutTxt$ = ZOutTxt$ + LEFT$(",M)ark",-4 * (NOT ZExpertUser) + 2) + _
  2589.                     LEFT$(",D)nld",-4 * (NOT ZExpertUser) + 2)       ' RM02199401
  2590.       ZOutTxt$ = ZOutTxt$ + ")" + ZPressEnterExpert$                 ' RM02199401/RM02219401
  2591.       ZTurboKey = -ZTurboKeyUser                                     ' RM01179401
  2592.       CALL PopCmdStack                                               ' RM01179401
  2593.       WasX$ = ZUserIn$(ZAnsIndex)                                    ' RM01179401
  2594.       CALL AllCaps (WasX$)                                           ' RM01179401
  2595.       IF WasX$ = "A" THEN ZRet = ZTrue                               ' RM01179401
  2596.       IF ZWasQ = 0 OR ZRet OR ZSubParm < 0 THEN _                    ' RM01179401
  2597.          GOTO 58183                                                  ' RM01179401
  2598.       IF WasX$ = "L" THEN _                                          ' RM01179401
  2599.          ZActiveFMSDir$ = OrigDir$ : _                               ' RM01179401
  2600.          GOSUB 58185 : _                                             ' RM01179401
  2601.          AtEndList = ZFalse : _                                      ' RM01179401
  2602.          GOTO 58168                                                  ' RM01179401
  2603.       ZYes = ZFalse                                                  ' RM01179401
  2604.       GOTO 58181                                                     ' RM01179401
  2605.       END SUB                                                        ' RM01179401
  2606. * DELETING old line(s)
  2607. 58198
  2608.