home *** CD-ROM | disk | FTP | other *** search
- * ------------[ BLED merge (c) Ken Goosens ]-------------
- * Merge this against RBBSSUB2.BAS to produce RSB2UGLY.BAS
- * RBBSSUB2.BAS: Date 5-26-1990 Size 135138 bytes
- * ------------[ Created 06-10-1990 01:51:35 ]------------
- * 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
- ZAcknowledge$ = CHR$(6)
- ZAckChar$ = "C" + _
- ZAcknowledge$
- * ------[ first line different ]------
- ZActiveMenu$ = "|"
- ZActiveMessage$ = CHR$(225)
- ZBackSpace$ = CHR$(8) + _
- CHR$(32) + _
- CHR$(8)
- ZBackArrow$ = CHR$(29) + _
- CHR$(32) + _
- CHR$(29)
- ZBaudRates$ = " 300 450 1200 2400 4800 96001920038400"
- ZBellRinger$ = CHR$(7)
- ZBulletinMenu$ = ""
- ZWasCL = 24
- ZCancel$ = CHR$(24)
- ZColorReset$ = CHR$(27) + _
- "[00;37;40m"
- ZConfigFileName$ = "RBBS-PC.DEF"
- ZCarriageReturn$ = CHR$(13)
- ZDeletedMsg$ = CHR$(226)
- ZDosVersion = 2
- ZEndTransmission$ = CHR$(4)
- ZEscape$ = CHR$(27)
- ZExpectActiveModem = 0
- ZFalse = 0
- ZF1Key = 59
- ZF10Key = 68
- 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
- ZPressEnter$ = " (Press [ENTER] to quit)"
- ZPressEnterExpert$ = " ([ENTER] quits)"
- ZPressEnterNovice$ = ZPressEnter$
- 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"
- 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$
- 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"
- END SUB
- '
- * REPLACING old line(s) by new
- 1331 IF SotMenu THEN _
- ZFileName$ = HelpMenu$ : _
- GOSUB 1350 : _
- SotMenu = ZFalse
- ZAnsIndex = 1
- * ------[ first line different ]------
- ZOutTxt$ = "Help with what Command (or Topic name)" + _
- ZPressEnterExpert$
- ZSubParm = 1
- CALL TGet
- IF ZSubParm = -1 THEN _
- EXIT SUB
- IF ZWasQ = 0 THEN _
- EXIT SUB
- ZLastIndex = ZWasQ
- * REPLACING old line(s) by new
- 1525 CALL Carrier
- IF ZSubParm = -1 THEN _
- EXIT SUB
- IF LEN(ZCommPortStack$) > 0 THEN _
- InStack = ZTrue : _
- WasX = INSTR(ZCommPortStack$,ZCarriageReturn$) : _
- IF WasX > 0 THEN _
- ZOutTxt$ = LEFT$(ZCommPortStack$,WasX-1) : _
- * ------[ first line different ]------
- ZWasX$ = ZCarriageReturn$ : _
- ZCommPortStack$ = RIGHT$(ZCommPortStack$,LEN(ZCommPortStack$)-WasX) : _
- GOTO 1534 _
- ELSE ZWasY$ = LEFT$(ZCommPortStack$,1) : _
- ZCommPortStack$ = RIGHT$(ZCommPortStack$,LEN(ZCommPortStack$)-1) : _
- GOTO 1541
- IF (ZForceKeyboard OR (NOT ZMacroActive) OR (ZMacroSave > 0)) THEN _
- GOTO 1536
- '
- ' *** MACRO PROCESSING
- '
- * REPLACING old line(s) by new
- 1537 CALL CheckTime(ZAutoLogoff!, TempElapsed!, 3)
- IF TempElapsed! < 30 THEN _
- IF TempElapsed! <= 0 THEN _
- CALL UpdtCalr ("Sleep disconnect",1) : _
- ZSubParm = -1 : _
- ZNo = ZTrue : _
- ZSleepDisconnect = ZTrue : _
- EXIT SUB _
- ELSE IF SleepWarn THEN _
- SleepWarn = ZFalse : _
- * ------[ first line different ]------
- ZOutTxt$ = "Logging you off in 30 seconds..." : _
- CALL RingCaller
- CALL FindFKey
- IF ZSubParm < 0 THEN _
- EXIT SUB
- * REPLACING old line(s) by new
- 1625 IF LEN(ZUserIn$) < 4 THEN _
- WasX$ = LEFT$(ZUserIn$,3): _
- CALL AllCaps (WasX$) : _
- IF WasX$ = "Y" OR WasX$ = "YES" THEN _
- ZYes = ZTrue _
- ELSE IF WasX$ = "N" OR WasX$ = "NO" OR WasX$ = "A" THEN _
- ZNo = ZTrue _
- ELSE IF WasX$ = "RE" THEN _
- ZReply = ZTrue : _
- GOTO 1628 _
- ELSE IF WasX$ = "K" THEN _
- ZKillMessage = ZTrue : _
- GOTO 1628
- ZHidden = ZFalse
- * ------[ first line different ]------
- ZWasX$ = ""
- * REPLACING old line(s) by new
- 2020 IF MsgTo$ <> "" THEN _
- GOTO 2032
- * ------[ first line different ]------
- ZOutTxt$ = "To [A]ll,S)ysop, or Name"
- CALL SkipLine (1)
- ZParseOff = ZTrue
- GOSUB 2033
- IF LEN(ZUserIn$) > 30 THEN _
- CALL QuickTPut1 ("30 Char. Max") : _
- GOTO 2020
- * REPLACING old line(s) by new
- 2032 IF MsgTo$ <> "ALL" THEN _
- IF (LEFT$(MsgTo$,4) <> "ALL " AND ZStartHash = 1) THEN _
- TempHashValue$ = MsgTo$ : _
- CALL WhoCheck (TempHashValue$,Found,RcvrRecNum) : _
- IF NOT Found THEN _
- ZLastIndex = 0 : _
- IF NOT ZReply THEN _
- ZOutTxt$ = "[R]e-enter name, Q)uit, C)ontinue" : _
- ZTurboKey = -ZTurboKeyUser : _
- ZLastIndex = 0 : _
- GOSUB 2033 : _
- ZWasZ$ = ZUserIn$(1) : _
- CALL AllCaps (ZWasZ$) : _
- IF ZWasZ$ <> "C" THEN _
- MsgTo$ = "" : _
- IF ZWasZ$ <> "Q" THEN _
- GOTO 2020
- IF MsgTo$ = Temp$ THEN _
- * ------[ first line different ]------
- ZOutTxt$ = "Msg would be from and to same person! Really do this (Y,[N])" : _
- ZLastIndex = 0 : _
- GOSUB 2033 : _
- IF NOT ZYes THEN _
- MsgTo$ = ""
- EXIT SUB
- * REPLACING old line(s) by new
- 2075 IF MsgTo$ = "ALL" THEN _
- * ------[ first line different ]------
- CALL QuickTPut1 ("Message to ALL can't be private") : _
- GOTO 2060
- IF ZWasZ$ = "P" THEN _
- GOTO 2088
- * REPLACING old line(s) by new
- 2081 CALL QuickTPut1 ("Sending private mail to " + MsgTo$)
- * REPLACING old line(s) by new
- * ------[ first line different ]------
- 2088 ZOutTxt$ = "Receiver(s) MUST know password to read message. Use password (Y/[N])"
- GOSUB 2093
- IF NOT ZYes THEN _
- GOTO 2070
- WasL = 14
- WasA1$ = "!"
- GOSUB 2085
- CALL AllCaps (ZUserIn$)
- GOTO 2092
- '
- ' ** MAKE MESSAGE KILL PROTECTED (ONLY SENDER, ADDRESSEE AND SYSOP CAN KILL) *
- '
- * REPLACING old line(s) by new
- 3955 IF WasQX > ActiveMessages THEN _
- * ------[ first line different ]------
- ZOutTxt$ = "No such message #" + _
- STR$(MsgToKill) : _
- 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 ]------
- 4656 ZOutTxt$ = "Subject thread: +)forward, -)back, 1)from origin ([ENTER] quits)"
- ZTurboKey = -ZTurboKeyUser
- ZSubParm = 1
- CALL TGet
- IF ZWasQ = 0 OR ZSubParm = -1 THEN _
- EXIT SUB
- ZWasZ$ = ZUserIn$(1)
- * REPLACING old line(s) by new
- 4777 ZWasCM = 0
- CALL CheckTime(TimeChatStarted!,Elapsed!, 2)
- ZSecsPerSession! = ZSecsPerSession! + Elapsed!
- IF NOT ZLocalUser THEN _
- ZAutoLogoff! = TIMER + ZWaitBeforeDisconnect
- * ------[ first line different ]------
- CALL SkipLine(1)
- CALL QuickTPut("Chat ended. Returning to normal operation",2)
- END SUB
- * REPLACING old line(s) by new
- * ------[ first line different ]------
- 5202 ZOutTxt$ = "Change your page length from" + _
- STR$(ZPageLength) + _
- " to (0-255, 0 = Continuous)"
- CALL PopCmdStack
- IF ZWasQ = 0 OR ZSubParm = -1 THEN _
- CALL QuickTPut1 ("No change") : _
- EXIT SUB
- * REPLACING old line(s) by new
- 10607 IF ZExitToDoors OR NOT LoggingOff THEN _
- EXIT SUB
- Temp = ZMinsPerSession
- IF ZMaxPerDay > 0 THEN _
- Temp = ZMaxPerDay - TempElapsed! : _
- IF Temp > ZMinsPerSession THEN _
- Temp = ZMinsPerSession
- Temp = -(Temp > 0) * Temp
- * ------[ first line different ]------
- CALL SkipLine(1)
- CALL QuickTPut1 (MID$(STR$(Temp),2) + " minute(s) left for another call today.")
- ZOutTxt$ = ZFirstName$
- CALL NameCaps(ZOutTxt$)
- CALL QuickTPut1 (ZOutTxt$ + ", thanks and please call again!")
- IF NOT ZHiLiteOff THEN _
- CALL QuickTPut1 (ZColorReset$)
- CALL DelayTime (8 + ZBPS)
- END SUB
- * REPLACING old line(s) by new
- 10989 IF ZTransferFunction = 3 THEN _
- ZWasY$ = "Registration" _
- ELSE ZWasY$ = ZDooredTo$
- * ------[ first line different ]------
- ' ZOutTxt$ = ZWasY$ + _
- ' " door opened at " + _
- ' TIME$ + _
- ' " on " + _
- ' DATE$
- CALL QuickTPut1("Loading DOOR. Please wait...")
- CALL UpdtCalr (ZDooredTo$ + " door opened!",2)
- CLOSE 2
- 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$," B"))
- PRINT #2,ZTalkToModemAt$;ZUserIn$
- PRINT #2,ZNetworkType
- IF ZGlobalSysop THEN _
- PRINT #2,"SYSOP" : _
- PRINT #2,"" _
- ELSE PRINT #2,ZFirstName$ : _
- PRINT #2,ZLastName$
- PRINT #2,ZCityState$
- PRINT #2,ZWasGR
- PRINT #2,ZUserSecLevel
- CALL TimeRemain (MinsRemaining)
- CALL CheckInt (DoorTime$)
- IF ZErrCode = 0 AND ZTestedIntValue > 0 THEN _
- IF MinsRemaining > ZTestedIntValue THEN _
- MinsRemaining = ZTestedIntValue
- PRINT #2,INT(MinsRemaining)
- PRINT #2,ZFossil
- IF ExitMethod$ = "S" THEN _
- CALL ShellExit (ExitTemplate$) : _
- ZExitToDoors = ZTrue : _
- CALL BufFile (ZDoorDisplay$,WasX) : _
- CALL DoorReturn _
- ELSE ZOutTxt$(1) = ZDiskForDos$ + _
- "COMMAND /C " + _
- ExitTo$ : _
- ZOutTxt$(2) = ZRBBSBat$ : _
- CALL RBBSExit (ZOutTxt$(),2)
- END SUB
-