home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-08-11 | 155.0 KB | 3,311 lines |
- * ------------[ BLED merge (c) Ken Goosens ]-------------
- * Merge this against RBBSSUB2.BAS to produce RBBSSUB2.NEW
- * RBBSSUB2.BAS: Date 6-20-92 Size 140946 bytes
- * ------------[ Created 08-11-1993 19:34:39 ]------------
- * REPLACING old line(s) by new
- * ------[ first line different ]------
- ' $segment
- ' $linesize:132
- ' $title: 'RBBSSUB2.BAS 17.4, Copyright 1986 - 92 by D. Thomas Mack'
- ' Copyright 1991 by D. Thomas Mack, all rights reserved.
- ' Name ...............: RBBSSUB2.BAS
- ' First Released .....: June 21, 1992
- ' Subsequent Releases.:
- ' Copyright ..........: 1986 - 1992
- ' Purpose.............: The Remote Bulletin Board System for the IBM PC,
- ' RBBS-PC.BAS utilizes a lot of common subroutines. Those that do not
- ' require error trapping are incorporated within RBBSSUB 2-5 as
- ' separately callable subroutines in order to free up as much
- ' code as possible within the 64K code segment used by RBBS-PC.BAS.
- ' Parameters..........: Most parameters are passed via a COMMON statement.
- '
- ' Subroutine Line Function of Subroutine
- ' Name Number
- ' Macro 1320 Check/execute macro
- ' AnswerIt 200 Answer the telephone when it rings
- ' ASCIICodes 129 Allow a CONFIG string to have any ASCII value
- ' BadChar 455 Check user name for invalid characters
- ' BadName 20235 Check for system crash attempt with bad file name
- ' BankTime 5500 Let caller change banked time
- ' CheckRatio 20096 Test upload/download ratio
- ' CheckMacro 1242 Checks for macro and processes
- ' CopyRight 97 Display RBBS-PC's copyright notice
- ' DEFALTU 9600 Write out the user's defaults
- ' DenyAccess 1386 Downgrade security so access denied
- ' DoorExit 10983 Set up a .BAT file to exit RBBS-PC to a "door"
- ' DoorInfo 10991 Writes out information for a door
- ' DosExit 10934 Set up a .BAT file to exit to DOS (second level)
- ' EditALine 2618 Edits a single line
- ' EditDef 120 Edit configuration parameters
- ' FileNameCheck 20240 Matches file name to a prefix & extension
- ' GetArc 20140 Handle request for verbose listing
- ' GetCommand 101 Get RBBS-PC's node id from command line
- ' GetTime 9140 Calculates callers elapsed time (hh,mm,ss)
- ' GoIdle 90 Release resources when waiting for keyboard input
- ' KillMsg 3952 Delete old or unnecessary messages
- ' Line25 945 Build and/or update line 25 of RBBS-PC's local screen
- ' LineEdit 3700 Edit a line while minimizing string space consumption
- ' LogError 13660 Log error message to CALLERS file
- ' LPrnt 1480 Subroutine to write to local display
- ' MLInit 8 Handle MultiLink initialization/de-initialization
- ' MsgProt 2055 Sets protection for a message
- ' ParseIt 1637 Parses a string
- ' PassWrd 660 Verify user & message passwords
- ' PopCmdStack 1650 Get user input, 1st checking command stack
- ' PScrn 1483 Print to display
- ' QuickLPrnt 1482 Quickly writes count of blocks on file transfer
- ' QuickTPut 1478 Fast, but limited, "TPut" equivalent
- ' QuickTPut1 1478 Outputs short string following by CR LF
- ' RBBSExit 10992 RBBS-PC exit to transfer control to other programs
- ' RecoverMsg 10410 Recover a deleted message
- ' RemNonAlf 5100 Removes non-alpha characters from a string
- ' RingCaller 1636 Ring caller's bell and put message in emphasis
- ' SetBaud 1654 Set baud rate in the 8250 chip of the RS232 interface
- ' SetCrLf 1496 Set up the necessary carriage return/line feed string
- ' SetSection 12000 Set the proper section prompts (main, file, util, libr)
- ' SetThread 4554 Set up request for threading thru messages
- ' SetWhoTo 2018 Sets who a message/personal upload is to
- ' SkipLine 1485 Write a # of blank lines to the communications port
- ' SearchCmd 1238 Searches list of commands in RBBS for a request
- ' SecViolation 1380 Process a security violation
- ' SysMenu 112 Displays sysop menu/status
- ' SysopChat 4773 Sysop and caller chat
- ' TestRel 336 Tests for Reliable connect
- ' TGet 1498 Read a line from the communications port
- ' TPut 1396 Write a line to the communications port
- ' Trim 105 Strip leading and trailing blanks from a string
- ' TrimTrail 107 Strip off specified string off end of another string
- ' UntilRight 12878 Ask a question until user says answer is right
- ' UpdateU 10600 Updates the user record on loging off/exiting RBBS-PC
- ' VarInit 109 Initialize system variables
- ' ViewHelp 1330 Processes help command
- ' WhoCheck 2250 Checks whether a user exists in user file
- ' WhosOn 9801 Report status of each node - who's on
- ' WordInFile 10976 Find a whole word within a file/menu
- '
- ' $INCLUDE: 'RBBS-VAR.BAS'
- '
- ' $SUBTITLE: 'MLInit - MultiLink initialization/deinitialization'
- ' $PAGE
- '
- ' NAME -- MLInit
- '
- ' INPUTS -- MLParm = 1 INITIALIZE AT STARTUP OR RE-
- ' CYLCE TIME
- ' MLParm = 2 DE-INITIALIZE ON EXITING TO
- ' A DOOR OR DOS REMOTELY
- ' MLParm = 3 DE-QUEUE COMMUNICATIONS PORTS
- ' MLParm = 4 CHECK FOR MULTILINK PRESENT
- ' ZDoorsTermType
- ' ZBaudTest!
- ' ZComPort$
- ' ZComputerType
- '
- ' OUTPUTS -- NONE
- '
- ' PURPOSE -- To test for the presence of multi-link and set
- ' multi link options to be compatible with RBBS-PC
- '
-
- ' SUB MLInit (MLParm) STATIC ' DD090401
- ' DEF SEG = 0 ' DD090401
- ' IF ZComputerType = 1 _ ' DD090401
- ' GOTO 10 ' DD090401
- ' IF NOT ZMLCom THEN _ ' DD090401
- ' IF ZNetworkType <> 1 THEN _ ' DD090401
- ' GOTO 10 ' DD090401
- ' ZMultiLinkPresent = PEEK(&H1FE) + 256 * PEEK(&H1FF) ' DD090401
- ' IF ZMultiLinkPresent = 0 THEN _ ' DD090401
- ' GOTO 10 ' DD090401
- ' ON MLParm GOSUB 30,20,60,10 ' DD090401
- '10 DEF SEG ' DD062304
- ' EXIT SUB ' DD090401
- '20 IF ZDoorsTermType < 1 THEN _ ' DD062304
- ' RETURN ' DD090401
- ' DEF SEG = ZMultiLinkPresent ' DD090401
- ' GOSUB 60 ' DD090401
- ' ************** MLUTIL BAUD n (where n = ZBaudTest!) ****** ' DD090401
- ' WasAX = &H600 ' DD090401
- ' WasBX = ZBaudTest! ' Tell ML the baud rate ' DD090401
- ' GOSUB 80 ' DD090401
- ' ************** MLUTIL TERM n (where n = ZDoorsTermType) **** ' DD090401
- ' WasAX = &H700 + ZDoorsTermType ' DD090401
- ' GOSUB 80 ' Tell ML the terminal type ' DD090401
- ' ********* MLINK /port *********** ' DD090401
- ' ' Tell ML the communications port ' DD090401
- ' POKE (&H64 + PEEK(&H58) + 256 * PEEK(&H59) + &HC),ASC(RIGHT$(ZComPort$,1)) - 48' DD090401
- ' ************ MLUTIL SCMON ************* ' DD090401
- ' WasAX = &HB01 ' DD090401
- ' WasBX = 0 ' Tell ML to start monitoring the carrier ' DD090401
- ' GOSUB 80 ' DD090401
- ' RETURN ' DD090401
- ' ************** MLUTIL CCMON *************** ' DD090401
- '30 WasAX = &HB00 ' Turn off ML's carrier monitoring. ' DD062304
- ' WasBX = 0 ' DD090401
- ' GOSUB 80 ' DD090401
- ' ************** MLUTIL TERM 1 ************* ' DD090401
- ' WasAX = &H701 ' Change terminal type to ML type 1. ' DD090401
- ' WasBX = 0 ' DD090401
- ' GOSUB 80 ' DD090401
- ' ******* MLINK /port (where port = 9 if ML 3.03 or earlier ****** ' DD090401
- ' ******* port = 0 if ML 4.00 or greater ****** ' DD090401
- ' DEF SEG = ZMultiLinkPresent ' DD090401
- ' MultiLinkCommPort = (&H64 + PEEK(&H58) + 256 * PEEK(&H59) + &HC) ' DD090401
- ' MultiLinkVersion = PEEK(&H1) + 256 * PEEK(&H2) ' DD090401
- ' IF PEEK(MultiLinkCommPort) = &H1 OR _ ' DD090401
- ' PEEK(MultiLinkCommPort) = &H2 THEN _ ' DD090401
- ' IF MultiLinkVersion > 5000 THEN _ ' DD090401
- ' POKE (MultiLinkCommPort),&H0 _ ' DD090401
- ' ELSE POKE (MultiLinkCommPort),&H9 ' DD090401
- ' ********** MLUTIL ENQ ********** ' DD090401
- ' WasAX = &H1 ' Tell ML to conditional enque on the comm. port'DD090401
- ' GOSUB 70 ' DD090401
- ' ********** MLUTIL BAUD 19200 ********* ' DD090401
- ' WasAX = &H600 ' Tell ML to reset the buad rate (19200 BAUD)' DD090401
- ' WasBX = 19200 ' DD090401
- ' GOSUB 80 ' DD090401
- ' RETURN ' DD090401
- ' ********** MLUTIL DEQ ********* ' DD090401
- '60 WasAX = &H100 ' Tell ML to unconditionally deque the comm. port' DD062304
- '70 WasBX = -4 ' DD062304
- ' IF ZComPort$ = "COM2" THEN _ ' DD090401
- ' WasBX = -3 ' DD090401
- ' IF ZComPort$ = "COM0" THEN _ ' DD090401
- ' RETURN ' DD090401
- ' ****** MULTI-LINK PROGRAMMING SUPPORT INTERFACE ******* ' DD090401
- '80 CALL RBBSML(WasAX,WasBX) ' DD062304
- ' RETURN ' DD090401
- ' END SUB ' DD090401
- * DELETING old line(s)
- 10
- 20
- 30
- 60
- 70
- 80
- * REPLACING old line(s) by new
- 90 ' $SUBTITLE: 'GoIdle - release control when waiting'
- ' $PAGE
- '
- ' NAME -- GoIdle
- '
- ' INPUTS -- ZMLCom
- ' ZNetworkType
- '
- ' OUTPUTS -- NONE
- '
- ' PURPOSE -- To relinquish control when RBBS-PC is waiting for
- ' input from the communications port
- '
- SUB GoIdle STATIC
- * ------[ first line different ]------
- ' IF ZMLCom OR ZNetworkType = 1 THEN _ ' DD090401
- ' CALL MLInit(5) : _ ' DD090401
- ' EXIT SUB ' DD090401
- CALL GiveBack
- END SUB
- * REPLACING old line(s) by new
- 97 ' $SUBTITLE: 'CopyRight - subroutine to display RBBS-PC copyright'
- ' $PAGE
- '
- ' NAME -- CopyRight
- '
- ' INPUTS -- NONE
- '
- ' OUTPUTS -- NONE
- '
- ' PURPOSE -- To display RBBS-PC's copyright notice on the local screen
- '
- SUB CopyRight STATIC
- ZWasA = (ZDebug OR ZExitToDoors OR ZCopyrightSecs < 1)
- IF ZWasA THEN _
- * ------[ first line different ]------
- ZOK = ZTrue : _ ' DD071901
- EXIT SUB
- WIDTH 80
- CALL FindIt ("COPYRITE.DEF") ' DD062304
- IF NOT ZOK THEN ' DD062304
- PRINT "COPYRITE.DEF not found - Aborting" ' DD062304
- GOTO 98 ' DD062304
- END IF ' DD062304
- CALL OpenWork (2,"COPYRITE.DEF") ' DD062304
- CLS
- KEY OFF
- LOCATE ,,0
- ' ZWasA = ZSnoop ' DD062304
- ' ZSnoop = -1 ' DD062304
- WHILE NOT EOF(2) ' DD062304
- LINE INPUT #2, ZOutTxt$ ' DD062304
- PRINT ZOutTxt$ ' DD062304
- WEND ' DD062304
- * INSERTING new line(s)
- 98 CALL DelayTime (ZCopyrightSecs) ' DD062304
- ' ZSnoop = ZWasA ' DD062304
- END SUB
- * REPLACING old line(s) by new
- 101 ' $SUBTITLE: 'GetCommand - sub to get command from command line'
- ' $PAGE
- '
- ' NAME -- GetCommand
- '
- ' INPUTS -- PARAMETER MEANING
- ' ZConfigFileName$ NAME OF RBBS-PC ".DEF" FILE TO
- ' USE AS A MODEL WHEN CREATING THE
- ' .DEF FILE NAME TO BE USED BY THIS
- ' COPY OF RBBS-PC.
- '
- ' COMMAND LINE COMMAND LINE USED TO INVOKE
- ' RBBS-PC IN THE FORM:
- '
- ' RBBS-PC.EXE x filename DEBUG /time /baud /reliable
- '
- ' WHERE THE OPTIONAL PARAMETERS ARE:
- '
- ' x IS THE NODE ID IN THE RANGE 1-9,0,A-Z
- ' filename IS THE FULLY QUALIFIED FILE NAME TO USE AS THE ".DEF" FILE
- ' DEBUG IS A DEBUGGING Switch
- ' /time IS THE TIME OF DAY FOR RBBS-PC TO RETURN TO THE CALLER
- ' /baud IS THE BAUD RATE OF THE CALLER IF RBBS-PC IS BEING SHELLED TO BY
- ' ANOTHER COMMUNICATIONS PROGRAM (THE COMMUNICATIONS PORT BEING
- ' USED IS ASSUMED TO BE THE ONE INPUTTED VIA THE RBBS-PC CONFIG
- ' PROGRAM
- ' /reliable IS IF RELIABLE MODE WAS DETECTED BY A HOST MAILER
- '
- ' IF NO PARAMETERS ARE SUPPLIED, RBBS-PC ASSUMES THAT THE .DEF FILE NAME IS
- ' RBBS-PC.DEF AND THAT THE NODE IS NODE 1.
- '
- ' OUTPUTS -- ZConfigFileName$ NAME OF RBBS-PC ".DEF" FILE FOR
- ' THIS COPY OF RBBS-PC TO USE
- ' ZNodeRecIndex RECORD NUMBER WITHIN THE
- ' MESSAGES FILE FOR THIS "NODE"
- ' (RANGE IS 2 TO 36)
- '
- ' PURPOSE -- To get node id from command line and determine if rbbs
- ' is being run as a door
- '
- SUB GetCommand (PassedDebug,NetTime$,NetBaud$,NetReliable$) STATIC
- STATIC ZDebug
- '
- '
- ' * GET NODE ID FROM COMMAND LINE
- '
- '
- WasPM$ = COMMAND$
- CALL AllCaps(WasPM$)
- * ------[ first line different ]------
- IF INSTR(WasPM$,CHR$(47)) = 0 THEN _ '/ ' DD021301
- GOTO 103
- '
- '
- ' * PARSE THE COMMAND LINE FOR THREE POSITIONAL SWITCHES FOR NET MAIL
- '
- '
- CmdLine$ = MID$(WasPM$,INSTR(WasPM$,CHR$(47))) ' DD021301
- WasPM$ = LEFT$(WasPM$,INSTR(WasPM$,CHR$(47)) - 1) ' DD021301
- ZWasA = 0
- FOR WasX = 1 TO LEN(CmdLine$)
- IF MID$(CmdLine$,WasX,1) = CHR$(47) THEN _ ' DD021301
- ZWasA = ZWasA + 1 : _
- ZSubDir$(ZWasA) = "" _
- ELSE ZSubDir$(ZWasA) = ZSubDir$(ZWasA) + MID$(CmdLine$,WasX,1)
- NEXT
- NetTime$ = ZSubDir$(1)
- IF ZWasA > 1 THEN _
- NetBaud$ = ZSubDir$(2)
- IF ZWasA > 2 THEN _
- ZCBaud$ = STR$(VAL(ZSubDir$(3))) 'Pe 031692
- IF ZWasA > 3 THEN _
- NetReliable$ = ZSubDir$(4) 'lk 022792
- CALL Trim(NetTime$)
- CALL Trim(NetBaud$)
- CALL Trim (ZCBaud$) ' Mpl090202
- CALL Trim(NetReliable$) ' Mpl090202
- * REPLACING old line(s) by new
- 103 ZWasA = INSTR(WasPM$,"DEBUG")
- IF ZWasA > 0 THEN _
- ZDebug = -1 : _
- WasPM$ = LEFT$(WasPM$,ZWasA - 1) + _
- RIGHT$(WasPM$,LEN(WasPM$) - ZWasA - 4)
- PassedDebug = ZDebug
- ZWasA = INSTR(WasPM$,"LOCAL")
- IF ZWasA > 0 THEN _
- ZComPort$ = "COM0" : _
- WasPM$ = LEFT$(WasPM$,ZWasA - 1) + _
- RIGHT$(WasPM$,LEN(WasPM$) - ZWasA - 4)
- IF LEN(WasPM$) = 0 THEN _
- * ------[ first line different ]------
- WasPM$ = CHR$(45) '- ' DD021301
- ZNodeRecIndex = INSTR("-1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ",LEFT$(WasPM$,1))
- IF ZNodeRecIndex < 2 THEN _
- ZNodeRecIndex = 2
- ZNodeID$ = MID$(STR$(ZNodeRecIndex-1),2)
- IF ZNodeRecIndex > 10 THEN _
- ZNodeFileID$ = LEFT$(WasPM$,1) _
- ELSE ZNodeFileID$ = ZNodeID$
- ' IF ZNodeID$ <> CHR$(49) THEN _ '1 ' DD071001
- ' ZLibNodeID$ = ZNodeFileID$ ' DD071001
- IF LEN(WasPM$) > 2 AND MID$(WasPM$,2,1) = SPACE$(1) THEN _ ' DD021301
- ZConfigFileName$ = MID$(WasPM$,3)_
- ELSE MID$(ZConfigFileName$,5,1) = WasPM$
- ZOrigCnfg$ = ZConfigFileName$
- END SUB
- * REPLACING old line(s) by new
- 105 ' $SUBTITLE: 'Trim - sub to eliminate leading/trailing blanks'
- ' $PAGE
- '
- ' NAME -- Trim
- '
- ' INPUTS -- PARAMETER MEANING
- ' TrimParm$ STRING THAT IS TO HAVE LEADING
- ' AND TRAILING BLANKS ELIMINATED FROM
- '
- ' OUTPUTS -- TrimParm$ STRING WITH NO LEADING OR TRAILING
- ' BLANKS
- '
- ' PURPOSE -- To strip leading and trailing blanks
- '
- SUB Trim (TrimParm$) STATIC
- * ------[ first line different ]------
- WasL = INSTR(TrimParm$,SPACE$(1)) ' DD021301
- IF WasL < 1 THEN _
- EXIT SUB
- IF WasL = 1 THEN _
- WHILE LEFT$(TrimParm$,1) = SPACE$(1) : _ ' DD021301
- TrimParm$ = RIGHT$(TrimParm$,LEN(TrimParm$) - 1) : _
- WEND
- CALL TrimTrail (TrimParm$,SPACE$(1)) ' DD021301
- END SUB
- '
- * REPLACING old line(s) by new
- 109 ' $SUBTITLE: 'VarInit - subroutine to initialize system variables'
- ' $PAGE
- '
- ' NAME -- VarInit
- '
- ' INPUTS -- PARAMETER MEANING
- ' NONE
- '
- ' OUTPUTS -- NONE
- '
- ' PURPOSE -- To initialize system variable
- '
- SUB VarInit STATIC
- DEF SEG ' Point to BASIC
- WIDTH 80 ' Set Screen Width
- KEY OFF ' Line 25 turned off
- ' ********************* Variable Definitions *******************************
- * ------[ first line different ]------
- ZMsgDim = 199 ' DD021701
- WasMM = 999
- WasBX = 75
- WasJ = 60
- REDIM ZOptSec(WasJ)
- DIM ZWorkAra$(WasJ)
- DIM ZGSRAra$(WasJ)
- DIM ZCategoryName$(WasBX),ZCategoryCode$(WasBX),ZCategoryDesc$(WasBX)
- DIM ZOutTxt$(ZMsgDim) ' Message line table
- DIM ZUserIn$(ZMsgDim) ' Message line table
- DIM ZMsgPtr(WasMM,2) ' Message pointers
- ZAcknowledge$ = CHR$(6)
- ZAckChar$ = CHR$(67) + _ 'C ' DD021301
- ZAcknowledge$
- ZActiveMenu$ = CHR$(124) '| ' DD021301
- ZActiveMessage$ = CHR$(225)
- ZBackSpace$ = CHR$(8) + _
- CHR$(32) + _
- CHR$(8)
- ' ZBackArrow$ = CHR$(29) + _ ' DD050701
- ' CHR$(32) + _ ' DD050701
- ' CHR$(29) ' DD050701
- ZBaudRates$ = " 300 450 1200 2400 4800 7200 96001200014400168001920038400"
- ZBellRinger$ = CHR$(7)
- ZBulletinMenu$ = ""
- ZWasCL = 24
- ZCancel$ = CHR$(24)
- ZColorReset$ = CHR$(27) + _
- "[0;37;40m" ' DD062304
- ZConfigFileName$ = "RBBS-PC.DEF"
- ZCarriageReturn$ = CHR$(13)
- ZDeletedMsg$ = CHR$(226)
- ZEndTransmission$ = CHR$(4)
- ZEscape$ = CHR$(27)
- ZExpectActiveModem = 0
- ZFalse = 0
- ' ZF1Key = 59 ' DD062304
- ' ZF10Key = 68 ' DD062304
- ZConfName$ = "MAIN"
- CALL SetHiLite (ZTrue)
- ZHomeConf$ = ""
- ZInConfMenu = -1
- ZLastCommand$ = "M "
- ZLimitMinsPerSession = 0
- ZLineFeed$ = CHR$(10)
- ZLineFeeds = NOT ZFalse
- ZLineEditChk$ = CHR$(9) + _
- ZLineFeed$ + _
- CHR$(11) + _
- CHR$(12) + _
- CHR$(127) + _
- CHR$(8) + _
- ZBellRinger$ + _
- CHR$(26) + _
- CHR$(227)
- ZLineMes$ = SPACE$(78) ' fixed length string workspace
- ZLockStatus$ = "UM UU UB UD"
- ZMenuIndex = 2
- ZNAK$ = CHR$(21)
- ZNoAdvance = ZFalse
- ZPageLength = 23
- ZParseOff = ZFalse
- ZYesPrompt$ = " ([Y],N)" ' DD091202
- ZNoPrompt$ = " (Y,[N])" ' DD091202
- ZPressEnter$ = " (Press [ENTER] to Quit)" ' UG070501
- ZPressEnterExpert$ = " ([ENTER] Quits)" ' UG070501
- ' ZPressEnterNovice$ = ZPressEnter$ ' DD070204
- ZPrivateDoor = ZFalse
- ZRightMargin = 72
- ZReturnLineFeed$ = ZCarriageReturn$ + _
- ZLineFeed$
- ZSmartTable$ = "CS PB NS FN LN SL DT TM TR TE TL RP RR CT " + _
- "C1 C2 C3 C4 C0 DD BD DB UB DL UL FI VY VN " + _
- "TY TN BN ND FS LS CN " + _ ' DD081801/COLR
- "C5 C6 C7 C8 C9 CA CB CC CD CE CF " + _ ' DD081801/COLR
- "G0 G1 G2 G3 G4 G5 G6 G7 SN SO MS CR LT SD " + _ ' DD021401
- "TD ZM DC ZV LD TO TC MA MN ML BP BB CL FB " + _ ' DD040712
- "FK FM DR PW UM PR UC LF NL TK GR HL RB NB " + _ ' DD052302
- "NU AE IC RG NF " ' DD062606
- ZStartOfHeader$ = CHR$(1)
- ZTimeLoggedOn$ = SPACE$(8)
- ZTrue = NOT ZFalse
- ZUpInc = -1
- ZXOff$ = CHR$(19)
- ZXOn$ = CHR$(17)
- ZInterrupOn$ = CHR$(11) + ZCancel$ + ZXOff$ + ZXOn$ + ZCarriageReturn$
- ZOptionEnd$ = ZReturnLineFeed$ + " ,("
- ZCrLf$ = ZCarriageReturn$ + ZLineFeed$
- ZVersionID$ = "17.4a CDor/0811" ' DD081101
- ZWasLG$(1) = "Registration Check Failed"
- ZWasLG$(2) = "Sysop name attempted"
- ZWasLG$(3) = "Locked out attempt"
- ZWasLG$(4) = "Password Attempt Failed"
- ZWasLG$(5) = "Auto Lockout done"
- ZWasLG$(6) = "Name in use on another Node!"
- ZWasLG$(7) = ""
- ZWasLG$(8) = "Locked reason read!"
- ZWasLG$(9) = "Expired Registration"
- CALL GetCommand (ZDebug,ZNetTime$,ZNetBaud$,ZNetReliable$)
- ZSubParm = 1
- CALL ReadDef (ZConfigFileName$)
- REDIM ZWorkAra$(ZMaxWorkVar)
- REDIM ZGSRAra$(ZMaxWorkVar)
- ZUseTPut = (ZUpperCase OR ZXOnXOff)
- ZOrigCallers$ = ZCallersFile$
- ZOrigMsgFile$ = ZMainMsgFile$
- ZOrigUserFile$ = ZMainUserFile$
- ZOrigSysopFN$ = ZSysopFirstName$
- ZOrigSysopLN$ = ZSysopLastName$
- ZPromptBell = ZPromptBellDef
- ZSecretName$ = ZSysopPswd1$ + SPACE$(1) + ZSysopPswd2$ ' DD021301
- ZDropChange = ZFalse ' DD091401/DROP
- IF NOT ZSubBoard THEN _ 'lk 022092 for toss mod
- ZOrigRBBSName$ = ZRBBSName$ 'lk 022092 for toss mod
- ZRIPGraphicsReset$ = "!|*!|0000270P01" ' DD062302
- END SUB
- '
- * REPLACING old line(s) by new
- 112 ' $SUBTITLE: 'SysMenu - sub to display RBBS-PC SYSOP menu'
- ' $PAGE
- '
- ' NAME -- SysMenu
- '
- ' INPUTS -- PARAMETER MEANING
- '
- ' OUTPUTS -- NONE
- '
- ' PURPOSE -- TO DISPLAY RBBS-PC's SYSOP MENU ON THE LOCAL SCREEN
- '
- SUB SysMenu STATIC
- ZLocalUser = ZTrue
- ZSnoop = ZTrue
- ZNonStop = ZTrue
- CALL CheckTime (TIMER, ZDelay!, 1)
- * ------[ first line different ]------
- ' COLOR ZFG,ZBG,ZBorder ' DD070204
- CLS
- ZStopInterrupts = ZTrue
- ZBypassTimeCheck = ZTrue
- CALL BufFile ("MENU0",WasX)
- ZNonStop = ZFalse
- ZBypassTimeCheck = ZFalse
- ZLocalUser = ZFalse
- IF NOT ZOK THEN _
- CALL LPrnt("MENU0 not on default drive",1)
- LOCATE 2,14 ' DD082703/MENU0
- IF ZDOSAnsi THEN _ ' DD090202/MENU0
- CALL LPrnt(ZEscape$ + "[1;37m" + LEFT$(ZVersionID$,13),0) : _ ' DD062304
- ELSE _ ' DD090202/MENU0
- CALL LPrnt(ZEscape$ + "[1;37m" + LEFT$(ZVersionID$,13),0) ' DD062304
- LOCATE 2,33 ' DD082703/MENU0
- CALL LPrnt(ZNodeID$,0)
- LOCATE 2,35 ' DD090901/MENU0
- Temp$ = STR$(ZMaxNodes) ' DD090901/MENU0
- CALL TRIM (Temp$) ' DD090901/MENU0
- CALL LPrnt (Temp$,0) ' DD090901/MENU0
- LOCATE 2,48 ' DD082703/MENU0
- CALL LPrnt(LEFT$(TIME$,5),0) ' DD082703/MENU0
- LOCATE 2,60
- WasX$ = DATE$
- CALL LPrnt(LEFT$(WasX$,6) + RIGHT$(WasX$,2),0)
- LOCATE 2,74
- CALL LPrnt(LEFT$(TIME$,5),0)
- IF ZFMSDirectory$ <> "" THEN _
- LOCATE 6,76 : _
- CALL LPrnt("YES",0)
- IF ZExtendedLogging THEN _
- LOCATE 8,76 : _
- CALL LPrnt("YES",0)
- IF ZFossil THEN _
- LOCATE 10,76 : _
- CALL LPrnt("YES",0)
- LOCATE 12,75 : _
- CALL LPrnt(ZComPort$,0)
- LOCATE 14,75
- CALL LPrnt (STR$(CINT(FRE("A")/1024)) + CHR$(107),0) 'k ' DD021301
- IF ZDebug THEN _
- LOCATE 22,76 : _
- CALL LPrnt("Yes",0)
- CALL GetLastCaller ' DD090901
- LOCATE 17,17 ' DD090901/MENU0
- CALL LPrnt (ZLastCaller$,0) ' DD090901/MENU0
- LOCATE 18,17 ' DD090901/MENU0
- CALL LPrnt (STR$(ZMenuNewCalls),0) ' DD090901/MENU0
- LOCATE 19,17 ' DD090901/MENU0
- CALL LPrnt (STR$(ZMenuNewUsers),0) ' DD090901/MENU0
- LOCATE 20,17 ' DD090901/MENU0
- CALL LPrnt (STR$(ZMenuNewMsgs),0) ' DD090901/MENU0
- LOCATE 21,17 ' DD090901/MENU0
- CALL LPrnt (STR$(ZMenuNewUpld),0) ' DD090901/MENU0
- LOCATE 22,17 ' DD090901/MENU0
- CALL LPrnt (STR$(ZMenuDownloads),0) ' DD090901/MENU0
- LOCATE 18,46 ' DD090901/MENU0
- CALL LPrnt (STR$(ZMenuNewSysop),0) ' DD090901/MENU0
- LOCATE 19,46 ' DD090901/MENU0
- CALL LPrnt (STR$(ZMenuSysopPages),0) ' DD090901/MENU0
- LOCATE 20,46 ' DD090901/MENU0
- CALL LPrnt (STR$(ZMenuDoors),0) ' DD090901/MENU0
- LOCATE 21,46 ' DD090901/MENU0
- CALL LPrnt (STR$(ZMenuCarriers),0) ' DD090901/MENU0
- ZWasZ$ = ZUpldDriveFile$ ' DD090901/MENU0
- CALL FindFree ' DD090901/MENU0
- LOCATE 22,46 ' DD090901/MENU0
- CALL LPrnt (ZFreeSpaceM$,0) ' DD090901/MENU0
- END SUB
- '
- * REPLACING old line(s) by new
- 120 ' $SUBTITLE: 'EditDef - sub to edit config parameters'
- ' $PAGE
- '
- ' NAME -- EditDef
- '
- ' INPUTS -- PARAMETER MEANING
- '
- ' OUTPUTS -- OUTPUT STRING
- '
- ' PURPOSE -- Interpretes and adjusts stored configuration parameters
- '
- SUB EditDef STATIC
- * ------[ first line different ]------
- ZMinsPerSessionDef = ZMinsPerSession ' KG082101
- ZAllOpts$ = ZMainCmds$ + _
- ZFileCmd$ + _
- ZUtilCmds$ + _
- ZLibCmds$ + _
- ZGlobalCmnds$ + _
- ZSysopCmds$
- ZHelpExtension$ = CHR$(46) + _ '. ' DD021301
- ZHelpExtension$
- ZCompressedExt$ = ZDefaultExtension$
- ZWasQ = INSTR(ZDefaultExtension$,CHR$(46)) ' DD021301
- IF ZWasQ > 0 THEN _
- ZDefaultExtension$ = LEFT$(ZDefaultExtension$, ZWasQ-1)
- ZCurDirPath$ = ZDirPath$
- ZTempExpiredSec = ZExpiredSec
- ZBegMain = 1
- ZBegFile = LEN(ZMainCmds$) + ZBegMain
- ZBegUtil = LEN(ZFileCmd$) + ZBegFile
- ZBegLibrary = LEN(ZUtilCmds$) + ZBegUtil
- ZHelp$(3) = ZHelpPath$ + _
- ZHelp$(3)
- ZHelp$(4) = ZHelpPath$ + _
- ZHelp$(4)
- ZHelp$(7) = ZHelpPath$ + _
- ZHelp$(7)
- ZHelp$(9) = ZHelpPath$ + _
- ZHelp$(9)
- CALL BreakFileName (ZWelcomeFile$,ZWelcomeFileDrvPath$,Prefix$,_
- Extension$,ZTrue)
- CALL ASCIICodes (CHR$(91),CHR$(93),ZDefaultLineACK$) ' DD021301
- CALL ASCIICodes (CHR$(91),CHR$(93),ZHostEchoOn$) ' DD021301
- CALL ASCIICodes (CHR$(91),CHR$(93),ZHostEchoOff$) ' DD021301
- CALL ASCIICodes (CHR$(91),CHR$(93),ZEmphasizeOffDef$) ' DD021301
- CALL ASCIICodes (CHR$(91),CHR$(93),ZEmphasizeOnDef$) ' DD021301
- IF ZSubParm = -62 THEN _
- EXIT SUB
- ZLocalUserMode = (RIGHT$(ZComPort$,1) < CHR$(49)) '1 ' DD021301
- ' IF ZLocalUserMode THEN _ ' DD052301
- ' ZRecycleToDos = ZTrue ' DD052301
- ZEchoer$ = ZDefaultEchoer$
- IF LEN(ZScreenOutMsg$) < 2 THEN _
- ZScreenOutMsg$ = ZStartOfHeader$
- ZSmartTextCode$ = CHR$(ZSmartTextCode)
- IF ZMaxWorkVar < 13 THEN _
- ZMaxWorkVar = 13
- '
- ' *** ESTABLISH RBBS-PC'S DOS SUBDIRECTORIES USAGE ***
- '
- IF ZMainFMSDir$ <> "" THEN _
- ZFMSDirectory$ = ZDirPath$ + _
- ZMainFMSDir$ + _
- CHR$(46) + _ ' DD021301
- ZMainDirExtension$ : _
- ZActiveFMSDir$ = ZFMSDirectory$ : _
- ' ZLibDir$ = ZLibDirPath$ + _ ' Mpl090202
- ' ZMainFMSDir$ + _ ' Mpl090202
- ' CHR$(46) + _ ' DD021301
- ' ZLibDirExtension$ ' Mpl090202
- ZUpcatHelp$ = ZHelpPath$ + _
- ZUpcatHelp$ + _
- ZHelpExtension$
- IF ZSubDirCount < 1 THEN _
- GOTO 123
- FOR ZSubDirIndex = 1 TO ZSubDirCount
- INPUT #2,ZSubDir$
- IF RIGHT$(ZSubDir$,1) <> CHR$(92) THEN _ '\ ' DD021301
- ZSubDir$(ZSubDirIndex) = ZSubDir$ + _
- CHR$(92) _ ' DD021301
- ELSE ZSubDir$(ZSubDirIndex) = ZSubDir$
- NEXT
- GOTO 125
- * REPLACING old line(s) by new
- 123 FOR ZSubDirIndex = 1 TO LEN(ZDnldDrives$) - 1
- ZSubDir$(ZSubDirIndex) = MID$(ZDnldDrives$,ZSubDirIndex,1) + _
- * ------[ first line different ]------
- CHR$(58) ': ' DD021301
- NEXT
- ZSubDirCount = LEN(ZDnldDrives$) - 1
- '
- ' ***** SETUP UPLOAD DRIVE AND DIRECTORY.NAME ***
- '
- * REPLACING old line(s) by new
- 125 ZUpldDirCheck$ = ZUpldDir$
- ZSubDirCount = ZSubDirCount + 1
- IF ZUpldToSubdir THEN _
- ZSubDir$(ZSubDirCount) = ZUpldSubdir$ + _
- * ------[ first line different ]------
- CHR$(92) _ ' DD021301
- ELSE ZSubDir$(ZSubDirCount) = RIGHT$(ZDnldDrives$,1) + _
- CHR$(58) ' DD021301
- ZUpldDir$ = ZUpldDir$ + _
- CHR$(46) + _ ' DD021301
- ZMainDirExtension$
- CALL SearchArray (ZSubDir$(ZSubDirCount),ZSubDir$(),ZSubDirCount-1,Found)
- ZCanDnldFromUp = (Found > 0)
- ZUpldDir$ = ZUpldPath$ + _
- ZUpldDir$
- * REPLACING old line(s) by new
- 126 CLOSE #2
- * ------[ first line different ]------
- ' ' DD030301/WILD
- ' ***** CHECK FOR WILDCARD DOWNLOAD SUPPORT *** ' DD030301/WILD
- ' ' DD030301/WILD
- CALL FindIt (LEFT$(ZFastFileList$, _ ' DD030301/WILD
- INSTR(ZFastFileList$, ".") -1) + ".CFG") ' DD030301/WILD
- IF ZOK THEN _ ' DD030301/WILD
- ZWildDownOK = ZTrue _ ' DD030301/WILD
- ELSE _ ' DD030301/WILD
- ZWildDownOK = ZFalse ' DD030301/WILD
- ' IF ZLibDrive$ <> "" THEN _ ' Mpl090202
- ' ZLibType = 1 ' Mpl090202
- ' ZSubParm = -10 ' Mpl090202
- ' CALL Carrier ' Mpl090202
- ' IF ZSubParm = -1 THEN _ ' Mpl090202
- ' IF ZLibDrive$ <> "" THEN _ ' Mpl090202
- ' CALL ChangeDir (ZLibDrive$ + _ ' Mpl090202
- ' CHR$(92)) : _ ' DD021301
- ' CALL KillWork (ZLibWorkDiskPath$ + _ ' Mpl090202
- ' ZLibNodeID$ + _ ' Mpl090202
- ' "DK*.ARC") : _ ' Mpl090202
- ' ZErrCode = 0 ' Mpl090202
- ' ' DD052301
- ' ***** SET DESCRIPTION LENGTH FOR DOWNLOAD INFO IN FMS ' DD052301
- ' ' DD052301
- ZMaxDescLen = ZMaxDescLen - (5 * ZShowTimesDownloaded) ' DD052301
- '
- ' *** INITIALIZE OMNINET INTERFACE IF OMNINET IN USE ***
- '
- * REPLACING old line(s) by new
- 237 LOCATE 18,76
- IF ZDosANSI THEN _
- * ------[ first line different ]------
- CALL LPrnt(ZEscape$ + "[1;37m" + "YES",0) _ ' DD082703/MENU0
- ELSE CALL LPrnt ("YES",0) ' DD082703/MENU0
- ' COLOR ZFG,ZBG,ZBorder ' DD070204
- LOCATE 20,56,0 ' DD082703/MENU0
- '
- '
- ' * GET READY TO ANSWER INCOMMING CALL:
- ' * 1. LET THE MODEM "AUTO-ANSWER" FOR RBBS-PC.
- ' * REQUIRED RINGS = 0 AND S0 = 1 IN MODEM INIT COMMAND.
- ' * 2. ANSWER THE MODEM ON A SPECIFIED NUMBER OF RINGS.
- ' * REQUIRED RINGS > 0 AND S0 = 254 IN MODEM Init COMMAND.
- ' * 3. ANSWER THE MODEM ON A SPECIFIED NUMBER OF RINGS AFTER A USER
- ' * First CALLS AND THEN HANGS UP (I.E. RING-BACK).
- ' * REQUIRED RINGS > 0 AND S0 = 255 IN MODEM INIT COMMAND.
- '
- '
- WasQQ = 255
- WasI = INSTR(ZModemInitCmd$,"S0")
- IF WasI = 0 THEN _
- GOTO 239
- IF VAL(MID$(ZModemInitCmd$,WasI + 3,3)) = 255 THEN _
- WasQQ = 0 : _
- ZBlk = WasQQ
- ZSecsUsedSession! = TIMER
- ZSubParm = 1
- CALL Line25
- RingAnswer = ZTrue
- IF RingBack THEN _
- RingAnswer = ZFalse
- * REPLACING old line(s) by new
- 239 RingBackWaitStart! = 0
- IF RingBack THEN _
- RingBackWaitStart! = TIMER : _
- * ------[ first line different ]------
- COLOR 7,0,0 ' DD070204
- ' ELSE COLOR ZFG,ZBG,ZBorder ' DD070204
- * REPLACING old line(s) by new
- 265 CALL CheckTime(ZSecsUsedSession!, TempElapsed!, 2)
- * ------[ first line different ]------
- ' IF TempElapsed! > 120 AND NOT ScreenCleared THEN _ ' DD082703/MENU0
- ' LOCATE ,,0 : _ ' DD082703/MENU0
- ' CLS : _ ' DD082703/MENU0
- ' ZWasCL = 1 : _ ' DD082703/MENU0
- ' ScreenCleared = ZTrue : _ ' DD082703/MENU0
- ' ZSecsUsedSession! = TIMER ' DD082703/MENU0
- IF ZTimeToDropToDos! > 0 THEN _
- IF ZOldDate$ <> DATE$ THEN _
- IF TIMER => ZTimeToDropToDos! AND _
- TIMER < 86340 THEN _ ' Skip btw 23:59 and 00:00
- ZSubParm = 7 : _
- EXIT SUB
- * REPLACING old line(s) by new
- 270 IF ZRecycleWait > 0 THEN _
- CALL CheckTime(InactiveDelay!, TempElapsed!, 1) : _
- IF TempElapsed! <= 0 THEN _
- ZSubParm = 8 : _
- EXIT SUB
- CALL FlushCom (WasX$)
- IF LEN(WasX$) > 0 THEN _
- ModemResponse$ = ModemResponse$ + WasX$ : _
- RingDetected = (INSTR(ModemResponse$,"RING") > 0) : _
- ConnectDetected = (INSTR(ModemResponse$,"ONNECT") > 0) : _
- NoCall = (NOT RingDetected) AND (NOT ConnectDetected)
- IF RingDetected AND ZRequiredRings > 0 THEN _
- * ------[ first line different ]------
- MID$(ModemResponse$, INSTR(ModemResponse$,"RING")+1,1) = CHR$(65) : _ ' DD021301
- RingDetected = ZFalse : _
- GOTO 276
- CALL GoIdle
- LOCATE 2,60,0 ' DD082703/MENU0
- WasX$ = DATE$ ' DD082703/MENU0
- CALL LPrnt(CHR$(27) + "[1;37m" + LEFT$(WasX$,6) + RIGHT$(WasX$,2),0) ' DD021301/MENU0
- LOCATE 2,74,0 ' DD082703/MENU0
- CALL LPrnt(CHR$(27) + "[1;37m" + LEFT$(TIME$,5),0) ' DD021301/MENU0
- ' COLOR ZFG,ZBG,ZBorder ' DD070204
- LOCATE 20,56,0 ' DD082703/MENU0
- GOTO 247
- * REPLACING old line(s) by new
- * ------[ first line different ]------
- 292 IF INSTR(WasX$,CHR$(48)) < 1 THEN _ '0 ' DD021301
- GOTO 293
- WasX$ = MID$(WasX$,INSTR(WasX$,CHR$(48)),4) ' DD021301
- * REPLACING old line(s) by new
- * ------[ first line different ]------
- 675 ZOutTxt$ = ZFG7$ + "Enter Password" ' DD082704
- ZHidden = ZTrue
- CALL PopCmdStack
- IF ZSubParm < 0 THEN _
- ZPswdFailed = ZTrue : _
- EXIT SUB
- ZHidden = ZFalse
- ZWasZ$ = ZUserIn$
- ZOldPassword$ = ZUserIn$ ' DD091501/PSWD
- * REPLACING old line(s) by new
- * ------[ first line different ]------
- 680 CALL SkipLine (1) ' DD031302
- CALL QuickTPut1 (ZFGE$ + ZBG4$ + _ ' DD031302
- "Wrong password!" + ZFG7$ + ZBG0$) ' DD082702
- ZLastIndex = 0
- IF NOT ZMsgPswd THEN _
- CALL UpdtCalr (ZActiveUserName$+" PW fail: " + ZWasZ$,1)
- GOTO 670
- END SUB
- * REPLACING old line(s) by new
- 949 ZLine25$ = "Node " + _
- * ------[ first line different ]------
- ZNodeID$ + SPACE$(1) + _ ' DD021301
- ZPageStatus$ + SPACE$(1) + _ ' DD021301
- MID$("AVL ",1, -4 * ZSysopAvail) + _
- MID$("ANY ",1, -4 * ZSysopAnnoy) + _
- MID$("LPT ",1, -4 * ZPrinter) + _
- MID$("SYS ",1, -4 * ZSysopNext) + _
- MID$("XOFF ",1,-5 * ZXOffEd) + _
- MID$("CTS ",1,-4 * ZNotCTS)
- '
- '
- ' * LINE 25 UPDATE ROUTINE
- '
- '
- * REPLACING old line(s) by new
- 950 IF NOT ZSnoop THEN _
- EXIT SUB
- ZCursorLine = CSRLIN
- ZCursorRow = POS(0)
- * ------[ first line different ]------
- IF ZOrigUserName$ = "" THEN _ ' DD020901
- Name$ = ZActiveUserName$ _ ' DD020901
- ELSE _ ' DD020901
- Name$ = ZOrigUserName$ ' DD020901
- ZWasHH = LEN(Name$) + _ ' DD020901
- LEN(ZWasCI$) + _
- LEN(ZLine25$) + _
- LEN(STR$(ZUserSecLevel))+ _
- LEN(STR$(INT(MinsRemaining))) + 2 'Pe 05/29/91
- LOCATE ZLocalPageLength,1 ' DD021903/VGA
- IF ZNetworkType = 0 THEN _
- ZLockStatus$ = SPACE$(2) + _ 'Pe 05/29/91
- LEFT$(ZTimeLoggedOn$,5) 'Pe 05/29/91
- IF ZWasHH > 63 THEN _
- ZWasHH = 0 _
- ELSE _
- ZWasHH = 64 - ZWasHH
- ZLine25Hold$ = ZLine25$ + _
- SPACE$(ZWasHH) + _
- STR$(ZUserSecLevel) + _
- SPACE$(1) + _ ' DD021301
- Name$ + _ ' DD020901
- SPACE$(1) + _ ' DD021301
- ZWasCI$ + _
- SPACE$(1) + _ ' DD021301
- STR$(INT(MinsRemaining)) + _ 'Dgs-008
- SPACE$(1) + _ ' DD021301
- ZLockStatus$
- ZLine25Hold$ = LEFT$(ZLine25Hold$, 66) + SPACE$(1) + ZLockStatus$' DD021301
- IF ZDosANSI THEN _
- ZLine25Hold$ = ZEmphasizeOnDef$ + ZLine25Hold$ + _ ' DD071003
- + ZEscape$ + "[K" + ZEscape$ + ZEmphasizeOffDef$ ' DD071003
- CALL LPrnt(ZLine25Hold$,0)
- LOCATE ZCursorLine,ZCursorRow
- END SUB
- * REPLACING old line(s) by new
- 1240 IF LEN(ZWasZ$) < 1 THEN _
- WhereFound = 0 : _
- EXIT SUB
- CALL Trim (ZWasZ$)
- CALL AllCaps (ZWasZ$)
- ZWasY$ = LEFT$(ZWasZ$,1)
- WhereFound = INSTR(StartPos,ZAllOpts$,ZWasY$)
- IF WhereFound = 0 THEN _ 'Not found: decide whether to hunt further
- IF StartPos < 2 OR ZRestrictValidCmds THEN _
- GOTO 1242 _ ' fully searched or restricted
- ELSE WhereFound = INSTR(1,ZAllOpts$,ZWasY$) : _ 'hunt further
- GOTO 1242
- * ------[ first line different ]------
- IF WhereFound => ZBegLibrary THEN _ 'commented out if zlibtype ' DD071001
- IF WhereFound < LEN(ZAllOpts$) - 11 THEN _ ' DD071001
- WhereFound = INSTR(WhereFound+1,AllOpt$,ZWasY$) : _ ' DD071001
- IF WhereFound = 0 THEN _ ' DD071001
- WhereFound = INSTR(1,ZAllOpts$,ZWasY$) : _ ' DD071001
- IF WhereFound >= ZBegLibrary OR WhereFound = 0 THEN _ ' DD071001
- WhereFound = 0 : _ ' DD071001
- GOTO 1242 ' DD071001
- IF NOT ZRestrictValidCmds THEN _
- GOTO 1242 ' everything found valid
- '
- '
- ' * RESTRICT COMMANDS TO SUBSYSTEMS (EXCEPT GLOBAL AND SYSOP)
- '
- '
- IF WhereFound > LEN(ZAllOpts$) - 12 THEN _ ' DD020602/SFILE
- IF ZUserSecLevel < ZOptSec(WhereFound) THEN _
- WhereFound = 0 : _
- EXIT SUB _
- ELSE GOTO 1242
- IF MID$(ZOrigCommands$,WhereFound,1) = CHR$(71) THEN _ 'G ' DD021301
- GOTO 1242 ' ACCEPT GOODBYE/GRAPHICS
- IF (WhereFound < StartPos) OR _
- (StartPos < ZBegFile AND WhereFound => ZBegFile ) OR _
- (StartPos < ZBegUtil AND WhereFound => ZBegUtil ) OR _
- (StartPos < ZBegLibrary AND WhereFound => ZBegLibrary ) THEN _
- WhereFound = 0 ' REJECT: NOT IN Section
- * REPLACING old line(s) by new
- 1320 ' $SUBTITLE: 'CheckMacro - sub to check if macro exists & process'
- ' $PAGE
- '
- ' NAME -- CheckMacro
- '
- ' INPUTS -- PARAMETER MEANING
- ' Strng$ STRING TO CHECK IF IS A MACRO
- ' ZMacroDrvPath$ DRIVE/PATH WHERE MACROS ARE
- ' ZMacroExtension$ EXTENSION WasOF MACROS
- ' MACRO.OFF FORCE NO MACRO TO BE Found
- '
- ' OUTPUTS -- MacroFound WHETHER A MACRO WAS Found
- ' Strng$ SUBSTITUTE FOR COMMANDS
- ' ZCommPortStack$ REST OF MACRO
- ' 0 IF NOT Found
- '
- ' PURPOSE -- Macro file is checked for security (1st line).
- ' 2nd line is substituted for passed string
- ' and parsed. Remaining part of macro put into
- ' stack to be executed.
- '
- SUB CheckMacro (Strng$,MacroFound) STATIC
- MacroFound = ZFalse
- * ------[ first line different ]------
- IF ZMacroExtension$ = "" OR INSTR(Strng$,CHR$(46)) > 0 THEN _ ' DD021301
- EXIT SUB
- IF LEN(Strng$) < ZMacroMin THEN _
- ZMacroMin = 1 : _
- EXIT SUB
- IF LEN(Strng$) = 1 THEN _
- Temp$ = Strng$ : _
- CALL AllCaps (Temp$) : _
- IF INSTR(ZAllOpts$,Temp$) > 0 THEN _
- EXIT SUB
- CALL Macro (Strng$,MacroFound)
- END SUB
- * REPLACING old line(s) by new
- 1325 ' $SUBTITLE: 'Macro - check if macro exists & process'
- ' $PAGE
- '
- ' NAME -- Macro
- '
- ' INPUTS -- PARAMETER MEANING
- ' Strng$ STRING TO CHECK IF IS A MACRO
- ' ZMacroDrvPath$ DRIVE/PATH WHERE MACROS ARE
- ' ZMacroExtension$ EXTENSION OF MACROS
- ' MACRO.OFF FORCE NO MACRO TO BE Found
- '
- ' OUTPUTS -- MacroFound WHETHER A MACRO WAS Found
- ' Strng$ SUBSTITUTE FOR COMMANDS
- ' ZCommPortStack$ REST OF MACRO
- ' 0 IF NOT Found
- '
- ' PURPOSE -- Executes a macro if found. Does not check if macro
- ' letter uses a command.
- SUB Macro (Strng$,MacroFound) STATIC
- MacroFound = ZFalse
- FilName$ = Strng$
- CALL BreakFileName (FilName$,ZWasDF$,Prefix$,WasX$,ZFalse)
- IF WasX$ = "" THEN _
- FilName$ = Strng$ + ZMacroExtension$
- IF ZWasDF$ = "" THEN _
- FilName$ = ZMacroDrvPath$ + FilName$
- CALL BadFile (FilName$,ZWasA)
- IF ZWasA > 1 THEN _
- EXIT SUB
- CALL GRAPHICX (FilName$,6)
- IF NOT ZOK THEN _
- EXIT SUB
- CALL ReadDir (6,1)
- IF ZErrCode > 0 THEN _
- EXIT SUB
- CALL CheckInt (ZOutTxt$)
- IF ZErrCode > 0 OR ZUserSecLevel < ZTestedIntValue THEN _
- EXIT SUB
- * ------[ first line different ]------
- ZWasA = INSTR(ZOutTxt$,CHR$(47)) '/ ' DD021301
- IF ZWasA > 0 THEN _ ' Check macro contraint
- WasX$ = RIGHT$(ZOutTxt$,LEN(ZOutTxt$)-ZWasA) : _
- IF RIGHT$(WasX$,1) = CHR$(47) THEN _ ' DD021301
- IF ZLastCommand$ <> LEFT$(WasX$,LEN(WasX$)-1) THEN _
- EXIT SUB _
- ELSE GOTO 1327 _
- ELSE IF LEFT$(ZLastCommand$,LEN(WasX$)) <> WasX$ THEN _
- EXIT SUB
- * REPLACING old line(s) by new
- 1331 IF SotMenu THEN _
- ZFileName$ = HelpMenu$ : _
- GOSUB 1350 : _
- SotMenu = ZFalse
- ZAnsIndex = 1
- * ------[ first line different ]------
- ZOutTxt$ = ZFGB$ + "Display Help for What Command? " + _ ' DD121501
- ZFGE$ + CHR$(40) + ZFGF$ + ZBG1$ + "HELP" + ZBG0$ + _ ' DD021301
- " for Menu" + ZFGE$ + CHR$(41) + ZEmphasizeOff$ + _ ' DD021301
- ZPressEnterExpert$ ' DD121501
- ZSubParm = 1
- CALL TGet
- IF ZSubParm = -1 THEN _
- EXIT SUB
- IF ZWasQ = 0 THEN _
- EXIT SUB
- ZLastIndex = ZWasQ
- * REPLACING old line(s) by new
- 1332 ZWasZ$ = ZUserIn$(ZAnsIndex)
- CALL AllCaps (ZWasZ$)
- * ------[ first line different ]------
- IF ZWasZ$ = CHR$(63) THEN _ '? ' DD021301
- ZWasZ$ = CHR$(72) 'H ' DD021301
- CALL BadFile (ZWasZ$,BadFileNameIndex)
- ON BadFileNameIndex GOTO 1333,1340,1340
- * REPLACING old line(s) by new
- * ------[ first line different ]------
- 1336 IF NOT ZOK THEN ' DD070901
- ZOutTxt$ = "No help for " + _ ' DD070901
- ZWasZ$ ' DD070901
- CALL QuickTPut1 (ZOutTxt$) ' DD070901
- CALL UpdtCalr (ZOutTxt$,2) ' DD070901
- CALL SmartPause ' BK070193
- END IF ' DD070901
- ZAnsIndex = ZAnsIndex + 1
- IF ZAnsIndex <= ZLastIndex THEN _
- GOTO 1332
- IF FastHelp THEN _
- FastHelp = ZFalse : _
- EXIT SUB
- GOTO 1331
- * REPLACING old line(s) by new
- 1380 ' $SUBTITLE: 'VIOLATION - handles all security violations'
- ' $PAGE
- '
- ' NAME -- SecViolation
- '
- ' INPUTS -- PARAMETER MEANING
- '
- ' OUTPUTS -- ZCursorLine CURRENT LINE ON SCREEN
- ' ZCursorRow CURRENT ROW ON ZCursorLine
- '
- ' PURPOSE -- Inform caller of security violation, augment count of
- ' violations and determine whether too many occurred.
- '
- SUB SecViolation STATIC
- CALL FlushKeys
- CALL BufFile (ZSecVioHelp$,WasX)
- * ------[ first line different ]------
- IF NOT ZOK THEN ' DD070902
- CALL QuickTPut1 (ZFGE$ + ZBG4$ + "Sorry, " + ZFirstName$ + _ ' DD090602
- ", action not permitted" + ZEmphasizeOff$) ' DD090602
- CALL SmartPause ' BK070193
- END IF ' DD070901
- CALL UpdtCalr ("SV!-" + ZViolation$,2)
- ZLastIndex = 0
- ' CALL Muzak (3) ' DD062502
- ZViolationsThisSession = ZViolationsThisSession + 1
- IF ZMaxViolations = 0 OR ZViolationsThisSession <= ZMaxViolations THEN _
- EXIT SUB
- * REPLACING old line(s) by new
- 1385 IF ZUserFileIndex < 1 THEN _
- EXIT SUB
- * ------[ first line different ]------
- ZOutTxt$ = ZFGE$ + ZBG4$ + _ ' DD090602
- "Security Violation! Sysop can reinstate you." + _ ' DD090602
- ZEmphasizeOff$ ' DD080301
- IF ZUserSecLevel <= ZMinLogonSec THEN _
- ZOutTxt$ = "" : _
- ZUserSecLevel = ZUserSecLevel - 1 _
- ELSE ZUserSecLevel = ZMinLogonSec
- ZDenyAccess = ZTrue
- END SUB
- * REPLACING old line(s) by new
- 1437 IF ZUpperCase THEN _
- * ------[ first line different ]------
- IF ZWasGR < 2 THEN _ ' DD040201
- CALL AllCaps (ZOutTxt$)
- CALL PutCom (ZOutTxt$)
- * REPLACING old line(s) by new
- 1480 ' $SUBTITLE: 'LPrnt - subroutine to write to display'
- ' $PAGE
- '
- ' NAME -- LPrnt
- '
- ' INPUTS -- PARAMETER MEANING
- ' Strng$ STRING TO WRITE OUT
- ' NumReturns NUMBER OF CARRIAGE RETURNS
- '
- ' OUTPUTS -- NONE
- '
- ' PURPOSE -- Subroutine to write to the display.
- '
- SUB LPrnt (Strng$,NumReturns) STATIC
- IF NOT ZSnoop THEN _
- EXIT SUB
- CALL PScrn (Strng$)
- * ------[ first line different ]------
- ' IF ZVoiceType <> 0 AND ZTalkAll THEN _ ' DD060401
- ' CALL Talk (65,Strng$) ' DD060401
- FOR WasI = 1 TO NumReturns ' DD050701/VGA
- LOCATE ,,1 ' DD050701/VGA
- IF ZLocalPageLength = 50 THEN ' DD050701/VGA
- CALL VGAANSI(ZCrLf$,ZWasCL,ZWasCC) ' DD050701/VGA
- ELSEIF ZLocalPageLength = 43 THEN ' DD050701/VGA
- CALL EGAANSI(ZCrLf$,ZWasCL,ZWasCC) ' DD050701/VGA
- ELSE ' DD050701/VGA
- CALL ANSI(ZCrLf$,ZWasCL,ZWasCC) ' DD050701/VGA
- END IF ' DD050701/VGA
- LOCATE ZWasCL,ZWasCC ' DD050701/VGA
- NEXT ' DD050701/VGA
- END SUB
- * REPLACING old line(s) by new
- 1483 ' $SUBTITLE: 'PScrn - subroutine to print to the screen'
- ' $PAGE
- '
- ' NAME -- PScrn
- '
- ' INPUTS -- PARAMETER MEANING
- ' Strng$ STRING TO WRITE OUT
- '
- ' OUTPUTS -- NONE
- '
- ' PURPOSE -- Writes to local screen regardless of whether you have
- ' carrier. Assumes have positioned cursor where you want.
- '
- SUB PScrn (Strng$) STATIC
- IF Strng$ = "" THEN _
- EXIT SUB
- * ------[ first line different ]------
- IF ZLocalPageLength = 50 THEN ' DD050701/VGA
- CALL VGAANSI (Strng$,ZWasCL,ZWasCC) ' DD050701/VGA
- ELSEIF ZLocalPageLength = 43 THEN ' DD050701/VGA
- CALL EGAANSI (Strng$,ZWasCL,ZWasCC) ' DD050701/VGA
- ELSE ' DD050701/VGA
- CALL ANSI (Strng$,ZWasCL,ZWasCC) ' DD050701/VGA
- END IF ' DD050701/VGA
- LOCATE ZWasCL,ZWasCC
- END SUB
- * REPLACING old line(s) by new
- 1485 ' $SUBTITLE: 'SkipLine - sub to write a blank line to user'
- ' $PAGE
- '
- ' NAME -- SkipLine
- '
- ' INPUTS -- PARAMETER MEANING
- ' ZLocalUser
- ' ZModemStatusReg
- ' NumReturns
- ' ZReturnLineFeed$
- ' ZSnoop
- '
- ' OUTPUTS -- NONE
- '
- ' PURPOSE -- Skip lines on the user's terminal
- '
- SUB SkipLine (NumReturns) STATIC
- FOR WasI=1 TO NumReturns
- CALL PutCom (ZReturnLineFeed$)
- NEXT
- IF NOT ZSnoop THEN _
- GOTO 1486
- * ------[ first line different ]------
- FOR WasI = 1 TO NumReturns ' DD050701/VGA
- LOCATE ,,1 ' DD050701/VGA
- IF ZLocalPageLength = 50 THEN ' DD050701/VGA
- CALL VGAANSI(ZCrLf$,ZWasCL,ZWasCC) ' DD050701/VGA
- ELSEIF ZLocalPageLength = 43 THEN ' DD050701/VGA
- CALL EGAANSI(ZCrLf$,ZWasCL,ZWasCC) ' DD050701/VGA
- ELSE ' DD050701/VGA
- CALL ANSI(ZCrLf$,ZWasCL,ZWasCC) ' DD050701/VGA
- END IF ' DD050701/VGA
- LOCATE ZWasCL,ZWasCC ' DD050701/VGA
- NEXT
- * REPLACING old line(s) by new
- 1500 CALL Carrier
- IF ZSubParm = -1 THEN _
- EXIT SUB
- ZLinesPrinted = 0
- ZDisplayAsUnit = ZFalse
- InStack = ZFalse
- GOSUB 1580
- ZWasA = 0
- ZWasB = 0
- ZWasC = 0
- ZWasQ = 1
- ZStoreParseAt = 1
- ZYes = ZFalse
- ZUserIn$ = ""
- SleepWarn = ZTrue
- ZNo = ZFalse
- ZNonStop = (ZPageLength < 1)
- IF ZOutTxt$ = "" THEN _
- GOTO 1525
- IF ZHidden THEN _
- * ------[ first line different ]------
- ZOutTxt$ = ZOutTxt$ + " (*'s echo)" ' DD022702
- IF (NOT ZVerifying) OR HoldA$ = "" THEN _
- CALL ColorPrompt (ZOutTxt$) : _
- ZOutTxt$ = ZOutTxt$ + _
- MID$("? ! ",2*ZTurboKey+1,2) : _
- HoldA$ = ZOutTxt$ _
- ELSE ZOutTxt$ = HoldA$
- ZSubParm = 4
- StopSave = ZStopInterrupts
- ZStopInterrupts = ZTrue
- CALL TPut
- ZStopInterrupts = StopSave
- IF ZSubParm = -1 OR ZFunctionKey <> 0 THEN _
- EXIT SUB
- * REPLACING old line(s) by new
- 1534 ZUserIn$ = ZOutTxt$ ' Not Macro command - pass to normal processing
- * ------[ first line different ]------
- ' * strip off leading slash when not in turbokey mode so macros can be
- ' * written to work in both turbo and non-turbo-key mode
- IF LEFT$(ZUserIn$,1) = CHR$(47) THEN IF NOT ZTurboKeyUser THEN _ ' DD021301
- ZUserIn$ = RIGHT$(ZUserIn$,LEN(ZUserIn$)-1) : _ ' KG092301
- ZTurboKey = ZFalse ' KG092301
- IF ZMacroEcho THEN _
- ZSubParm = 4 : _
- CALL TPut
- WasX$ = ZCarriageReturn$
- GOTO 1547
- * REPLACING old line(s) by new
- 1537 CALL CheckTime(ZAutoLogoff!, TempElapsed!, 3)
- IF TempElapsed! < 30 THEN _
- IF TempElapsed! <= 0 THEN _
- CALL SkipLine (1) : _
- ZSubParm = -1 : _
- ZNo = ZTrue : _
- ZRet = ZTrue : _
- ZSleepDisconnect = NOT ZAutoLogoffReq : _
- * ------[ first line different ]------
- IF ZAutoLogoffReq OR (ZAutoEnd = 1 AND ZDnldCompleted) THEN _' DD010204
- CALL UpdtCalr ("Auto-logoff",1) : _ ' DD010204
- EXIT SUB _
- ELSE CALL UpdtCalr ("Sleep disconnect",1) : _
- EXIT SUB _
- ELSE IF SleepWarn THEN _
- SleepWarn = ZFalse : _
- Temp! = TempElapsed! : _
- CALL SkipLine (2) : _ ' DD090801
- CALL QuickTPut (ZFGF$ + ZBG2$ + _ ' DD090801
- "Auto-Logoff Counter Active!" + _ ' DD090801
- ZBG0$,0) : _ ' DD090801
- ZOutTxt$ = "" : _ ' DD090801
- CALL RingCaller : _
- CALL QuickTput (ZFGF$ + "Press " + ZFGE$ + _ ' DD090801
- ZBG1$ + " ENTER " + ZFGF$ + _ ' DD090801
- ZBG0$ + " to Abort! " + _ ' DD090801
- ZEmphasizeOff$,0) _ ' DD090801
- ELSE IF Temp! - TempElapsed! > 1.0 THEN _
- CALL QuickTPut (ZBackSpace$+ZBackSpace$,0) : _
- CALL QuickTPut (ZFGE$ + ZBG4$ + _ ' DD090801
- RIGHT$(STR$(CINT(TempElapsed!)),2) + _' DD090801
- ZFG7$ + ZBG0$,0) : _ ' DD090801
- Temp! = TempElapsed!
- CALL FindFKey
- IF ZSubParm < 0 THEN _
- EXIT SUB
- * REPLACING old line(s) by new
- 1542 IF ZWasY$ = "" THEN _
- * ------[ first line different ]------
- ZWasY$ = SPACE$(1) ' DD021301
- IF ASC(ZWasY$) = 141 THEN _
- OUT ZLineCntlReg,&H1A : _
- ZEightBit = ZFalse : _
- ZTestParity = ZFalse : _
- ZWasGR = ZFalse
- ZWasY$ = CHR$(ASC(ZWasY$) AND 127)
- * REPLACING old line(s) by new
- 1545 WasX$ = ZWasY$
- ZAutoLogoffReq = ZFalse
- IF INSTR(ZLineEditChk$,ZWasY$) > 5 _
- GOTO 1635
- * ------[ first line different ]------
- IF ZWasY$ < SPACE$(1) AND ZWasY$ <> ZCarriageReturn$ THEN _ ' DD021301
- GOTO 1525
- IF ZWasY$ = CHR$(94) THEN _ '^ ' DD021301
- GOTO 1525
- IF ZWasY$ = ZCarriageReturn$ THEN _
- GOTO 1547 _
- ELSE GOSUB 1550
- IF ZTurboKey < 1 THEN _
- GOTO 1546
- IF ZWasY$ = SPACE$(1) THEN _ ' DD021301
- ZWasY$ = ""
- IF ZWasY$ <> CHR$(47) THEN _ '/ ' DD021301
- ZUserIn$ = ZWasY$ : _
- ZWasY$ = ZCarriageReturn$ : _
- WasX$ = ZWasY$ : _
- GOTO 1547
- ZTurboKey = 0
- GOTO 1525
- * REPLACING old line(s) by new
- * ------[ first line different ]------
- 1549 IF INSTR(ZUserIn$,CHR$(59)) > 0 THEN _ '; ' DD021301
- CALL ExcludeCount (CHR$(59),ZUserIn$,Temp) _ ' DD021301
- ELSE IF INSTR(ZUserIn$,SPACE$(1)) > 0 THEN _ ' DD021301
- CALL ExcludeCount (SPACE$(1),ZUserIn$,Temp) _ ' DD021301
- ELSE Temp = 0
- RETURN
- * REPLACING old line(s) by new
- 1550 IF ZLogonActive THEN _
- GOSUB 1549 : _
- ZHidden = (Temp = 2 - (ZLenIndiv > 0 AND ZStartIndiv > 0))
- IF ZHidden THEN _
- * ------[ first line different ]------
- IF (WasX$ <> SPACE$(1) AND WasX$ <> CHR$(59)) THEN _ ' DD021301
- WasX$ = CHR$(42) ' DD022702
- CALL LPrnt(WasX$,0)
- GOTO 1551 ' Mpl090202
- IF ZHidden AND (WasX$ <> SPACE$(1)) THEN _ ' DD021301
- WasX$ = CHR$(42) ' DD022702
- CALL LPrnt(WasX$,0) ' Mpl090202
- * REPLACING old line(s) by new
- 1551 IF NOT SendRemote THEN _
- RETURN
- * ------[ first line different ]------
- IF ZHidden AND (WasX$ <> SPACE$(1)) THEN _ ' DD021301
- WasX$ = CHR$(42) ' DD022702
- * REPLACING old line(s) by new
- 1575 IF LEN(ZUserIn$) > 4000 THEN _
- * ------[ first line different ]------
- ZOutTxt$ = "TOO LONG! Try again, " + _ ' DD022701
- ZFirstName$ + CHR$(46) : _ ' DD021301
- ZSubParm = 5 : _
- CALL TPut : _
- IF ZSubParm = -1 OR ZFunctionKey <> 0 THEN _
- EXIT SUB _
- ELSE GOTO 1500
- IF ZParseOff THEN _
- ZParseOff = ZFalse : _
- GOTO 1620
- CALL ParseIt
- IF ZWasQ = 1 THEN _
- GOTO 1622
- GOTO 1625
- * REPLACING old line(s) by new
- 1580 ZAutoLogoff! = TIMER + ZWaitBeforeDisconnect
- IF ZAutoLogoffReq OR ZWaitExpired THEN _
- ZWaitExpired = ZFalse : _
- IF NOT ZSuspendAutologoff THEN _
- * ------[ first line different ]------
- ZAutoLogoff! = TIMER + 15 'Pe 10/20/91
- RETURN
- * REPLACING old line(s) by new
- 1625 IF LEN(ZUserIn$) < 4 THEN _
- WasX$ = LEFT$(ZUserIn$,3): _
- CALL AllCaps (WasX$) : _
- ZYes = (INSTR("YES",WasX$) = 1) : _
- * ------[ first line different ]------
- ZNo = (INSTR("NO",WasX$) = 1 OR WasX$ = CHR$(65) OR WasX$ = CHR$(81)) : _ ' DD021301
- ZReply = (WasX$ = "RE") OR ZReply : _
- ZKillMessage = (WasX$ = CHR$(75)) OR ZKillMessage 'K ' DD021301
- ZHidden = ZFalse
- * REPLACING old line(s) by new
- 1628 CALL VerifyAns
- IF NOT ZOK THEN _
- * ------[ first line different ]------
- CALL QuickTPut1 ("Invalid answer <" + ZUserIn$(1) + CHR$(62)) : _ ' DD021301
- GOTO 1500
- HoldA$ = ""
- ZForceKeyboard = ZFalse
- IF ZMacroSave > 0 THEN _
- ZGSRAra$(ZMacroSave) = ZUserIn$ : _
- ZMacroSave = 0 : _
- GOTO 1632
- IF (ZDistantTGet > 0) OR (ZMacroTemplate$ <> "") THEN _
- CALL WipeLine (38) : _
- IF NOT ZNo THEN _
- GOTO 1632 _
- ELSE ZWasQ = 0 : _
- ZMacroTemplate$ = "" : _
- ZDistantTGet = 0 : _
- ZNo = ZFalse : _
- GOTO 1633
- IF ZMacroActive THEN _
- ZLastIndex = ZWasQ : _
- FirstIndex = 1: _
- ZMacroActive = NOT EOF(6) : _
- EXIT SUB
- IF ZAnsIndex > 255 OR ((NOT InStack) AND INSTR(ZUserIn$,CHR$(46)) > 0) THEN _ ' DD021301
- EXIT SUB
- IF MacroIndex OR ZSubParm < 3 THEN _
- MacroIndex = 1 _
- ELSE MacroIndex = ZAnsIndex
- CALL NoPath (ZUserIn$(MacroIndex),Found)
- IF Found THEN _
- EXIT SUB
- CALL CheckMacro (ZUserIn$(MacroIndex),Found)
- IF Found THEN _
- ZStoreParseAt = ZAnsIndex : _
- GOTO 1525
- EXIT SUB
- * REPLACING old line(s) by new
- 1637 ' $SUBTITLE: 'ParseIt - subroutine to parse a string'
- ' $PAGE
- '
- ' NAME -- ParseIt
- '
- ' INPUTS -- PARAMETER MEANING
- ' ZUserIn$ STRING TO PARSE
- ' ZSemiOnly Only parse using semi-colon
- '
- ' OUTPUTS -- ZWasQ NUMBER PARSED
- ' ZUserIn$() PARSED STRINGS
- '
- ' PURPOSE -- To parse a string into pieces. Uses semicolon
- ' if exists, otherwise space, otherwise comma
- '
- SUB ParseIt STATIC
- * ------[ first line different ]------
- ZWasA = INSTR(ZUserIn$,CHR$(59)) '; ' DD021301
- IF ZWasA > 0 THEN _
- ParseChar$ = CHR$(59) _ ' DD021301
- ELSE IF ZSemiOnly THEN _
- ZSemiOnly = ZFalse : _
- GOTO 1638 _
- ELSE IF ZUserIn$ <> SPACE$(LEN(ZUserIn$)) THEN _
- CALL Trim (ZUserIn$) : _
- WasX$ = ZUserIn$ : _
- ZWasA = INSTR(ZUserIn$,SPACE$(2)) : _ ' DD021301
- WHILE ZWasA > 0 : _
- ZUserIn$ = LEFT$(ZUserIn$,ZWasA - 1) + _
- MID$(ZUserIn$,ZWasA + 1) : _
- ZWasA = INSTR(ZWasA,ZUserIn$,SPACE$(2)) : _ ' DD021301
- WEND : _
- ZWasA = INSTR(ZUserIn$,SPACE$(1)) : _ ' DD021301
- IF ZWasA > 1 THEN _
- ParseChar$ = SPACE$(1) _ ' DD021301
- ELSE ZWasA = INSTR(ZUserIn$,CHR$(44)) : _ ', ' DD021301
- ParseChar$ = CHR$(44) ' DD021301
- IF ZWasA > 1 THEN _
- GOTO 1639
- * REPLACING old line(s) by new
- 1638 ZWasDF$ = ZUserIn$
- CALL AllCaps (ZWasDF$)
- IF ZWasDF$ = "NS" THEN _
- * ------[ first line different ]------
- ZUserIn$ = CHR$(67) : _ 'C ' DD021301
- ZNonStop = ZTrue
- ZUserIn$(ZStoreParseAt) = ZUserIn$
- ZNonStop = ZNonStop OR (ZWasDF$ = CHR$(67) AND NOT ZStackC) ' DD021301
- IF ZAutoEnd = 3 THEN _ 'Pe 10/20/91
- ZNonStop = ZFalse 'Pe 10/20/91
- GOTO 1642
- * REPLACING old line(s) by new
- 1640 ZWasB = INSTR(ZWasA,ZUserIn$,ParseChar$)
- ZWasC = ZWasB-ZWasA
- IF ZWasC < 1 THEN _
- ZEOL = ZTrue : _
- ZWasC = 128
- ZWasDF$ = MID$(ZUserIn$,ZWasA,ZWasC)
- IF ZWasDF$ = "" THEN GOTO 1641
- ZWasQ = ZWasQ + 1
- ZStoreParseAt = ZStoreParseAt + 1
- ZUserIn$(ZStoreParseAt) = ZWasDF$
- CALL AllCaps(ZWasDF$)
- * ------[ first line different ]------
- WasX = INSTR(";NS;/G;C;",CHR$(59)+ZWasDF$+CHR$(59)) ' DD021301
- IF WasX = 0 THEN GOTO 1641
- ZNonStop = ZNonStop OR (WasX = 1) OR (WasX = 7 AND NOT ZStackC)
- IF ZStoreParseAt > 1 THEN IF INSTR("Jj",ZUserIn$(ZStoreParseAt-1)) THEN _
- ZNonStop = (ZPageLength < 1)
- IF ZAutoEnd = 3 THEN _ 'Pe 10/20/91
- ZNonStop = ZFalse 'Pe 10/20/91
- ZAutoLogoffReq = ZAutoLogoffReq OR (WasX = 4) ' DD063003
- IF ZAutoLogoffReq THEN ' DD063003
- IF INSTR(UCASE$(ZUserIn$)," F D ") OR _ ' DD063003
- INSTR(UCASE$(ZUserIn$),",F,D,") OR _ ' DD063003
- INSTR(UCASE$(ZUserIn$),";F;D;") THEN ' DD063003
- LogOffType$ = "TRANSFER " ' DD063003
- ELSE ' DD063003
- LogOffType$ = "DOOR " ' DD063003
- END IF ' DD063003
- IF ZFileSysParm > 0 THEN ' DD063003
- LogoffType$ = "TRANSFER " ' DD063003
- END IF ' DD063003
- CALL QuickTPut1 (ZFG9$ + "Automatic LogOff " + _ ' DD050301
- "if " + _ ' DD050301
- ZFGB$ + LogoffType$ + _ ' DD063003
- ZFG9$ + "Successful" + ZEmphasizeOff$) ' DD050301
- END IF ' DD063003
- IF ZWasQ > 0 AND WasX < 7 THEN _
- ZWasQ = ZWasQ - 1 : _
- ZStoreParseAt = ZStoreParseAt - 1
- * REPLACING old line(s) by new
- 1641 IF NOT ZEOL AND ZWasQ < 50 THEN _
- ZWasA = ZWasB + 1 : _
- GOTO 1640
- * ------[ first line different ]------
- IF ParseChar$ <> CHR$(59) THEN _ '; ' DD021301
- ZUserIn$ = WasX$
- * REPLACING old line(s) by new
- 1651 IF ZAnsIndex < ZLastIndex THEN _
- ZAnsIndex = ZAnsIndex + 1 : _
- ZUserIn$ = ZUserIn$(ZAnsIndex) : _
- * ------[ first line different ]------
- IF MID$(ZLastCommand$,2,1) <> SPACE$(1) AND (NOT ZStackC) AND ZAnsIndex > 1 AND INSTR("Cc",ZUserIn$) > 0 AND LEN(ZUserIn$) = 1 THEN _ ' DD021301
- GOTO 1651 _
- ELSE ZSubParm = 3 : _
- ZTurboKey = 0 : _
- CALL TGet : _
- GOTO 1652
- ZLastIndex = 0
- ZAnsIndex = 1
- ZSubParm = 1
- ZSearchingAll = ZFalse
- CALL TGet
- ZLastIndex = ZWasQ
- * REPLACING old line(s) by new
- 1654 ' $SUBTITLE: 'SetBaud - sub to set the baud rate in the RS232'
- ' $PAGE
- '
- ' NAME -- SetBaud
- '
- ' INPUTS -- PARAMETER MEANING
- ' ZBaudRateDivisor NUMBER TO DIVIDE THE 8250 CHIP'S
- ' PROGRAMABLE CLOCK TO ADJUST THE
- ' BAUD RATE TO THE USER'S BAUD
- ' RATE (INDEPENDENT OF THE BAUD
- ' RATE USED TO OPEN THE COMM. PORT)
- '
- ' DESIRED BAUD DIVISIOR (DECIMAL) TO OBTAIN DESIRED BAUD RATE
- ' RATE PCjr PC AND XT
- ' 50 2237 2304
- ' 75 1491 1536
- ' 110 1017 1047
- ' 134.5 832 857
- ' 150 746 768
- ' 300 373 384
- ' 600 186 192
- ' 1200 93 96
- ' 1800 62 64
- ' 2000 56 58
- ' 2400 47 48
- ' 3600 31 32
- ' 4800 23 24
- ' 7200 not available 16
- ' 9600 not available 12
- * ------[ first line different ]------
- ' 14400 not available 8 ' Mpl090202
- ' 16800 not available 7 ' BK070193
- ' 19200 not available 6
- ' 38400 " 3
- ' OUTPUTS -- BAUD RATE SET IN THE RS232 INTERFACE
- '
- ' PURPOSE -- To set the baud rate in the RS232 interface
- ' inpependent of the baud rate the communications port
- ' was opened at
- '
- SUB SetBaud STATIC
- IF ZCBaud$ = "" THEN _
- ZCBaud$ = MID$(ZBaudRates$,(-5 * ZBPS),5) : _ ' BH070401
- CALL Trim (ZCBaud$) ' BH070401
- Temp! = VAL(ZCBaud$)
- IF Temp! > 0 THEN CALL SetBPS (Temp!,ZCBPS)
- IF (ZCBPS = 0 OR Temp! = 0) THEN ZCBPS = ZBPS
- IF NOT ZKeepInitBaud THEN _
- ZTalkToModemAt$ = MID$(ZBaudRates$,(-5 * ZBPS),5) _
- ELSE ZTalkToModemAt$ = ZModemInitBaud$
- CALL Trim (ZTalkToModemAt$)
- IF LEN(ZTalkToModemAt$) < 5 THEN _
- ZTalkToModemAt$ = SPACE$(4 - LEN(ZTalkToModemAt$)) + _
- ZTalkToModemAt$
- IF ZEightBit THEN_
- Parity = 2 : _ ' No PARITY
- DataBits = 3 : _ ' 8 DATA BITS
- StopBits = 0 _ ' 1 STOP BIT
- ELSE Parity = 3 : _ ' EVEN PARITY
- DataBits = 2 : _ ' 7 DATA BITS
- StopBits = 0 ' 1 STOP BIT
- ComSpeed! = VAL(ZTalkToModemAt$)
- IF ComSpeed! > 19200 THEN _
- IF ZFossil THEN _
- WasI = &H9600 _
- ELSE WasI = 19200 _
- ELSE WasI = ComSpeed!
- IF ZFossil THEN _
- CALL FosSpeed(ZComPort,WasI,Parity,DataBits,StopBits) : _
- EXIT SUB
- IF ComSpeed! = 2400 THEN _
- ZBaudRateDivisor = &H30 _ ' DD052301
- ELSE IF ComSpeed! = 1200 THEN _
- ZBaudRateDivisor = &H60 _ ' DD052301
- ELSE IF ComSpeed! = 9600 THEN _
- ZBaudRateDivisor = &HC _
- ELSE IF ComSpeed! = 300 THEN _
- ZBaudRateDivisor = &H180 _ ' DD052301
- ELSE IF ComSpeed! = 450 THEN _
- ZBaudRateDivisor = &H100 _ ' DD052301
- ELSE IF ComSpeed! = 4800 THEN _
- ZBaudRateDivisor = &H18 _
- ELSE IF ComSpeed! = 7200 THEN _ ' DD070903
- ZBaudRateDivisor = &H10 _ ' DD070903
- ELSE IF ComSpeed! = 12000 THEN _ ' DD070903
- ZBaudRateDivisor = &HA _ ' DD070903
- ELSE IF ComSpeed! = 14400 THEN _ ' DD070903
- ZBaudRateDivisor = &H8 _ ' DD070903
- ELSE IF ComSpeed! = 16800 THEN _ ' BK070193
- ZBaudRateDivisor = &H7 _ ' BK070193
- ELSE IF ComSpeed! = 19200 THEN _
- ZBaudRateDivisor = &H6 _
- ELSE IF ComSpeed! = 38400 THEN _
- ZBaudRateDivisor = &H3
- MostSignifByte = FIX (ZBaudRateDivisor / 256)
- LeastSignifByte = ZBaudRateDivisor - (MostSignifByte * 256)
- LineCntlStatus = INP(ZLineCntlReg)
- MSBSave = INP(ZMSB)
- OUT ZMSB,0
- OUT ZLineCntlReg,LineCntlStatus OR 128
- OUT ZLSB,LeastSignifByte
- OUT ZMSB,MostSignifByte
- OUT ZLineCntlReg,LineCntlStatus
- OUT ZMSB,MSBSave
- END SUB
- * REPLACING old line(s) by new
- 2018 ' $SUBTITLE: 'SetWhoTo - subroutine to get who a msg/upload is to'
- ' $PAGE
- '
- ' NAME -- SetWhoTo
- '
- ' INPUTS -- PARAMETER MEANING
- ' HighestUserRecord
- '
- ' OUTPUTS -- MsgTo$ Who message is to
- ' RcvrRecNum User record # of who to
- '
- ' PURPOSE -- Asks who a message/upload is to and checks if receiver exists
- '
- * ------[ first line different ]------
- SUB SetWhoTo (EnableCC,MsgTo$,MsgFrom$,RcvrRecNum,Found,AllowPub) STATIC ' KG012502
- Temp$ = MsgFrom$
- CALL Trim (Temp$)
- ZNumHeaders = 0
- CALL KillWork (ZNodeWorkFile$)
- * REPLACING old line(s) by new
- * ------[ first line different ]------
- 2021 ZOutTxt$ = "To " + LEFT$("[A]ll,",-6*AllowPub) + "(S)ysop," + _ ' DD031501
- LEFT$("D)istribution,",-14*EnableCC) + _
- " or Full or Partial Name" ' DD031501
- ' CALL SkipLine (1) ' DD020701
- ZSemiOnly = ZTrue
- CALL PopCmdStack
- IF ZSubParm < 0 THEN _ ' DD031501
- GOTO 2033 ' KG022501
- IF NOT ZSysop THEN _ 'SM091908
- CALL SmartText(ZUserIn$,ZFalse,ZFalse,ZFalse) 'Pe 02/06/93
- IF LEN(ZUserIn$(ZAnsIndex)) > 30 THEN _
- CALL QuickTPut1 ("30 Char. Max") : _
- GOTO 2021
- Found = ZTrue
- IF ZWasQ = 0 THEN _
- MsgTo$ = "ALL" : _ 'Pe 12/08/91
- GOTO 2032 _ 'Pe 12/08/91
- ELSE ZWasDF$ = ZUserIn$(ZAnsIndex) : _
- CALL Remove (ZWasDF$,CHR$(44)) : _ ' DD042901
- CALL AllCaps (ZWasDF$) : _
- CALL Trim (ZWasDF$) : _ ' DD082301
- ZUserIn$(ZAnsIndex) = ZWasDF$ : _
- MsgTo$ = ZWasDF$ : _ 'Pe Efnd mod
- IF ZWasDF$ = CHR$(65) AND AllowPub THEN _ 'A ' DD031501
- MsgTo$ = "ALL" _
- ELSE IF ZWasDF$ = CHR$(83) THEN _ 'S ' DD021301
- MsgTo$ = ZSysopFirstName$ + SPACE$(1) +ZSysopLastName$ _ ' DD021301
- ELSE IF ZWasDF$ = CHR$(68) AND EnableCC THEN _ 'D ' DD021301
- GOTO 2025 _
- ELSE MsgTo$ = ZWasDF$ ' Mpl090202
- IF ZWasDF$ = CHR$(83) THEN _ ' DD030101
- IF UCASE$(ZSecretName$) = LEFT$(MsgTo$,LEN(MsgTo$)-1) THEN _ ' DD030101
- MsgTo$ = LEFT$(MsgTo$,LEN(Msgto$)-1) ' DD030101
- GOTO 2032
- * REPLACING old line(s) by new
- 2026 ZFileName$ = ZDistriPath$ + ZFileName$ + ".LST"
- CALL FindItX (ZFileName$,7)
- IF NOT ZOK THEN _
- CALL QuickTPUT1 (ZUserIn$ + " not found") : _
- * ------[ first line different ]------
- ZMplPersUpload = ZFalse : _ ' Mpl090202
- GOTO 2024
- ZNumHeaders = 0
- ZMplPersUpload = ZTrue ' Mpl090202
- CALL OpenWorkA (2,ZNodeWorkFile$) ' DD040601
- WHILE NOT EOF(7)
- CALL ReadDir (7,1)
- CALL AllCaps (ZOutTxt$)
- ZWasDF$ = ZOutTxt$
- CALL WhoCheck (ZOutTxt$, Found, RcvrRecNum)
- ZNumHeaders = ZNumHeaders + 1
- CALL PrintWorkA (2,ZWasDF$ + CHR$(44) + STR$(-RcvrRecNum*Found)) ' DD040601
- WEND
- ' CLOSE 7 ' Mpl090202
- GOTO 2033
- * REPLACING old line(s) by new
- 2032 RcvrRecNum = 0
- * ------[ first line different ]------
- ZMplPersUpload = ZFalse ' Mpl090202
- IF MsgTo$ <> "ALL" OR NOT AllowPub THEN ' DD031501
- IF ((LEFT$(MsgTo$,4) <> "ALL " OR NOT AllowPub) AND ZStartHash = 1) THEN ' DD031501
- CALL CheckInt (MsgTo$) ' DD031204
- IF ZTestedIntValue = 0 OR ZUserSecLevel < ZSysOpSecLevel OR _ ' DD031501
- (ZUserSecLevel >= ZSysOpSecLevel AND ZFileSysParm < 1) THEN ' DD031501
- ZWasDF = INSTR(MsgTo$+" @"," @") ' DD031204
- TempHashValue$ = LEFT$(MsgTo$,ZWasDF-1) ' DD031204
- ZMplPersUpload = Ztrue ' DD031204
- CALL WhoCheck (TempHashValue$,Found,RcvrRecNum) ' DD031204
- IF NOT Found THEN ' DD031204
- CALL BreakFileName (ZActiveMessageFile$, _ ' DD031204
- Pre$,Body$,Ext$,ZTrue) ' DD031204
- CALL WordInFile ("ECHOCONF.DEF",Body$+Ext$,Found) ' DD031204
- END IF ' DD031204
- IF NOT Found THEN ' DD031204
- CALL QuickPeek (ZUserIn$(ZAnsIndex),MsgTo$,Found) ' DD031204
- CALL AliasChk (MsgTo$,Found,UserNumFound) ' DD031204
- END IF ' DD031204
- IF NOT Found THEN ' DD031204
- ZLastIndex = 0 ' DD031204
- RcvrRecNum = 0 ' DD031204
- IF ZReply THEN ' DD031802
- CALL SkipLine (1) ' DD031802
- END IF ' DD031802
- CALL QuickTPut1 (MsgTo$ + _ ' DD031204
- " is not a local user on " + _ ' DD031204
- ZRBBSName$ + CHR$(33)) ' DD031204
- ZMplPersUpload = ZFalse ' DD031204
- IF NOT ZReply THEN ' DD031204
- ZOutTxt$ = "Send anyway?" + ZYesPrompt$ ' DD031204
- ZTurboKey = -ZTurboKeyUser ' DD031204
- ZLastIndex = 0 ' DD031204
- GOSUB 2034 ' DD031204
- IF ZNo THEN ' DD031204
- MsgTo$ = "" ' DD031204
- EXIT SUB ' DD031204
- END IF ' DD031204
- END IF ' DD031204
- END IF ' DD031204
- END IF ' DD031204
- END IF ' DD031204
- END IF ' DD031204
- CALL CheckInt (MsgTo$) ' DD012101
- IF ZTestedIntValue > 1 AND ZUserSecLevel >= ZSysOpSecLevel THEN _' DD012101
- ZMplPersUpload = ZTrue ' DD012101
- IF MsgTo$ = Temp$ THEN _
- ZOutTxt$ = "Really send this to Yourself?" + ZNoPrompt$ : _ ' DD060101
- ZLastIndex = 0 : _
- GOSUB 2034 : _
- IF NOT ZYes THEN _
- MsgTo$ = ""
- CALL OpenWorkA (2,ZNodeWorkFile$) ' DD040601
- CALL PrintWorkA (2,MsgTo$ + CHR$(44) + STR$(RcvrRecNum)) ' DD040601
- CLOSE 2
- ZNumHeaders = ZNumHeaders + 1
- IF EnableCC AND (NOT ZReply) AND MsgTo$ <> "ALL" AND _
- MsgTo$ <> "" AND LEFT$(MsgTo$,4) <> "ALL " AND _
- (NOT ZSysopComment) AND (NOT ZSysopMsg) THEN _
- ZOutTxt$ = "Send Carbon copies to other users?" + ZNoPrompt$ : _' DD060101
- CALL PopCmdStack : _
- IF ZYes THEN _
- GOTO 2021
- * REPLACING old line(s) by new
- * ------[ first line different ]------
- 2060 IF INSTR(ZMsgSecCats$,CHR$(85)) = 0 THEN _ 'U ' DD021301
- ZOutTxt$ = "" _
- ELSE ZOutTxt$ = " p(U)blic," : _
- IF MsgTo$ = "ALL" THEN _
- MsgPswd$ = "" : _
- GOTO 2061
- IF INSTR(ZMsgSecCats$,CHR$(82)) THEN _ 'R ' DD021301
- ZOutTxt$ = ZOutTxt$ + " p(R)ivate,"
- IF INSTR(ZMsgSecCats$,CHR$(80)) THEN _ 'P ' DD021301
- ZOutTxt$ = ZOutTxt$ + " (P)assword protected,"
- * REPLACING old line(s) by new
- 2061 ZOutTxt$ = "Make msg" + ZOutTxt$ + " (E)dit more, H)elp"
- IF MsgPswd$ = "^READ^" THEN _
- * ------[ first line different ]------
- DefaultProt$ = CHR$(82) : _ ' DD021301
- GOTO 2065
- IF LEFT$(MsgPswd$,1) = CHR$(33) THEN _ '! ' DD021301
- DefaultProt$ = CHR$(80) _ 'P ' DD021301
- ELSE _
- DefaultProt$ = CHR$(85) 'U ' DD021301
- * REPLACING old line(s) by new
- 2065 IF INSTR(ZMsgSecCats$,DefaultProt$) > 0 THEN _
- * ------[ first line different ]------
- MID$(ZOutTxt$,INSTR(ZOutTxt$,CHR$(40)+DefaultProt$+CHR$(41)),3) = CHR$(91)+DefaultProt$+CHR$(93) ' DD021301
- ZTurboKey = -ZTurboKeyUser
- GOSUB 2096
- IF ZWasQ = 0 THEN _
- ZUserIn$(ZAnsIndex) = DefaultProt$
- ZWasZ$ = LEFT$(ZUserIn$(ZAnsIndex),1)
- CALL AllCaps (ZWasZ$)
- IF INSTR(ZMsgSecCats$,ZWasZ$) = 0 THEN _
- GOTO 2060
- ON INSTR("RUPHE",ZWasZ$) GOTO 2075,2090,2075,2070,2067
- GOTO 2060
- * REPLACING old line(s) by new
- 2075 IF MsgTo$ = "ALL" THEN _
- CALL QuickTPut1 ("Msg to ALL cannot be private") : _
- GOTO 2060
- * ------[ first line different ]------
- IF ZWasZ$ = CHR$(80) THEN _ 'P ' DD021301
- GOTO 2088
- * REPLACING old line(s) by new
- 2085 ZOutTxt$ = "Password"
- GOSUB 2096
- IF ZWasQ = 0 THEN _
- * ------[ first line different ]------
- IF LEFT$(MsgPswd$,1) = CHR$(33) THEN _ '! ' DD021301
- MsgPswd$ = MID$(MsgPswd$,2) : _
- CALL QuickTPut1 ("Password is " + MsgPswd$) : _
- RETURN _
- ELSE _
- GOTO 2085
- IF LEN(ZUserIn$) > WasL THEN _
- CALL QuickTPut1 (STR$(WasL) + " Chars. max") : _
- GOTO 2085
- IF WasL = 15 AND LEFT$(ZUserIn$,1) = CHR$(33) THEN _ ' DD021301
- CALL QuickTPut1 ("Password can't begin with '!'") : _
- GOTO 2085
- RETURN
- '
- ' ** PASSWORD PROTECT MESSAGE (USERS WITH PASSWORD AND SYSOP CAN READ) *
- '
- * REPLACING old line(s) by new
- * ------[ first line different ]------
- 2088 ZOutTxt$ = "The Recipients Must Know the Password. Really Use a Password?" + ZNoPrompt$ ' DD091702
- ZTurboKey = -ZTurboKeyUser
- GOSUB 2096
- IF NOT ZYes THEN _
- GOTO 2070
- WasL = 14
- WasA1$ = CHR$(33) '! ' DD021301
- GOSUB 2085
- CALL AllCaps (ZUserIn$)
- GOTO 2092
- '
- ' ** MAKE MESSAGE KILL PROTECTED (ONLY SENDER, ADDRESSEE AND SYSOP CAN KILL) *
- '
- * REPLACING old line(s) by new
- 2250 ' $SUBTITLE: 'WhoCheck - Checks whether user exists'
- ' $PAGE
- '
- ' NAME -- WhoCheck
- '
- ' INPUTS -- PARAMETER MEANING
- ' WhoFind$ User to find
- '
- ' OUTPUTS -- WhoFound Whether user found
- ' UserNumFound Record # of user
- '
- ' PURPOSE -- Validate that user record exists. Sysop
- ' counted as found even if lack user record.
- '
- SUB WhoCheck (WhoFind$,WhoFound,UserNumFound) STATIC
- UserNumFound = 0
- IF ZStartHash <> 1 THEN _
- WhoFound = ZTrue : _
- EXIT SUB
- Work128$ = ZUserRecord$
- WhoFound = ZFalse
- ToSysop = (INSTR(WhoFind$,"SYSOP") > 0 OR _
- * ------[ first line different ]------
- INSTR(WhoFind$,ZSysopFirstName$ + SPACE$(1) + ZSysopLastName$) > 0) ' DD030501
- CALL OpenUser (ZHighestUserRecord) ' Mpl090202
- FIELD 5, 128 AS ZUserRecord$
- IF ToSysop THEN _
- WasX$ = ZSecretName$ : _ ' DD090901/MENU0
- ZMenuNewSysop = ZMenuNewSysop + 1 _ ' DD090901/MENU0
- ELSE WasX$ = WhoFind$
- ZWasDF = INSTR(WasX$+CHR$(64),CHR$(64)) '@ ' DD021301
- WasX$ = LEFT$(WasX$,ZWasDF)
- IF LEN(WasX$) > 1 THEN _
- CALL FindUser (WasX$,"",ZStartHash,ZLenHash,_
- 0,0,ZHighestUserRecord,WhoFound,_ ' Mpl090202
- UserNumFound,ZWasSL)
- LSET ZUserRecord$ = Work128$
- IF NOT WhoFound THEN _
- IF ToSysop THEN _
- WhoFound = ZTrue
- END SUB
- * REPLACING old line(s) by new
- 2620 ZOutTxt$ = "Line #" + _
- STR$(WasL) + _
- " is:" + _
- ZReturnLineFeed$ + _
- ZOutTxt$(WasL)
- ZSubParm = 3
- CALL TPut
- GOSUB 2695
- * ------[ first line different ]------
- ' IF NOT ZExpertUser THEN _ ' UG070501
- ' CALL QuickTPut1 ("Search & replace") ' UG070501
- ZOutTxt$ = "Search for What String" + _ ' UG070501
- ZPressEnterExpert$
- ZMacroMin = 99
- ZParseOff = ZTrue
- ZSubParm = 1
- GOSUB 2694
- IF ZWasQ = 0 THEN _
- EXIT SUB
- ZWasY$ = LEFT$(ZUserIn$,1)
- IF ZWasY$ = RIGHT$(ZUserIn$,1) THEN _
- IF LEN(ZUserIn$) > 2 THEN _
- WasX = INSTR(2,ZUserIn$,ZWasY$) : _
- IF WasX < LEN(ZUserIn$) THEN _
- IF ZWasY$ < CHR$(48) OR (ZWasY$ > CHR$(57) AND ZWasY$ < CHR$(65)) THEN _ ' DD021301
- ZUserIn$ = MID$(ZUserIn$,2,LEN(ZUserIn$)-2) : _
- WasX = WasX - 1 : _
- GOTO 2622
- WasX = INSTR(ZUserIn$,CHR$(59)) '; ' DD021301
- * REPLACING old line(s) by new
- 2622 IF WasX > 0 THEN _
- WasX$ = LEFT$(ZUserIn$,WasX-1) : _
- ZWasY$ = RIGHT$(ZUserIn$,LEN(ZUserIn$)-WasX) : _
- GOTO 2660
- WasX$ = ZUserIn$
- * ------[ first line different ]------
- ZOutTxt$ = "And Replace With What" ' UG070501
- ZParseOff = ZTrue
- ZSubParm = 1
- ZMacroMin = 99
- GOSUB 2694
- ZWasY$ = ZUserIn$
- * REPLACING old line(s) by new
- 2660 WasX = INSTR(1,ZOutTxt$(WasL),WasX$)
- IF WasX = 0 THEN _
- * ------[ first line different ]------
- CALL QuickTPut1 ("String Not Found in Line" + STR$(WasL) + CHR$(46)) : _ ' DD021301
- GOTO 2620
- * REPLACING old line(s) by new
- 3730 IF TabToSpace > 0 THEN _
- * ------[ first line different ]------
- WasX$ = SPACE$(1) : _ ' DD021301
- TabToSpace = TabToSpace - 1 : _
- GOTO 3750
- CALL FindFKey
- IF ZSubParm < 0 THEN _
- EXIT SUB
- WasX$ = ZKeyPressed$
- IF WasX$ = "" THEN _
- GOTO 3732 : _ ' KG011201
- IF ZLocalUser THEN _
- GOTO 3733 _
- ELSE GOTO 3732
- IF WasX$ = ZEscape$ THEN _
- ZKeyPressed$ = WasX$ : _
- EXIT SUB
- SendRemote = ZTrue
- WasZ = INSTR(ZLineEditChk$,WasX$)
- IF WasZ < 1 THEN _
- GOTO 3750 _
- ELSE IF WasZ > 4 THEN _
- GOTO 3870 _
- ELSE IF WasZ = 1 THEN _
- GOTO 3810
- IF ZLocalUser THEN _
- GOTO 3730
- * REPLACING old line(s) by new
- 3732 IF ZCommPortStack$ <> "" THEN _
- WasX$ = LEFT$(ZCommPortStack$,1) : _
- ZCommPortStack$ = RIGHT$(ZCommPortStack$,LEN(ZCommPortStack$)-1) : _
- GOTO 3738
- * ------[ first line different ]------
- IF NOT ZLocalUser THEN _ ' KG011201
- CALL EofComm (Char) : _ ' KG011201
- IF Char <> -1 THEN _ ' KG011201
- GOTO 3736 ' KG011201
- * REPLACING old line(s) by new
- 3750 IF SendRemote THEN _
- CALL PutCom(WasX$)
- * ------[ first line different ]------
- IF WasX$ = ZCarriageReturn$ THEN _
- CALL LPrnt (ZCrLf$,0) : _ ' DD080101/ANSI19
- Col = Col - 1 : _
- GOTO 3850 _ ' DD080101/ANSI19
- ELSE _ ' DD080101/ANSI19
- CALL LPrnt (WasX$, 0) ' DD080101/ANSI19
- * REPLACING old line(s) by new
- 3770 IF Col > WasXXX THEN _
- * ------[ first line different ]------
- IF WasX$ = SPACE$(1) THEN _ ' DD021301
- CALL SkipLine (1) : _
- GOTO 3860
- * REPLACING old line(s) by new
- 3800 IF WasZ < 1 THEN _
- WasZ = Col-1 : _
- GOTO 3820
- * ------[ first line different ]------
- IF MID$(ZLineMes$,WasZ,1) = SPACE$(1) THEN _ ' DD021301
- GOTO 3820
- WasZ = WasZ - 1
- GOTO 3800
- * REPLACING old line(s) by new
- 3952 ' $SUBTITLE: 'KillMsg - subroutine to delete messages'
- ' $PAGE
- '
- ' NAME -- KillMsg
- '
- ' INPUTS -- PARAMETER MEANING
- ' MsgToKill MESSAGE NUMBER TO KILL
- * ------[ first line different ]------
- ' ZActiveMessages NUMBER ACTIVE MESSAGES ' DD040706
- '
- ' OUTPUTS -- NONE
- '
- ' PURPOSE -- To kill/delete old or unnecessary messages
- '
- SUB KillMsg (MsgToKill,ZActiveMessages,ZconfName$) STATIC ' DD040706
- FIELD #1,128 AS ZMsgRec$
- WasQX = 1
- NumHeaders = 0
- * REPLACING old line(s) by new
- * ------[ first line different ]------
- 3955 IF WasQX > ZActiveMessages THEN _ ' DD040706
- ZOutTxt$ = "Message #" + _ ' DD091701
- STR$(MsgToKill) + " Not Found." : _ ' UG070501
- GOTO 4031
- IF ZMsgPtr(WasQX,2) = MsgToKill AND MsgToKill => 1 THEN _
- GOTO 3970
- WasQX = WasQX + 1
- GOTO 3955
- * REPLACING old line(s) by new
- * ------[ first line different ]------
- 4000 IF LEFT$(ZWasZ$,1) = CHR$(33) THEN _ '! ' DD021301
- ZWasZ$ = MID$(ZWasZ$,2)
- * REPLACING old line(s) by new
- 4020 ZWasZ$ = MID$(ZMsgRec$,37,22)
- CALL Trim (ZWasZ$)
- IF OrigNumHeaders < 2 AND ZExpertUser THEN _
- GOTO 4030
- * ------[ first line different ]------
- ZOutTxt$ = "Really kill msg#" + STR$(MsgToKill) + " to " + ZWasZ$ + CHR$(63) + ZYesPrompt$' DD021301
- ZSubParm = 1
- ZTurboKey = -ZTurboKeyUser
- CALL TGet
- IF ZSubParm < 0 THEN _
- EXIT SUB
- IF ZNo THEN _
- GOTO 4032
- * REPLACING old line(s) by new
- * ------[ first line different ]------
- 4656 ZOutTxt$ = "THREAD: +)forward, -)back, 1)from origin" + _ ' DD032501
- ZPressEnterExpert$ ' DD032501
- ZTurboKey = -ZTurboKeyUser
- ZSubParm = 1
- CALL TGet
- IF ZWasQ = 0 OR ZSubParm = -1 THEN _
- EXIT SUB
- ZWasZ$ = ZUserIn$(1)
- * REPLACING old line(s) by new
- 4657 ZWasZ$ = LEFT$(ZWasZ$,1)
- WasX = INSTR("+-1",ZWasZ$)
- IF WasX = 0 THEN _
- GOTO 4656
- * ------[ first line different ]------
- ZUserIn$(1) = CHR$(82) 'R ' DD021301
- IF WasX = 1 THEN _
- CurMsgNum = CurMsgNum + 1 _
- ELSE IF WasX = 2 THEN _
- CurMsgNum = CurMsgNum - 1 _
- ELSE CurMsgNum = 1 : _
- ZWasZ$ = CHR$(43) '+ ' DD021301
- ZUserIn$(3) = MID$(STR$(CurMsgNum),2) + ZWasZ$
- IF LEN(CurSubj$) < 4 OR LEFT$(CurSubj$,3) <> "(R)" THEN _
- ZUserIn$(2) = CurSubj$ _
- ELSE ZUserIn$(2) = MID$(CurSubj$,4)
- ZUserIn$(2) = LEFT$(ZUserIn$(2) + SPACE$(2),22) ' DD021301
- ZLastIndex = 3
- ZAnsIndex = 1
- ZWasQ = 3
- END SUB
- * REPLACING old line(s) by new
- 5501 CALL TimeRemain(MinsRemaining)
- * ------[ first line different ]------
- Temptime$ = STR$(MinsRemaining)
- CALL Trim (Temptime$)
- ZOutTxt$ = ZFGD$ + Temptime$ + ZFG2$ + _ ' DD121501
- " minutes left." + ZEmphasizeOff$ + ZCRLf$ + _ ' DD121501
- "D)eposit, W)ithdraw, H)elp, [Q]uit" ' DD070302
- ZTurboKey = -ZTurboKeyUser
- CALL PopCmdStack
- IF ZSubParm = -1 THEN _
- EXIT SUB
- ZWasZ$ = LEFT$(ZUserIn$(ZAnsIndex),1)
- CALL AllCaps(ZWasZ$)
- ON INSTR("QDW?H",ZWasZ$) GOTO 5509,5505,5502,5508,5508
- GOTO 5501
- * REPLACING old line(s) by new
- 5503 IF SignTime = 1 THEN _
- * ------[ first line different ]------
- Action$ = "Withdrew" : _ ' DD031004
- ZOutTxt$ = "Withdraw" _
- ELSE _
- Action$ = "Deposited" : _ ' DD031004
- ZOutTxt$ = "Deposit"
- Temp$ = ZFGE$ + ZOutTxt$ + ZFGB$ + " how many minutes?" + _ ' DD121501
- ZEmphasizeOff$ ' DD121501
- CALL ChangeInt (ZFalse,Temp$,Temp,0,Maxtime)
- IF ZWasQ = 0 OR ZTestedIntValue = 0 THEN _
- GOTO 5501
- ZTestedIntValue = SignTime * ZTestedIntValue
- CALL ChkAddedTime (ZTestedIntValue)
- IF ZTestedIntValue = 0 THEN _
- GOTO 5501
- CALL UpdtCalr (Action$ + STR$(SignTime*ZTestedIntValue) + _ ' DD031004
- " Mins" ,1) ' DD031004
- ZSecsPerSession! = ZSecsPerSession! + (ZTestedIntValue * 60)
- IF ZMaxPerDay = 0 THEN _ ' KG082101
- ZTimeCredits! = ZTimeCredits! + ZTestedIntValue * 60 ' KG082101
- ZElapsedTime = ZElapsedTime - ZTestedIntValue
- ZGlobalBankTime = ZGlobalBankTime - ZTestedIntValue
- ZBankTime = ZGlobalBankTime 'Pe 11/02/91
- GOSUB 5507
- GOTO 5501
- * REPLACING old line(s) by new
- 5505 SignTime = -1 ' deposit
- MaxTime = ZMaxBank - ZGlobalBankTime
- IF MaxTime <= 0 THEN _
- * ------[ first line different ]------
- Temptime$ = STR$(ZMaxBank) : _ ' DD121501
- CALL Trim (Temptime$) : _ ' DD121501
- CALL QuickTPut1 (ZFGF$ + ZBG5$ + " Already deposited max of " + _' DD121501
- Temptime$ + " minutes! " + ZEmphasizeOff$) : _' DD121501
- ZLastIndex = 0 : _
- GOTO 5501
- IF MaxTime > MinsRemaining THEN _
- MaxTime = MinsRemaining
- GOTO 5503
- * REPLACING old line(s) by new
- 5507 IF ZAnsIndex < ZLastIndex THEN _
- RETURN
- * ------[ first line different ]------
- CALL SkipLine (1) ' DD070301
- ZOutTxt$ = ZFG9$ + "Current Bank Balance: " + _ ' DD121501
- ZFGB$ + STR$(ZGlobalBankTime) + _ ' DD121501
- ZFG9$ + " Minutes" + ZEmphasizeOff$ ' DD121501
- CALL QuickTPut1(ZOutTxt$)
- RETURN
- * REPLACING old line(s) by new
- 9600 ' $SUBTITLE: 'DefaultU - subroutine to update user defauts'
- ' $PAGE
- '
- ' NAME -- DefaultU
- '
- ' INPUTS -- PARAMETER MEANING
- * ------[ first line different ]------
- ' ZFullScreenEditor 'Pe 09/02/91 AnsiEd Mod
- ' ZBoldText$ Ansi bold (0 no, 1 yes)
- ' ZCheckBulletLogon
- ' ZExpertUser
- ' ZWasGR
- ' ZLastMsgRead
- ' ZLineFeeds
- ' ZNulls
- ' ZPageLength
- ' ZPromptBell
- ' ZRegDate$
- ' ZReqQuesAnswered
- ' ZRightMargin
- ' ZSkipFilesLogon
- ' ZTimesLoggedOn
- ' ZUpperCase
- ' ZUserOption$
- ' ZUserTextColor Ansi of color (31-37)
- ' ZUserXferDefault$
- '
- ' OUTPUTS-- USER.OPTONS$
- '
- ' PURPOSE -- To update the user's record with their options.
- ' Meaning of graphics preference stored is as follows: where # is
- ' value stored for the color. E.g. if graphics perference for text
- ' files is color, and preference for normal text is light yellow,
- ' graphics preference stored is 38. Colors are Red, Green, Yellow,
- ' Blue, Purple, Cyan, and White.
- '
- ' normal bold
- ' Graphics R G Y B P C W R G Y B P C W
- ' none 30 35 40 45 50 55 60 | 65 70 75 80 85 90 95 ' DD061301
- ' mono 31 36 41 46 51 56 61 | 66 71 76 81 86 91 96 ' DD061301
- ' ansi 32 37 42 47 52 57 62 | 67 72 77 82 87 92 97 ' DD061301
- ' avatar 33 38 43 48 53 58 63 | 68 73 78 83 88 93 98 ' DD061301
- ' RIP 34 39 44 49 54 59 64 | 69 74 79 84 89 94 99 ' DD061301
- '
- SUB DefaultU STATIC
- ZWasA = -ZPromptBell -2 * ZExpertUser _
- -4 * ZNulls -8 * ZUpperCase _
- -16 * ZLineFeeds -32 * ZCheckBulletLogon _
- -64 * ZSkipFilesLogon -128 * ZFullScreenEditor _ ' Mpl090202
- -256 * ZReqQuesAnswered -512 * ZMailWaiting _
- -1024 * (NOT ZHiLiteOff) -2048 * ZTurboKeyUser _
- -4096 * ZFileWaiting -8192 * ZAvailableForChat _ ' DD062901
- -16384 * ZExtendedOff ' DD062901
- ' ' DD063002
- WasAA = -ZReadNewMail -2 * ZReselectAll _ ' DD070103
- -4 * ZMorePromptLF -8 * ZReselectGraphics _ ' DD070105
- -16 * ZANSIMusic -32 * ZNeverCanPage _ ' DD070601
- -64 * ZReselectProto -128 * ZGlobalTwit ' DD070906
- ' ' DD063002
- WasX = 5*ZUserTextColor - 125 + 35*VAL(ZBoldText$) + ZWasGR ' DD061301
- IF WasX < 30 OR WasX > 99 THEN _ ' DD061301
- WasX = 60 ' DD061301
- LSET ZUserOption$ = _
- MKI$(ZTimesLoggedOn) + _
- MKI$(ZLastMsgRead) + _
- ZUserXferDefault$ + _
- CHR$(WasX) + _
- CHR$(ZRightMargin) + _ ' DD063002
- CHR$(WasAA) + _ ' DD063002
- MKI$(ZWasA) + _
- ZRegDate$ + _
- CHR$(ZPageLength) + _
- ZEchoer$
- END SUB
- * REPLACING old line(s) by new
- 9801 ' $SUBTITLE: 'WhosOn - subroutine to display who is on'
- ' $PAGE
- '
- ' NAME -- WhosOn
- '
- ' INPUTS -- PARAMETER MEANING
- ' NumNodes # of nodes to check
- ' ZActiveMessageFile$ Current message file
- ' ZOrigMsgFile$ Main msg file
- '
- ' OUTPUTS -- None
- '
- ' PURPOSE -- To display who is on each node.
- '
- * ------[ first line different ]------
- SUB WhosOn STATIC ' KG012601
- WasA1$ = ZActiveMessageFile$
- ZActiveMessageFile$ = ZOrigMsgFile$
- CALL OpenMsg
- FIELD 1, 128 AS ZMsgRec$
- GET 1,1 ' KG012601
- NumNodes = VAL(MID$(ZMsgRec$,127)) ' KG012601
- FOR NodeIndex = 2 TO NumNodes + 1
- GET 1,NodeIndex
- ZOutTxt$ = ZFGA$ + "Node" + _ ' DD081801
- STR$(NodeIndex - 1) + ZFGE$ ' DD081801
- RecIndex = -VAL(MID$(ZMsgRec$,44,2))
- IF RecIndex >= 0 THEN _
- RecIndex = -1
- WasAX$ = MID$(ZMsgRec$,79,5) ' KG012001
- CALL Trim (WasAX$) ' KG012001
- WasAX$ = RIGHT$(SPACE$(5) + WasAX$,5) + _ ' DD031501
- " Baud " ' DD090604
- IF MID$(ZMsgRec$,55,2) = "-1" AND NOT ZSysop THEN _
- ZWasY$ = "SYSOP" + SPACE$(21) _
- ELSE ZWasY$ = MID$(ZMsgRec$,1,26)
- WasAX$ = WasAX$ + ZFGC$ + ZWasY$ ' DD081801
- IF MID$(ZMsgRec$,40,2) <> "-1" THEN ' JM092401/RCHAT
- CALL SaveUserActivity(WhatTheyDoin$, NodeIndex, ZTrue) ' JM092401/RCHAT
- IF WhatTheyDoin$ = CHR$(67) THEN 'C ' DD021301/RCHAT
- WasAX$ = WasAX$ + ZFG4$ + "[In Chat System]" ' JM092401/RCHAT
- ELSEIF WhatTheyDoin$ = CHR$(70) THEN 'F ' DD021301/RCHAT
- WasAX$ = WasAX$ + ZFG4$ + "[In File System]" ' JM092401/RCHAT
- ELSEIF WhatTheyDoin$ = CHR$(77) THEN 'M ' DD021301/RCHAT
- WasAX$ = WasAX$ + ZFG4$ + "[In Message System]" ' JM092401/RCHAT
- ELSE ' JM092401/RCHAT
- WasAX$ = WasAX$ + ZFG4$ + MID$(ZMsgRec$,93,22) ' JM092401/RCHAT
- END IF ' JM092401/RCHAT
- ELSE ' JM092401/RCHAT
- WasAX$ = WasAX$ + ZFG4$ + "[Has Opened a Door]" ' JM092401/RCHAT
- END IF ' JM092401/RCHAT
- IF MID$(ZMsgRec$,57,1) = CHR$(65) THEN 'A ' DD021301
- ZOutTxt$ = ZOutTxt$ + " Online at " + _ ' DD082801
- WasAX$ ' DD032203/MUSER
- ELSEIF NOT ZSysop AND NOT ZShowAllWhosOn THEN ' DD052001
- ZOutTxt$ = ZOutTxt$ + _ ' DD052001
- " Waiting for next caller" ' DD052001
- ELSE ZOutTxt$ = ZOutTxt$ + _ ' DD032203/MUSER
- " Offline at " + _ ' DD090403
- WasAX$
- END IF ' DD032203/MUSER
-
- CALL QuickTPut1 (ZOutTxt$)
- CALL AskMore ("",ZTrue,ZTrue,ZAnsIndex,ZFalse)
- IF ZNo THEN _
- NodeIndex = NumNodes + 2
- NEXT
- ZActiveMessageFile$ = WasA1$
- CALL QuickTPut (ZEmphasizeOff$,0)
- END SUB
- * REPLACING old line(s) by new
- 10410 ' $SUBTITLE: 'RecoverMsg - sub to recover deleted messages'
- ' $PAGE
- '
- ' NAME -- RecoverMsg
- '
- ' INPUTS -- PARAMETER MEANING
- ' MsgToRecover MESSAGE NUMBER TO RECOVER
- ' FirstMsgRecord RECORD # FOR First MSG
- '
- ' OUTPUTS -- ActionFlag SET TO 0 IF ERROR
- ' SET TO -1 IF No ERROR
- '
- ' PURPOSE -- To recover deleted messages. Note that this is only
- ' possible if you have not compressed your message file
- ' using config.
- '
- * ------[ first line different ]------
- SUB RecoverMsg (MsgToRecover,FirstMsgRecord,ActionFlag,ZConfName$) STATIC 'Pe 06/09/91
- FIELD #1,128 AS ZMsgRec$
- MsgRec = FirstMsgRecord
- * REPLACING old line(s) by new
- 10600 ' $SUBTITLE: 'UpdateU -- Update the users record at logoff'
- ' $PAGE
- ' NAME -- UpdateU
- '
- ' INPUTS -- PARAMETER MEANING
- ' ZAdjustedSecurity
- ' ZCurDate$
- ' ZDnlds
- ' ZElapsedTime
- ' ZListDir
- ' ZMainUserFileIndex
- ' ZSecsPerSession!
- ' ZUplds
- ' ZUserSecLevel
- '
- ' OUTPUTS -- ZElapsedTime$
- ' ZListNewDate$
- ' ZSecLevel$
- ' ZUserDnlds$
- ' ZUserUplds$
- '
- ' PURPOSE -- Update the user record for the user when the user
- ' exits RBBS-PC.
- '
- SUB UpdateU (LoggingOff) STATIC
- * ------[ first line different ]------
- IF ZActiveUserName$ = "" OR ZFirstName$ = "" OR _ ' DD100701
- ZPswdFailed = ZTrue THEN _ ' DD100701
- EXIT SUB
- IF ZUserFileIndex < 1 THEN _
- GOTO 10607
- UpdateDefaults = ZTrue
- * REPLACING old line(s) by new
- 10602 ZSubParm = 6
- ZWasY$ = ZLastDateTimeOn$
- CALL FileLock
- CALL OpenUser (ZHighestUserRecord)
- FIELD 5,31 AS ZUserName$, _
- 15 AS ZPswd$, _
- 2 AS ZSecLevel$, _
- 14 AS ZUserOption$, _
- 24 AS ZCityState$, _
- * ------[ first line different ]------
- 1 AS MachineType$, _ ' DD091401/DROP
- 1 AS ZDropTimes$, _ ' DD091401/DROP
- 1 AS ZBankTime$,_
- 4 AS ZTodayDl$, _
- 4 AS ZTodayBytes$, _
- 4 AS ZDlBytes$, _
- 4 AS ZULBytes$, _
- 14 AS ZLastDateTimeOn$, _
- 3 AS ZListNewDate$, _
- 2 AS ZUserDnlds$, _
- 2 AS ZUserUplds$, _
- 2 AS ZElapsedTime$
- * REPLACING old line(s) by new
- 10604 GET 5,ZUserFileIndex
- IF ZActiveUserFile$ = ZOrigUserFile$ THEN _
- ZUplds = ZGlobalUplds : _
- ZDnlds = ZGlobalDnlds : _
- ZDLToday! = ZGlobalDLToday! : _
- ZBytesToday! = ZGlobalBytesToday! : _
- ZDLBytes! = ZGlobalDLBytes! : _
- ZULBytes! = ZGlobalULBytes! : _
- * ------[ first line different ]------
- ZDropTimes = ZGlobalDropTimes : _ ' DD091401/DROP
- ZBankTime = ZGlobalBankTime _
- ELSE ZBankTime = 0
- LSET ZBankTime$ = CHR$(ZBankTime)
- LSET ZDropTimes$ = CHR$(ZDropTimes) ' DD091401/DROP
- LSET ZLastDateTimeOn$ = ZWasY$
- LSET ZCityState$ = ZWasCI$
- IF UpdateDefaults THEN _
- CALL DefaultU
- IF ZListDir THEN _
- LSET ZListNewDate$ = CHR$(VAL(MID$(ZCurDate$,7,2))) + _
- CHR$(VAL(MID$(ZCurDate$,1,2))) + _
- CHR$(VAL(MID$(ZCurDate$,4,2)))
- * REPLACING old line(s) by new
- 10605 LSET ZUserDnlds$ = MKI$(ZDnlds)
- LSET ZUserUplds$ = MKI$(ZUplds)
- IF ZEnforceRatios THEN _
- LSET ZTodayDl$ = MKS$(ZDLToday!) : _
- LSET ZTodayBytes$ = MKS$(ZBytesToday!) : _
- LSET ZDlBytes$ = MKS$(ZDLBytes!) : _
- LSET ZULBytes$ = MKS$(ZULBytes!)
- CALL CheckTime (ZUserLogonTime!, ZSecsUsedSession!, 2)
- IF (NOT ZExitToDoors) AND LoggingOff THEN _
- TempElapsed! = ZElapsedTime + _
- (ZSecsUsedSession! - ZTimeCredits!) / 60 : _
- ZTimeCredits! = 0 _
- ELSE TempElapsed! = ZElapsedTime - ZExitToDoors*ZMinsInDoors
- IF TempElapsed! < -32767 THEN _
- TempElapsed! = -32767 _
- ELSE IF TempElapsed! > 32767 THEN _
- TempElapsed! = 32767
- LSET ZElapsedTime$ = MKI$(TempElapsed!)
- IF ZAdjustedSecurity THEN _
- LSET ZSecLevel$ = MKI$(ZUserSecLevel)
- PUT 5,ZUserFileIndex
- ZSubParm = 8
- CALL FileLock
- IF ZActiveUserFile$ <> ZOrigUserFile$ AND LoggingOff THEN _
- ZActiveUserFile$ = ZOrigUserFile$ : _
- ZUserFileIndex = ZOrigUserFileIndex : _
- UpdateDefaults = ZFalse : _
- * ------[ first line different ]------
- ZAdjustedSecurity = ZFalse : _ ' KG022502
- LSET ZLastDateTimeOn$ = ZOrigDateTimeOn$ : _
- GOTO 10602
- * REPLACING old line(s) by new
- 10607 IF ZExitToDoors OR NOT LoggingOff THEN _
- EXIT SUB
- * ------[ first line different ]------
- IF NOT ZDontShowLogoff THEN ' DD062806
- Temp = ZMinsPerSession ' DD062806
- IF ZMaxPerDay > 0 THEN ' DD062806
- Temp = ZMaxPerDay - TempElapsed! ' DD062806
- IF Temp > ZMinsPerSession THEN ' DD062806
- Temp = ZMinsPerSession ' DD062806
- END IF ' DD062806
- END IF ' DD062806
- Temp = -(Temp > 0) * Temp ' DD062806
- ZOutTxt$ = STR$(Temp) ' DD091803
- CALL Trim (ZOutTxt$) ' DD063001
- CALL SkipLine (1) ' DD031302
- CALL QuickTPut1 (ZFGB$ + ZOutTxt$ + ZFG6$ + _ ' DD031302
- " minutes left Today") ' DD071301
- IF ZTempMaxBank > 0 THEN ' DD062503
- CALL QuickTPut1(ZFGC$ + "Banked Time:" + ZFGE$ + _ ' DD060101
- STR$(ZGlobalBankTime) + ZFGC$+" minutes") ' DD060101
- END IF ' DD062806
- Call QuickTput1 (ZFG9$ + "Thanks for calling" + _ ' DD060101
- ZFGB$ + SPACE$(1) + ZOrigRBBSName$ + ZFG9$ + _ ' DD021301
- " and please call again!") ' DD060101
- END IF ' DD062806
- IF NOT ZHiLiteOff THEN _
- CALL QuickTPut1 (ZColorReset$)
- IF NOT ZLocalUser THEN ' DD051801
- CALL DelayTime (8 + ZCBPS) ' DD080804
- END IF ' DD051801
- CALL PutMenu0Info ' DD090901/MENU0
- END SUB
- * REPLACING old line(s) by new
- 10935 ' $SUBTITLE: 'DosExit -- Setup to exit to DOS for ZSysop'
- ' $PAGE
- ' NAME -- DosExit
- '
- ' INPUTS -- PARAMETER MEANING
- ' ZComPort$
- ' ZDoorsTermType
- ' ZMultiLinkPresent
- ' ZRBBSBat$
- ' ZRedirectIOMethod
- ' ZUseDeviceDriver$
- '
- ' OUTPUTS -- ZWasQ NUMBER OF LINES TO WRITE OUT TO
- ' ZRCTTYBat$
- ' ZUserIn$() LINES TO WRITE OUT TO ZRCTTYBat$
- '
- ' PURPOSE -- Set up ZUserIn$() and ZWasQ in order to call "RBBSExit" and
- ' exit to DOS for the remote RBBS-PC sysop
- '
- SUB DosExit STATIC
- * ------[ first line different ]------
- * INSERTING new line(s)
- 10940 ZOutTxt$ = "Exit To Dos Using a DOOR?" + ZNoPrompt$ ' DD060101
- ZTurboKey = -ZTurboKeyUser ' Mpl090202
- CALL TGet ' Mpl090202
- CALL AllCaps (ZUserIn$) ' Mpl090202
- IF ZYES THEN_ ' Mpl090202
- GOTO 10955 ' Mpl090202
- ZOutTxt$(1) = "ECHO OFF"
- IF ZUseDeviceDriver$ <> "" THEN _
- Port$ = ZUseDeviceDriver$ _
- ELSE Port$ = "COM" + RIGHT$(ZComPort$,1)
- IF ZRedirectIOMethod THEN _
- ZFF = 5 : _
- ZOutTxt$(2) = "CTTY " + _
- Port$ : _
- ZOutTxt$(3) = ZDiskForDos$ + _
- "COMMAND" : _
- ZOutTxt$(4) = "CTTY CON" : _
- ZOutTxt$(5) = ZRBBSBat$ _
- ELSE ZFF = 3 : _
- ZOutTxt$(2) = ZDiskForDos$ + _
- "COMMAND >" + _
- Port$ + _
- " <" + _
- Port$ : _
- ZOutTxt$(3) = ZRBBSBat$
- * REPLACING old line(s) by new
- 10950 CALL AMorPM
- CALL UpdtCalr ("Exited to DOS at " + ZTime$,2)
- * ------[ first line different ]------
- CALL QuickTPut1 ("RBBS-PC " + ZVersionID$) ' DD012701
- CALL QuickTPut1 ("Remote Exit To DOS") ' DD012701
- CALL QuickTPut1 ("Type EXIT to Return.") ' DD012701
- CALL QuickTPut1 ("SysOp in Remote Console mode")
- CALL RBBSExit (ZOutTxt$(),ZFF)
- * INSERTING new line(s)
- 10955 ZOutTxt$ = "Enter Name of DOOR to use including Extension" 'Pe 10/18/90
- CALL TGet ' Mpl090202
- CALL AllCaps (ZUserIn$) ' Mpl090202
- IF ZUserIn$ = "" or ZWasQ = 0 THEN _ ' Mpl090202
- GOTO 10940 ' Mpl090202
- ZWasZ$ = ZUserIn$ ' Mpl090202
- CALL DoorExit (ZFalse) ' Mpl090202
- END SUB
- * REPLACING old line(s) by new
- 10976 ' $SUBTITLE: 'WordInFile -- Searches a file to find a word'
- ' $PAGE
- ' NAME -- WordInFile
- '
- ' INPUTS -- PARAMETER MEANING
- ' FilName$ FILE TO SEARCH IN
- ' Strng$ STRING TO SEARCH FOR
- '
- ' OUTPUTS -- InFile WHETHER STRING Found IN FILE
- '
- ' PURPOSE -- Searches for "Strng$" in file "FILNAME$." Used to
- ' limit doors and questionnaires to those specified
- ' in their menu files. The "Strng$" is capitalized
- ' but not the lines in the file, so must be exact
- ' case-sensitive match to be found. The only character
- ' that can immediately proceed or end a name to be
- ' found must be a blank.
- '
- SUB WordInFile (FilName$,Strng$,InFile) STATIC
- InFile = ZFalse
- CALL FindIt (FilName$)
- IF NOT ZOK THEN _
- EXIT SUB
- WasX = 0
- CALL AllCaps (Strng$)
- WHILE NOT EOF(2) AND WasX < 1
- LINE INPUT #2,ZOutTxt$
- * ------[ first line different ]------
- CALL AllCaps (ZOutTxt$) ' DD021404
- WasY = 1
- * REPLACING old line(s) by new
- 10978 WasX = INSTR(WasY,ZOutTxt$,Strng$)
- IF WasX < 1 THEN _
- GOTO 10980
- * ------[ first line different ]------
- ' WasY = WasX + 1 ' DD111402
- ' IF WasX > 1 THEN _ ' DD111402
- ' IF MID$(ZOutTxt$,WasX - 1,1) <> SPACE$(1) THEN _ ' DD021301
- ' WasX = 0 ' DD111402
- ' IF WasX > 0 THEN _ ' DD111402
- ' WasL = LEN(Strng$) : _ ' DD111402
- ' IF LEN(ZOutTxt$) => (WasX + WasL) THEN _ ' DD111402
- ' IF MID$(ZOutTxt$,WasX + WasL,1) <> SPACE$(1) THEN _ ' DD021301
- ' WasX = 0 ' DD111402
- ' IF WasX = 0 THEN _ ' DD111402
- ' GOTO 10978 ' DD111402
- * REPLACING old line(s) by new
- 10983 ' $SUBTITLE: 'DoorExit -- Setup to exit to a "door"'
- ' $PAGE
- ' NAME -- DoorExit
- '
- ' INPUTS -- PARAMETER MEANING
- ' ZMultiLinkPresent
- ' ZNodeID$
- ' ZRBBSBat$
- ' ZWasZ$
- '
- ' OUTPUTS -- ZWasQ NUMBER OF LINES TO WRITE OUT TO
- ' ZRCTTYBat$
- ' ZUserIn$() LINES TO WRITE OUT TO ZRCTTYBat$
- '
- ' PURPOSE -- Set up ZUserIn$() and ZWasQ in order to call "EXITRBBS" and
- ' exit RBBS-PC to invoke another program
- '
- SUB DoorExit (ReqDoorsDef) STATIC
- IF ZWasZ$ = "" OR _
- ZWasZ$ = "NONE" THEN _
- EXIT SUB
- CALL FindIt (ZWasZ$)
- IF NOT ZOK THEN _
- GOTO 10986
- CALL BreakFileName (ZWasZ$,WasX$,ExitTo$,ExitMethod$,ZFalse)
- ExitMethod$ = ""
- ZDooredTo$ = ExitTo$
- CALL FindIt (ZDoorsDef$)
- IF NOT ZOK THEN _
- IF ReqDoorsDef THEN _
- EXIT SUB _
- * ------[ first line different ]------
- ELSE ExitTo$ = ExitTo$ + SPACE$(1) + ZNodeID$ : _ ' DD021301
- GOTO 10989
- * REPLACING old line(s) by new
- * ------[ first line different ]------
- 10985 CALL ReadParms (ZOutTxt$(),10,1) ' DD011801/DOORS
- IF ZErrCode > 0 THEN _
- IF ReqDoorsDef THEN _
- EXIT SUB _
- ELSE ExitTo$ = ExitTo$ + SPACE$(1) + ZNodeID$ : _ ' DD021301
- GOTO 10989
- IF ExitTo$ <> ZOutTxt$(1) THEN _
- GOTO 10985
- CALL CheckInt (ZOutTxt$(2))
- IF ZErrCode > 0 THEN _
- ZErrCode = 0 : _
- GOTO 10985
- IF ZUserSecLevel < ZTestedIntValue THEN _
- CALL QuickTPut1 ("Insufficient security for door") : _
- EXIT SUB
- WasX$ = LEFT$(ZOutTxt$(5),INSTR(ZOutTxt$(5)+SPACE$(1),SPACE$(1))-1) ' DD021301
- CALL FindIt (WasX$)
- IF NOT ZOK THEN _
- GOTO 10986
- ZFileName$ = ZOutTxt$(3)
- ExitMethod$ = ZOutTxt$(4)
- ExitTemplate$ = ZOutTxt$(5)
- ZDoorDisplay$ = ZOutTxt$(7)
- ZDoorTime$ = ZOutTxt$(8)
- ZDoorDropFile$ = ZOutTxt$(9) ' DD121702/DOORS
- ZDoorCarrierDropOK$ = ZOutTxt$(10) ' DD011801/DOORCARRIERDROP
- ' CALL AskUsers ' DD022101
- CALL Graphic (ZFileName$) ' DD022101
- CALL BufFile (ZFileName$,WasX) ' DD022101
- CALL SmartText (ExitTemplate$,ZFalse,ZFalse,ZFalse) 'Pe 02/06/93
- CALL MetaGSR (ExitTemplate$,ZFalse)
- ExitTo$ = ExitTemplate$
- GOTO 10989
- * REPLACING old line(s) by new
- 10986 ZOutTxt$ = "Missing door program"
- * ------[ first line different ]------
- CALL UpdtCalr (ZOutTxt$ + SPACE$(1) + ZWasZ$,1) ' DD021301
- ZSnoop = ZTrue
- CALL LPrnt (ZOutTxt$,1)
- EXIT SUB
- * REPLACING old line(s) by new
- 10989 IF ZTransferFunction = 3 THEN _
- ZWasY$ = "Registration" _
- ELSE ZWasY$ = ZDooredTo$
- * ------[ first line different ]------
- ZOutTxt$ = ZFG2$ + "Swapping " + ZFGB$ + ZOrigRBBSName$ + _ ' DD082502
- ZFG2$ + " out and the " + _ ' DD082502
- ZFGB$ + ZWasY$ + ZFG2$ + " door in!" + _ ' DD082502
- ZEmphasizeOff$ ' DD062401
- ZSubParm = 5
- CALL TPut
- CALL UpdtCalr (ZDooredTo$ + " door opened!",2)
- CALL DoorInfo
- IF ExitMethod$ = CHR$(83) THEN _ 'S ' DD021301
- CALL UpdateU (ZFalse) : _
- CLOSE 4,5,16 : _ ' DD050701
- CALL ShellExit (ExitTemplate$) : _
- ZPrevCaller$ = "" : _
- CALL SetCall : _
- ZExitToDoors = ZTrue : _
- CALL DoorReturn : _
- CALL Graphic (ZDoorDisplay$) : _ ' DD022102
- CALL BufFile (ZDoorDisplay$,WasX) : _
- ZExitToDoors = ZFalse _
- ELSE ZOutTxt$(1) = ZDiskForDos$ + _
- "COMMAND /C " + _
- ExitTo$ : _
- ZOutTxt$(2) = ZRBBSBat$ : _
- CALL RBBSExit (ZOutTxt$(),2)
- END SUB
- * REPLACING old line(s) by new
- 10991 ' $SUBTITLE: 'DoorInfo -- Write info for doors to file'
- SUB DoorInfo STATIC
- CLOSE 2
- * ------[ first line different ]------
- IF ZDoorDropFile$ = CHR$(82) OR ZDoorDropFile$ = CHR$(83) THEN _ ' DD021301/DOORS
- CALL DoorSys : _ ' DD121702/DOORS
- EXIT SUB ' DD121702/DOORS
- IF ZDoorDropFile$ = CHR$(80) THEN _ 'P ' DD021301/DOORS
- CALL PCBoardSys : _ ' DD121702/DOORS
- EXIT SUB ' DD121702/DOORS
- ' IF ZDoorDropFile$ = CHR$(87) THEN _ 'W ' DD021301/DOORS
- ' CALL CallInfoBBS : _ ' DD121702/DOORS
- ' EXIT SUB ' DD121702/DOORS
- OPEN "O",2,"DORINFO" + _
- ZNodeFileID$ + _
- ".DEF"
- PRINT #2,ZRBBSName$
- PRINT #2,ZSysopFirstName$
- PRINT #2,ZSysopLastName$
- IF ZLocalUser THEN _
- PRINT #2,"COM0" _
- ELSE PRINT #2,ZComPort$
- ZUserIn$ = MID$(ZBaudParity$, INSTR(ZBaudParity$, CHR$(44))) ' DD021301
- PRINT #2,ZTalkToModemAt$;" BAUD";ZUserIn$ ' KG071101
- PRINT #2,ZNetworkType
- IF ZGlobalSysop THEN _
- PRINT #2,"SYSOP" : _
- PRINT #2,"" _
- ELSE PRINT #2,OrigFirstName$ : _ 'Lk Alias fix
- PRINT #2,ZLastName$
- PRINT #2,ZCityState$
- IF ZWasGR > 2 THEN PRINT #2,2 _ ' DD061301
- ELSE PRINT #2,ZWasGR ' DD040201
- PRINT #2,ZUserSecLevel
- CALL TimeRemain (MinsRemaining)
- CALL CheckInt (ZDoorTime$)
- IF ZErrCode = 0 AND ZTestedIntValue > 0 THEN _
- IF MinsRemaining > ZTestedIntValue THEN _
- MinsRemaining = ZTestedIntValue
- PRINT #2,INT(MinsRemaining)
- PRINT #2,ZFossil
- CLOSE 2
- END SUB
- * REPLACING old line(s) by new
- 10994 CLOSE 3
- ZExitToDoors = ZTrue
- IF NOT ZFossil THEN _
- OUT ZModemCntlReg,INP(ZModemCntlReg) OR 1
- * ------[ first line different ]------
- ' IF NOT ZPrivateDoor THEN _ ' DD090401
- ' CALL MLInit (2) ' DD090401
- * REPLACING old line(s) by new
- 12000 ' $SUBTITLE: 'SetSection -- Setup section prompts'
- ' $PAGE
- ' NAME -- SetSection Doug Azzarito
- '
- ' INPUTS -- PARAMETER MEANING
- ' ZMenuIndex 2 = user is in MAIN section
- ' 3 = user is in FILE section
- ' 4 = user is in UTIL section
- ' 6 = user is in LIBR section
- '
- ' OUTPUTS -- ZSection$ 4 character section name
- ' ZActiveMenu$ 1 character section name
- ' ZSectionPrompt$ Section name (if ZShowSection config)
- ' ZCmdPrompt$ Command input prompt string
- ' ZSectionOpts$ List of options valid in this sect
- ' ZInvalidOpts$ List of options invalid in this sect
- ' ZSubSection Index into security array for section
- '
- ' PURPOSE -- To build the prompt strings for the current section
- '
- SUB SetSection STATIC
- IF ZMenuIndex <> 6 THEN _
- ZCurDirPath$ = ZDirPath$
- * ------[ first line different ]------
- ON ZMenuIndex GOTO 12001, 12010,12005,12020,12001 ' DD071001
- * REPLACING old line(s) by new
- 12010 LSET ZSection$ = "MAIN"
- ZSectionOpts$ = ZMainOpts$
- ZInvalidOpts$ = ZInvalidMainOpts$
- ZSubSection = ZBegMain
- GOTO 12025
- * ------[ first line different ]------
- '12015 LSET ZSection$ = "LIBR" ' DD071001
- ' ZSectionOpts$ = ZLibOpts$ ' DD071001
- ' ZInvalidOpts$ = ZInvalidLibraryOpts$ ' DD071001
- ' ZSubSection = ZBegLibrary ' DD071001
- ' ZCurDirPath$ = ZLibDirPath$ ' DD071001
- ' GOTO 12025 ' DD071001
- * DELETING old line(s)
- 12015
- * REPLACING old line(s) by new
- 12025 ZActiveMenu$ = LEFT$(ZSection$,1)
- * ------[ first line different ]------
- LSET ZLastCommand$ = ZActiveMenu$ + SPACE$(1) ' DD021301
- IF ZShowSection THEN _
- ZSectionPrompt$ = ZSection$ _
- ELSE ZSectionPrompt$ = "Your"
- IF ZCmndsInPrompt=0 THEN _
- ZSectionOpts$ = ""
- ZCmdPrompt$ = ZSectionPrompt$ + _
- ZFG2$ + " command" + _ ' DD010202
- ZSectionOpts$
- END SUB
- * REPLACING old line(s) by new
- 12880 ZParseOff = ZTrue
- ZOutTxt$ = Ques$
- CALL PopCmdStack
- IF ZSubParm = -1 THEN _
- GOTO 12882
- IF ZWasQ = 0 THEN _
- GOTO 12880
- IF LEN(ZUserIn$(ZAnsIndex)) > MaxLen THEN _
- ZLastIndex = 0 : _
- CALL QuickTPut1 (STR$(MaxLen) + " chars max") : _
- GOTO 12880_
- ELSE IF LEN(ZUserIn$(ZAnsIndex)) < MinLen THEN _
- ZLastIndex = 0 : _
- CALL QuickTPut1 (STR$(MinLen) + " chars min") : _
- GOTO 12880
- Ans$ = ZUserIn$(ZAnsIndex)
- IF ZAnsIndex < ZLastIndex THEN _
- GOTO 12881
- ZOutTxt$ = ZUserIn$(ZAnsIndex) + _
- * ------[ first line different ]------
- ", right?" + ZYesPrompt$ ' DD060101
- ZTurboKey = -ZTurboKeyUser
- ZSubParm = 1
- CALL TGet
- IF ZSubParm = -1 THEN _
- GOTO 12882
- IF ZNo THEN _
- GOTO 12880
- * REPLACING old line(s) by new
- 13660 ' $SUBTITLE: 'LogError - sub to log errors to CALLERS file'
- ' $PAGE
- '
- ' NAME -- LogError
- '
- ' INPUTS -- PARAMETER MEANING
- ' ERR ERROR NUMBER DETECTED BY BASIC
- ' ERL Last LINE NUMBER ENCOUNTERED
- ' PRIOR TO ENCOUNTERNING ERROR
- '
- ' OUTPUTS -- NONE
- '
- ' PURPOSE -- To set up a string to write to the callers log
- ' indicating the date, time, error, and error line
- '
- SUB LogError STATIC
- WasIX = ERR
- IF ERR < 1 THEN _
- WasIX = ZErrCode
- * ------[ first line different ]------
- CALL UpdtCalr(STRING$(3,43) + SPACE$(1) + "Error " + _ ' DD021301
- STR$(WasIX) + _
- " line " + _
- STR$(ERL) + _
- " at " + _
- TIME$ + _
- " on " + _
- DATE$,2)
- END SUB
- '
- * REPLACING old line(s) by new
- 20096 ' $SUBTITLE: 'CheckRatio - subroutine to print ul/dl ratio'
- ' $PAGE
- '
- ' NAME -- CheckRatio
- '
- ' INPUTS -- PARAMETER MEANING
- ' TellUser TELL USER THEIR RATIO
- ' ZDnlds FILES DOWNLOADED
- ' ZDLBytes! BYTES DOWNLOADED
- ' ZUplds FILES UPLOADED
- ' ZULBytes! BYTES UPLOADED
- '
- ' OUTPUTS -- ZOK -1 if okay to download, 0 otherwise
- '
- ' PURPOSE -- To determine whether the users violated
- ' their upload to download restriction
- '
- SUB CheckRatio (TellUser) STATIC
- ZOK = ZTrue
- * ------[ first line different ]------
- IF ZFreeDnld THEN _ ' Mpl090202
- GOTO 20110
- '
- ' Detemine method of ratio checking. Look ahead to amount downloaded
- '
- IF ZByteMethod = 1 OR ZByteMethod = 3 THEN _
- Method$ = "Bytes" : _
- ULWork# = ZULBytes! : _
- DLWork# = ZDLBytes! + ZNumDnldBytes!
- IF ZByteMethod = 0 OR ZByteMethod = 2 THEN _
- Method$ = "Files" : _
- ULWork# = ZUplds : _
- DLWork# = ZDnlds + ZDownFiles
- IF ULWork# < ZInitialCredit# THEN _
- ULWork# = ZInitialCredit#
- IF ZByteMethod = 2 THEN _
- Today# = ZRatioRestrict# - ZDLToday! - ZDownFiles
- IF ZByteMethod = 3 THEN _
- Today# = ZRatioRestrict# - ZBytesToday! - ZNumDnldBytes!
- '
- Ratio# = 0
- RatioSuffix$ = ":0"
- IF ULWork# > 0 THEN _
- Ratio# = (DLWork# / ULWork#) : _
- RatioSuffix$ = ":1"
- IF ZByteMethod > 1 THEN ' DGS070301-DS
- IF ZBytesToday! > 0 THEN ' DGS070301-DS
- DGSTemp! = ZBytesToday! ' DGS070301-DS
- END IF ' DGS070301-DS
- DGSTemp! = DGSTemp! + ZNumDnldBytes! ' DGS070301-DS
- ZOutTxt$ = ZFG6$ + "Today's Downloaded Files: " + _ ' DD090202
- ZFGF$ + STR$(ZDLToday! + ZDownFiles)+ZCrLf$ + _ ' DD090202
- ZFGC$ + "Number of Bytes Today: " + _ ' DD090701
- ZFGF$ + STR$(DGSTemp!) + _ ' DGS070301-DS
- ZEmphasizeOff$ ' DGS070301-DS
- ZSubParm = 5 ' DGS070301-DS
- CALL TPut ' DGS070301-DS
- CALL SkipLine (1) ' DGS070301-DS
- GOTO 20100 ' DGS070301-DS
- END IF ' DGS070301-DS
- WasX$ = STR$(Ratio#)
- X = INSTR(WasX$,CHR$(46)) ' DD021301
- IF X > 0 THEN _
- WasX$ = LEFT$(WasX$,X+1)
- ZOutTxt$ = ZFG6$ + Method$ + " Downloaded: " + _ ' DD081801
- ZFGF$ + STR$(DLWork#)+ZCrLf$ + _ ' DD081801
- ZFGC$ + Method$ + " Uploaded: " + _ ' DD081801
- ZFGF$ + STR$(ULWork#) + ZCrLf$ ' DD081801
- ZOutTxt$ = ZoutTxt$ + ZFG5$ + _ ' DD081801
- "Today's Downloaded Files: " + ZFGF$ + _ ' DD081801
- STR$(ZDLToday! + ZDownFiles) + ZCrLf$ + _ ' DD081801
- ZFG2$ + "Your Ratio: " + ZFGF$ + _ ' DD081801
- WasX$ + RatioSuffix$ +ZEmphasizeOff$
- ZSubParm = 5
- CALL TPut
- '
- ' CHECK TO SEE IF THE USER HAS VIOLATED THEIR UL/DL RESTRICTION
- '
- * REPLACING old line(s) by new
- * ------[ first line different ]------
- 20100 IF NOT ZEnforceRatios OR ZRatioRestrict# <= 0 THEN _ ' Mpl090202
- GOTO 20110 'Pe 02/16/90
- IF NOT (ZRatioRestrict# > 0 AND TellUser) THEN _
- EXIT SUB
- IF ZByteMethod <= 1 THEN _
- GOTO 20105
- IF Today# < 0 THEN ' DGS070301-DS
- ZOutTxt$ = ZFGF$ + ZBG4$ + _ ' DD082301
- "Sorry, Today's Daily Download limit of" ' DGS070301-DS
- IF ZBytesToday! < 0 THEN ' DGS070301-DS
- ZOutTxt$ = ZOutTxt$ + STR$(ZRatioRestrict# - ZBytesToday!) ' DGS070301-DS
- ELSE ' DGS070301-DS
- ZOutTxt$ = ZOutTxt$ + STR$(ZRatioRestrict#) ' DGS070301-DS
- END IF ' DGS070301-DS
- ZOutTxt$ = ZOutTxt$ + SPACE$(1) + Method$ + " Reached" + _ ' DGS070301-DS
- ZBG0$ + ZEmphasizeOff$ ' DD082301
- CALL SmartPause ' DD062602
- NotOver = ZFalse ' DD070403
- ZNumDnldBytes! = 0 ' DGS070301-DS
- ELSE ' DGS070301-DS
- ZOutTxt$ = ZFG5$ + "Download balance:" + _ ' DD082301
- ZFG6$ + STR$(Today#) + SPACE$(1) + _ ' DGS070301-DS ' DD021301
- ZFG6$ + Method$ + ZEmphasizeOff$ ' DD082301
- NotOver = ZTrue ' DD070403
- END IF ' DGS070301-DS
- ZSubParm = 5
- CALL TPut
- CALL SkipLine(1)
- GOSUB 20106 ' DD070403
- ZOK = NotOver ' DD070403
- EXIT SUB
- '
- * REPLACING old line(s) by new
- 20105 IF Ratio# > ZRatioRestrict# OR ULWork# = 0 THEN _
- * ------[ first line different ]------
- CALL PutCom (ZBellRinger$) : _ ' DD070402
- ZOK = ZFalse : _
- ZOutTxt$ = ZFGD$ + "Sorry, DL/UL ratio of" + _ ' DD082301
- ZFGE$ + STR$(ZRatioRestrict#) + _ ' DD082301
- ":1 " + ZFGD$ + _
- Method$ + " exceeded" + ZEmphasizeOff$ : _ ' DD070402
- ZSubParm = 5 : _
- CALL TPut : _
- ZOutTxt$ = ZFG6$ + "Minimum upload of" + ZFGB$ + _ ' DD082301
- STR$(INT(((DLWork# - (ULWork# * ZRatioRestrict#)) _
- / ZRatioRestrict#) + 1)) + _
- + SPACE$(1) + Method$ + ZFG6$ + _ ' DD021301
- " required to download" + ZEmphasizeOff$ : _ ' DD052003
- ZDownFiles = 0 : _ ' DGS070301-DS
- CALL SkipLine (1) : _ ' DD070403
- CALL SmartPause : _ ' DD062602
- GOSUB 20106 : _ ' DD070403
- ZOK = ZFalse _
- ELSE ZOutTxt$ = ZFGE$ + _ ' DD082301
- "Balance remaining before upload required:" + _ ' DD082301
- ZFGF$ + _ ' DD082301
- STR$(INT((ULWork# * ZRatioRestrict#)-DLWork#)) + _
- SPACE$(1) + ZFGE$ + Method$ + ZEmphasizeOff$ + _ ' DD060402
- ZCRLf$ ' DD060402
- ZSubParm = 3 ' DD052003
- CALL TPut
- ' CALL SkipLine (1) ' DD052003
- EXIT SUB ' DD070403
- * INSERTING new line(s)
- 20106 FilName$ = ZHelpPath$ + "RATIO" + ZHelpExtension$ ' DD070403
- CALL Graphic (FilName$) ' DD070403
- CALL BufFile (FilName$,X) ' DD070403
- CALL SmartPause ' DD070403
- RETURN ' DD070403
- * REPLACING old line(s) by new
- 20141 IF ZAnsIndex >= ZLastIndex THEN _
- IF LEN(ZDefaultExtension$) > 0 THEN _
- * ------[ first line different ]------
- CALL QuickTPut1 (ZFGE$ + "Default extension is " + _ ' DD092502
- ZFGB$ + ZDefaultExtension$ + _ ' DD092502
- ZEmphasizeOff$) ' DD092502
- WasZ$ = CHR$(86) 'V ' DD021301
- CALL AskItems (CHR$(86),WasZ$,ZFalse,"file",ZMarkedFiles$) ' DD021301
- IF ZSubParm = -1 OR ZWasQ = 0 THEN _
- EXIT SUB
- ZViolation$ = "View ARC"
- WasX = ZAnsIndex
- ZAnsIndex = WasX
- * REPLACING old line(s) by new
- 20142 IF ZAnsIndex > ZLastIndex THEN _
- * ------[ first line different ]------
- IF ZLastIndex > 1 OR Drive$ <> "" THEN _ ' KG091001
- EXIT SUB _
- ELSE GOTO 20141
- GOSUB 20143
- IF ZSubParm < 0 THEN _
- EXIT SUB
- ZAnsIndex = ZAnsIndex + 1
- GOTO 20142
- * REPLACING old line(s) by new
- 20143 ZWasZ$ = ZUserIn$(ZAnsIndex)
- CALL UnMarkItems (ZMarkedFiles$,ZAnsIndex, ZLastIndex,Temp,ZFalse)
- ZWasZ$ = ZUserIn$(ZAnsIndex)
- WasZ$ = ZWasZ$
- CALL AllCaps (ZWasZ$)
- CALL BreakFileName (ZWasZ$,Drive$,Prefix$,Ext$,ZFalse)
- IF Ext$ = "" THEN _
- Ext$ = ZDefaultExtension$ : _
- * ------[ first line different ]------
- ZWasZ$ = ZWasZ$ + CHR$(46) + ZDefaultExtension$ ' DD021301
- ZLastExt$ = Ext$ 'Pe 08/12/91
- ZFileNameHold$ = ZWasZ$
- ZFileName$ = ZWasZ$
- WasI = 1 'Pe 04/21/92
- CALL BadFile (Prefix$,BadFileNameIndex)
- ON BadFileNameIndex GOTO 20144,20146,20147
- * REPLACING old line(s) by new
- * ------[ first line different ]------
- 20145 IF Drive$ <> "" THEN _ ' KG091001
- ZFileNameHold$ = Prefix$ + CHR$(46) + Ext$ : _ ' DD021301
- CALL FindFile (ZFileName$,ZOK) _ ' KG091001
- ELSE CALL RotorsDir (ZFileName$,ZSubDir$(),ZSubDirCount + (NOT ZSysop),ZTrue,CHR$(86)) ' DD021301
- IF ZOK THEN _
- GOTO 20148
- IF ZPersonalDnld THEN _ 'Pe 08/12/91
- ZFileName$ = ZPersonalDrvPath$ + ZWasZ$ : _ 'Pe 08/12/91
- CALL FindFile (ZFileName$,ZOK) 'Pe 08/12/91
- IF ZOK THEN _ 'Pe 08/12/91
- GOTO 20148 'Pe 08/12/91
- ZWasZ$ = ZFileName$ 'Pe 04/21/92
- CALL BreakFileName (ZFileName$,DR$,Prefix$,Ext$,ZFalse) 'Pe 04/21/92
- WasJ = INSTR(MID$(ZCompressedExt$+". ",WasI),CHR$(46)) ' DD021301
- IF WasJ = 0 THEN _ 'Pe 04/21/92
- GOTO 20146 'Pe 04/21/92
- Check$ = MID$(ZCompressedExt$,WasI,WasJ-1) 'Pe 04/21/92
- WasI = WasI + WasJ 'Pe 04/21/92
- ZFileName$ = Prefix$ + CHR$(46) + Check$ ' DD021301
- ZLastExt$ = Check$ 'Pe 04/21/92
- ZFileNameHold$ = ZFileName$ 'Pe 04/21/92
- GOTO 20145 'Pe 04/21/92
- * REPLACING old line(s) by new
- 20147 CALL SecViolation
- IF ZDenyAccess THEN _
- EXIT SUB
- * ------[ first line different ]------
- IF DGSViewVio THEN _ ' DGS-DS/TH
- EXIT SUB ' DGS-DS/TH
- GOTO 20146
- * REPLACING old line(s) by new
- * ------[ first line different ]------
- 20148 WasX$ = ZDiskForDos$ + "VIEWFILE.BAT" ' DD052201
- CALL FindIt (WasX$)
- IF NOT ZOK THEN _
- GOTO 20150
- ZGSRAra$(3) = MID$(RIGHT$(ZComPort$,1)+"0",1-ZLocalUser, 1)
- CALL ReadDir (2,1)
- IF EOF(2) THEN ' DD052201
- ZWasZ$ = ZOutTxt$ ' DD052201
- ZGSRAra$(1) = ZFileName$ ' DD052201
- ZGSRAra$(2) = ZArcWork$ ' DD052201
- ELSE ' DD052201
- CALL TimeRemain(MinsRemaining) ' DD052201
- TimeStr$ = MID$(STR$(INT(MinsRemaining)),2) ' DD052201
- ZWasZ$ = WasX$ + " " + ZFileName$ + _ ' DD052201
- " " + ZArcWork$ + " " + ZGSRAra$(3) + " " + Ext$ + _ ' DD052201
- " " + TimeStr$ + " " + _ ' DD052201
- LTRIM$(STR$(ZWaitBeforeDisconnect)) + " " + _ ' DD062201
- LTRIM$(STR$(ZPageLength)) ' DD052201
- END IF ' DD052201
- CALL FilSecChk (ZViolation$, ZFileName$, ZOK) ' DGS-DS/TH
- IF NOT ZOK THEN _ ' DGS-DS/TH
- DGSViewVio = ZTrue : _ ' DGS-DS/TH
- GOTO 20147 ' DGS-DS/TH
- IF ZPersonalDnld THEN ' DD040101
- CALL PersFilSecChk (ZViolation$,ZFileName$,ZOK) ' DD040101
- IF NOT ZOK THEN ' DD040101
- GOTO 20147 ' DD040101
- END IF ' DD040101
- END IF ' DD040101
- IF ZErrCode = 53 THEN _ ' DGS-DS/TH
- CALL UpdtCalr ("Missing file " + ZFileSecFile$,2) ' DGS-DS/TH
- IF ZErrCode = 62 THEN _ ' DGS-DS/TH
- CALL UpdtCalr (ZFileSecFile$ + " Bad format!",2) ' DGS-DS/TH
- CALL QuickTPut1 (ZFGA$ + ZFileNameHold$ + _ ' DD092502
- ZFGE$ + " has these files:" + _ ' DD092502
- ZEmphasizeOff$) ' DD092502
- CALL ShellExit (ZWasZ$)
- CALL BufFile (ZArcWork$,WasX)
- RETURN
- 20150'WasX = INSTR(".ARC.PAK.ZIP.LZH.","."+Ext$+".") ' DD040101
- 'IF (WasX < 1) OR (WasX = 1 AND NOT ZTurboRBBS) THEN _
- ' IF (WasX < 1) THEN _ ' DD040101
- CALL QuickTPut1 ("View for "+Ext$+" not implemented") ' DD040101
- ' RETURN ' DD040101
- ' CALL QuickTPut1 (ZFileNameHold$ + " has these files") ' DD040101
- ' CALL ViewArc ' DD040101
- RETURN
- END SUB
- * DELETING old line(s)
- 20150
- * REPLACING old line(s) by new
- 20235 ' $SUBTITLE: 'BadName - subroutine to find bad file names'
- ' $PAGE
- '
- ' NAME -- BadName
- '
- ' INPUTS -- PARAMETER MEANING
- ' ZActiveMessageFile$
- ' ZActiveUserFile$
- ' ZCallersFile$
- ' ZCmntsFile$
- ' CONFIG.FILEANAME$
- ' ZMainMsgBackup$
- ' ZMainMsgFile$
- ' ZMaxViolations
- ' ZPswdFile$
- ' ZRBBSBat$
- ' ZRCTTYBat$
- ' ZSubDir$()
- ' ZSubDirIndex
- ' ZViolation$
- ' ZViolationsThisSession
- ' ZWasZ$ NAME OF FILE
- ' ProtectExt -1 if check for extension
- ' 0 to allow any extension
- '
- ' OUTPUTS -- BadFileNameIndex 1 = FILE NAME IS OK
- ' 2 = SECURITY BREACH TRIED
- '
- ' PURPOSE -- To protect RBBS-PC against the use of bad file names
- ' to either crash the system or to breach RBBS-PC's security
- '
- SUB BadName (BadFileNameIndex,ProtectExt) STATIC
- '
- '
- ' * TEST FOR SYSTEM FILE ATTEMPT
- '
- BadFileNameIndex = 2
- ZWasZ$ = ZFileName$
- CALL BreakFileName (ZFileName$,DR$,Prefix$,Extension$,ZFalse)
- IF LEN(Extension$) = 3 AND ProtectExt THEN _
- * ------[ first line different ]------
- IF INSTR("DEF,MNU,OLD,PUI,BAK,",Extension$+CHR$(44)) > 0 THEN _ ' DD021301
- EXIT SUB
- ZOK = 0
- IF ProtectExt THEN _
- CALL FileNameCheck (ZActiveMessageFile$,Prefix$,Extension$)
- CALL FileNameCheck (ZActiveUserFile$,Prefix$,Extension$)
- CALL FileNameCheck (ZCallersFile$,Prefix$,Extension$)
- CALL FileNameCheck (ZCmntsFile$,Prefix$,Extension$)
- CALL FileNameCheck (ZFileSecFile$,Prefix$,Extension$)
- CALL FileNameCheck (ZMainMsgBackup$,Prefix$,Extension$)
- CALL FileNameCheck (ZOrigMsgFile$,Prefix$,Extension$)
- CALL FileNameCheck (ZOrigUserFile$,Prefix$,Extension$)
- CALL FileNameCheck (ZPswdFile$,Prefix$,Extension$)
- CALL FileNameCheck (ZRBBSBat$,Prefix$,Extension$)
- CALL FileNameCheck (ZRCTTYBat$,Prefix$,Extension$)
- CALL FileNameCheck (ZConfigFileName$,Prefix$,Extension$)
- IF ZOK = 0 THEN _
- BadFileNameIndex = 1
- END SUB
- * REPLACING old line(s) by new
- 20246 IF BaudTest! = 14400 THEN _
- BPS = -9 _
- ELSE IF BaudTest! = 16800 THEN _
- BPS = -10 _
- ELSE IF BaudTest! = 7200 THEN _
- BPS = -6 _
- ELSE IF BaudTest! = 12000 THEN _
- BPS = -8 _
- ELSE BPS = -7 ' 9600
- END SUB
- * ------[ first line different ]------
- '
- * INSERTING new line(s)
- 20340 ' $SUBTITLE: 'QuickPeek - Easy find user to send message to' ' DD062502
- ' $PAGE ' DD062502 ' DD062502
- ' NAME -- QuickPeek - A Dan & Howard Mod - Dan Drinnon 1992 ' DD062502
- ' ' DD062502
- ' INPUTS -- PARAMETER MEANING ' DD062502
- ' ' DD062502
- ' OUTPUTS -- ZUserIn$ Search String User Input ' DD062502
- ' MsgTo$ Who Message is To ' DD062502
- ' PURPOSE -- Save User keystrokes when looking for message addressee' DD062502
- ' ' DD062502
- SUB QuickPeek (ZUserIn$,MsgTo$,Found) Static ' DD070801
- IF Found = ZTrue THEN EXIT SUB ' DD070801
- IF ZFileSysParm < 1 THEN ' DD041302
- Action$ = "Send " ' DD041302
- ELSE ' DD041302
- Action$ = "Upload " ' DD041302
- END IF ' DD041302
- ZLastDateTimeOnSave$ = ZLastDateTimeOn$ ' DD062502
- HoldRecordPosition$ = ZUserRecord$ ' DD081401
- UserInName$ = ZUserIn$ ' DD062502
- WhichUser = 1 ' DD062502
- CALL QuickTPut (ZFG5$ + "Searching For " + _ ' DD041302
- ZFGB$ + MsgTo$ + ZEmphasizeOff$,0) ' DD041302
- NumDots = 0 ' DD081401
- CALL OpenUser (ZHighestUserRecord) ' DD062502
- WHILE NOT EOF(5) ' DD062502
- GET #5, WhichUser ' DD062502
- TempMsgTo$ = ZUserName$ ' DD062502
- CALL TRIM (TempMsgTo$) ' DD062502
- IF UserInName$ = TempMsgTo$ THEN EXIT SUB ' DD062502
- IF INSTR(TempMsgTo$,UserInName$) > 0 THEN ' DD062502
- IF TempMsgTo$ = ZSecretName$ AND _ ' DD121002
- UCASE$(ZSecretName$) <> ZSysopFirstName$ + SPACE$(1) + _ ' DD030501
- LEFT$(ZSysopLastName$,LEN(ZSysopLastName$)-1) THEN _ ' DD030501
- GOTO 20350 ' DD121002
- ZSubParm = 1 ' DD062502
- CALL QuickTPut (ZBackSpace$,0) ' DD041302
- CALL SkipLine (1) ' DD031302
- CALL QuickTPut (ZFGE$ + Action$ + "To: " + ZFG2$ + _ ' DD041302
- TempMsgTo$ + ZEmphasizeOff$,0) ' DD041302
- ZoutTxt$ = " (Y)es,[N]o,A)bort)" ' DD041302
- ZTurboKey = -ZTurboKeyUser ' DD062502
- CALL PopCmdStack ' DD062502
- IF ZSubParm = -1 THEN _ ' DD062502
- LSET ZUserRecord$ = HoldRecordPosition$ : _ ' DD081401
- EXIT SUB ' DD062502
- ZWasZ$ = ZUserIn$(1) ' DD062502
- CALL AllCaps (ZWasZ$) ' DD062502
- IF ZWasZ$ = CHR$(65) THEN _ 'A ' DD021301
- MsgTo$ = "" : _ ' DD062502
- Found = ZTrue : _ ' DD070801
- LSET ZUserRecord$ = HoldRecordPosition$ : _ ' DD081401
- EXIT SUB ' DD062502
- IF ZWasZ$ = CHR$(89) THEN 'Y ' DD021301
- MsgTo$ = TempMsgTo$ ' DD062502
- ZUserIn$ = TempMsgTo$ ' DD062502
- Found = ZTrue ' DD070801
- LSET ZUserRecord$ = HoldRecordPosition$ ' DD081401
- ZLastDateTimeOn$ = ZLastDateTimeOnSave$ ' DD062502
- EXIT SUB ' DD062502
- ELSE ' DD062502
- WhichUser=WhichUser+1 : _ ' DD081401
- NumDots = 0 : _ ' DD081401
- CALL QuickTPut (ZFG5$ + "Searching For " + _ ' DD041302
- ZFGB$ + ZUserIn$ + ZEmphasizeOff$,0) ' DD041302
- END IF ' DD062502
- ELSE ' DD062502
- 20350 WhichUser=WhichUser+1 ' DD080301
- END IF ' DD062502
- CALL MarkTime (NumDots) ' DD012602
- WEND ' DD062502
- CALL SkipLine (1) ' DD081401
- Found = ZFalse ' DD070801
- LSET ZUserRecord$ = HoldRecordPosition$ ' DD081401
- ZLastDateTimeOn$ = ZLastDateTimeOnSave$ ' DD062502
- END SUB ' DD062502
-