home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
BBS_UTIL
/
BM0406_A.ZIP
/
0406.ZIP
/
RSB40406.MRG
< prev
next >
Wrap
Text File
|
1994-04-06
|
110KB
|
2,276 lines
* ------------[ BLED merge (c) Ken Goosens ]-------------
* Merge this against RBBSSUB4.BAS to produce RBBSSUB4.BAS
* RBBSSUB4.BAS: Date 6-20-1992 Size 120885 bytes
* BusiMod (tm) mods for RBBS v17.4 - (c) 1993,94 by respective authors
* RBBS v17.4 (c) 1986,1992 by D Thomas Mack
* ------------[ Created 04-06-1994 22:00:00 ]------------
* REPLACING old line(s) by new
' $linesize:132
' $title: 'RBBSSUB4.BAS 17.4, Copyright 1986 - 92 by D. Thomas Mack'
' Copyright 1992 by D. Thomas Mack, all rights reserved.
' Name ...............: RBBSSUB4.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
' AnyBut 59760 Determine where a "word" begins
' AskUsers 64003 Ask users questions based on a script and save answers
' AskMore 59858 Check whether screen full
' AutoPage 60300 Check whether to notify sysop caller is on
' BadFileChar 59800 Check file name for bad character
' Bracket 59960 Puts strings around a substring
' BufFile 58400 Write a file to the user quickly
' BufString 58300 Write a string with imbedded CR/LF to the user quickly
' CheckColor 59930 Highlighting based on search string
' CmndToggle 64635 Processes user command to T)oggle preferences
' CmndSysopXfer 64640 Sysop function to change Xfer counts
' ColorDir 59920 Adds colorization to FMS directory entry
' ColorPrompt 59940 Colorizes prompts
' CompDate 59880+ Produces a computational data from YY, MM, DD
' ConfMail 59850 Check conference mail waiting
' ConvertDir 58950 Checks for U & A (shorthand) and converts appropriately
' PackDate 59201 Compress date in string format to 2 characters
' EofComm 60000 Determine whether any chars in comm port buffer
' ExpireDate 59890 Calculate registration expiration date
' FakeXRpt 62650 Write out file transfer report for protocols that don't
' FindEnd 58770 Find where a "word" ends
' FindFile 58790 Determine whether a file exists without opening it
' FindLast 58600 Find last occurence of a string
' FMS 58200 Search the upload management system for entries
* ------[ first line different ]------
' FMSHedr 58203 Draws header when listing files ' RM11229301
' GetAll 59780 Get list of all directories to display
' GetDirs 58895 Prompts for directories for file list/new/search cmds
' GetMsgAttr 62530 Restore attributes of original message
' GetYMD 59204 Pulls YY, MM, or DD from a 2 byte stored date
' GlobalSrchRepl 60100 Global search and replace
' LogPDown 59400 Records download in private directory
' MarkTime 60200 Give visual feedback during lengthy process
' MetaGSR 60130 Meta statement global search and replace
' MsgImport 59698 Allow local user to import a text file to a message
' Muzak 59100 Play musical themes for different RBBS functions
' NewPassword 60668 Get a new password
' PersFile 59300 processes requests for personal files ' RM01199401
' Protocol 62600 Determine if external protocols are available
' PutMsgAttr 62520 Save attributes of original message
' Remove 58210 Remove characters from within strings
' RotorsDir 58700 Searches for a file using list of subdirs
' RptTime 62540 Report date/time and time on
' SearchArray 58190 Check for the occurance of a string in an array
' SetEcho 59600 Set RBBS properly for who is to echo
' SetHiLite 59934 Set user preference on highlighting
' SetGraphic 59980 Sets graphic preference for text file display
' SetNewUserDef 64645 Sets new user defaults
' SmartText 58250 Process SMART TEXT control strings
' SubMenu 59500 Processes options that have sub-menus
' TimedOut 63000 Write timed exit semaphore file
' TimeLock 60180 Check for TIME LOCK on certain features
' Transfer 62620 RBBS-PC support for external protocols for file transfer ' BTCH174
' Toggle 57000 Toggles or views user options
' TwoByteDate 59200 Reduces a data to 2 byte string for space compression
' UnPackDate 59902 Uncompresses a 2 byte date
' UserColor 59965 Lets user set color for text and whether bold
' UserFace 59450 Processes programmable user interface
' ViewArc 64600 Display .ARC file contents to user
' PrivDoorRtn 62629 Private door exit routine
' WipeLine 58800 Wipes away a line so next prints in its place
' WordWrap 59710 Adjust a msg -- wrap lines and perserve paragraphs
'
' $INCLUDE: 'RBBS-VAR.BAS'
'
* REPLACING old line(s) by new
57000 ' $SUBTITLE: 'Toggle - Toggle User Preferences'
' $PAGE
'
' NAME -- Toggle
'
' INPUTS -- ToggleOption Option to toggle or view
' according to the following:
' ToggleOption PREFERENCE
' Toggle VIEW
' 1 -1 Autodownload
' 2 -2 Bulletin review on logon
' 3 -3 Case change
' 4 -4 File review on logon
' 5 -5 Highlight
' 6 -6 Line feeds
' 7 -7 Nulls
' 8 -8 TurboKey
' 9 -9 Expert
' 10 -10 Bell
* ------[ first line different ]------
' 11 -11 Chat Availability ' RCHAT401
'
' OUTPUTS -- ZSubParm passed from TPut
'
' PURPOSE -- Sets or views any single user preference value
'
SUB Toggle (ToggleOption) STATIC
ZSubParm = 0
IF ToggleOption < 0 THEN _
GOTO 57005
ON ToggleOption GOSUB _
57010, _ 'Autodownload
57120, _ 'Bulletin review on logon
57260, _ 'Case change
57150, _ 'File review on logon
57040, _ 'Highlight
57100, _ 'Line feeds
57210, _ 'Nulls
57230, _ 'TurboKey
57190, _ 'Expert
57170, _ 'Bell ' RCHAT401
57300 'Internode Chat Availability ' RCHAT401
EXIT SUB
* REPLACING old line(s) by new
57005 CALL AskMore ("",ZTrue,ZTrue,WasX,ZTrue)
ON -ToggleOption GOSUB _
57030, _ 'Autodownload
57130, _ 'Bulletin review on logon
57270, _ 'Case change
57160, _ 'File review on logon
57050, _ 'Highlight
57110, _ 'Line feeds
57220, _ 'Nulls
57240, _ 'TurboKey
57200, _ 'Expert
* ------[ first line different ]------
57180, _ 'Bell ' RCHAT401
57310 'Internode Chat Availability ' RCHAT401
EXIT SUB
* REPLACING old line(s) by new
57280 ZUseTPut = (ZUpperCase OR ZXOnXOff)
RETURN
* ------[ first line different ]------
* INSERTING new line(s)
57300 ZAvailableForChat = NOT ZAvailableForChat ' RCHAT401
57310 ZOutTxt$ = "Availability for node chat: " + MID$("NO YES", 1 -3 * ZAvailableForChat, 3) ' RCHAT401
CALL QuickTPut1 (ZOutTxt$) ' RCHAT401
RETURN ' RCHAT401
END SUB
'
* REPLACING old line(s) by new
58200 ' $SUBTITLE: 'FMS - subroutine to search the upload management system'
' $PAGE
'
' NAME -- FMS
'
' INPUTS -- PARAMETER MEANING
' DirToSearch$ RBBS-PC "DIR" CATEGORY TO LOOK
' FOR
' SearchString$ STRING TO SEARCH FOR
' SearchDate$ DATE TO SEARCH FOR
' ZCategoryName$()
' ZCategoryCode$()
' ZCategoryDesc$()
' CatFound
' ZNumCategories
'
' OUTPUTS -- ProcessedInFMS
' DnldFlag
'
' PURPOSE -- To search the file management system and display the
' files being searched for as well as the catetory descriptions
'
SUB FMS (DirToSearch$,SearchString$,SearchDate$, _
ProcessedInFMS,ZCategoryName$(1),ZCategoryCode$(1), _
ZCategoryDesc$(1),DnldFlag,CatFound,AbortIndex) STATIC
DnldFlag = 0
CALL SearchArray (DirToSearch$,ZCategoryName$(),ZNumCategories,CatFound)
ProcessedInFMS = ProcessedInFMS OR (CatFound > 0)
* ------[ first line different ]------
SpaceLen% = 68 - LEN(DirToSearch$) ' HEDR174/RM11229301
SpaceLen% = SpaceLen% - LEN(ZCategoryDesc$(CatFound)) ' HEDR174/RM11229301
IF ProcessedInFMS THEN
ZSubParm = 5
FilName$ = ZDirPath$ + "FMSHEAD.TXT"
CALL Graphic2 (FilName$) ' DGS011501-DS/RM03169401/RM03199402
IF ZOK THEN ' RM03169401
GOSUB 58202 ' RM03169401/RM03259402
ZDirToSearch$ = DirToSearch$ ' DGS011501-DS
ZHDR$ = HDR$ ' DGS011501-DS
ZCatDesc$ = ZCategoryDesc$(CatFound) ' DGS011501-DS
IF ZRIPTest = ZTrue THEN _ ' CJQ020794
CALL BufFile2 (ZHelpPath$ + "FILESCAN.RIP",WasX) : _ ' CJQ020794/RM03199402
ZLinesPrinted = 0 ' DGS/DS04069403
CALL BufFile2 (FilName$,ZWasX) ' DGS011501-DS/RM03169401/RM03199402
ELSE ' RM03169401
GOSUB 58202
CALL FMSHedr (DirToSearch$,HDR$,SrchDir$,SpaceLen%,ZCategoryDesc$(CatFound)) ' RM11229301
END IF
Cat$ = ZCategoryCode$(CatFound)
CALL DispUpDir (Cat$,SearchString$,SearchDate$,DnldFlag,AbortIndex)
END IF
EXIT SUB
* REPLACING old line(s) by new
* ------[ first line different ]------
58202 HDR$ = "" ' HEDR174/SG081502
ZOutTxt$ = SearchDate$ ' HEDR174
IF LEN(ZOutTxt$) > 0 THEN _
ZOutTxt$ = MID$(ZOutTxt$,3) + LEFT$(ZOutTxt$,2)
SrchDir$ = SearchString$ + ZOutTxt$ ' HEDR174
IF SrchDir$ <> "" THEN ' HEDR174/RM11019301
IF ZWasGR > 1 THEN ' HEDR174/RM11019301
HDR$ = ZDR4$ + " - Scanning for " + ZDR3$ + "══> " ' HEDR174/SG081502/RM11159301
SpaceLen% = SpaceLen% - LEN(HDR$ + SrchDir$) ' HEDR174/SG081502/RM11019301/RM11229301
IF ZEmphasizeOn$ <> "" THEN _ ' HEDR174/SG081502
SpaceLen% = SpaceLen% + 20 _ ' HEDR174/SG081502/RM11229301
ELSE _ ' HEDR174/SG081502
HDR$ = HDR$ + ZDR2$ : _ ' HEDR174/SG081502/RM11159301
SpaceLen% = SpaceLen% - LEN(ZDR2$) + 30 ' HEDR174/SG081502/RM11159301/RM11229301
ELSE ' HEDR174/RM11019301
HDR$ = " - Scanning for --> " ' HEDR174/SG081502
SpaceLen% = SpaceLen% - LEN(HDR$ + SrchDir$) ' HEDR174/RM11229301
ENDIF ' RM11019301
ENDIF ' RM11019301
RETURN ' HEDR174
END SUB
' $SUBTITLE: 'FMSHedr - subroutine to display File Listing Header' ' RM11229301
' $PAGE
'
' NAME -- FMSHedr
'
' INPUTS -- HDR$
' SrchDir$
' SpaceLen%
'
' OUTPUTS --
'
' PURPOSE -- Draws a colorful File Listing Header when listing files
'
'
SUB FMSHedr (DirToSearch$,HDR$,SrchDir$,SpaceLen%,CategoryDesc$) ' RM11229301
LineLen% = 52 - LEN(ZRBBSName$ + ZConfName$) ' HEDR174/RM11229301
CALL SkipLine (1) ' RM11229301
IF ZRIPTest = ZTrue THEN _ ' CJQ020794
CALL BufFile2 (ZHelpPath$ + "FILESCAN.RIP",WasX) : _ ' CJQ020794/RM03199402
ZLinesPrinted = 0 ' DGS/DS04069403
IF ZWasGR = 0 THEN _ ' HEDR174/SG081502
GOTO 58204 ' HEDR174/SG081502
CALL QuickTPut(ZDR5$ + "╔═ " + ZDR7$ + ZRBBSName$ + ZDR5$ +" ═════ " + _ ' HEDR174/RM11159301
ZDR4$ + "File Area: " + ZDR7$ + ZConfName$ + " " + ZDR5$ + _ ' HEDR174/RM11159301
STRING$(LineLen%,205) + "╗", 1) ' HEDR174/RM11229301/RM03119401
OutTxt$ = ZDR5$ + "║ " + ZDR3$ + DirToSearch$ + " : " + _ ' HEDR174/SG081502/RM11159301
ZDR2$ + CategoryDesc$ + HDR$ + _ ' HEDR174/SG081502/RM11159301/RM11229301
ZEmphasizeOn$ + SrchDir$ ' HEDR174/SG081502
GOSUB 58205 ' HEDR174/SG081502
CALL QuickTPut(OutTxt$ + ZDR5$ + "║", 1) ' HEDR174/SG081502/RM11159301
CALL QuickTPut(ZDR5$ + "╠════════════╦════════╦════════╦═════" + _ ' HEDR174/RM11159301
"═════════════════════════════════════╣", 1) ' HEDR174
CALL QuickTPut(ZDR5$ + "║ " + ZDR1$ + "File Name" + ZDR5$ + _ ' HEDR174/RM11159301
" ║ " + ZDR2$ + "Size" + ZDR5$ + " ║ ", 0) ' HEDR174/RM11159301
CALL QuickTPut(ZDR3$ + "Date" + ZDR5$ + _ ' HEDR174/RM11159301
" ║ " + ZDR4$ + "Description" + ZDR5$ + _ ' HEDR174/RM11159301
" ║", 1) : _ ' HEDR174
CALL QuickTPut(ZDR5$ + "╚════════════╩════════╩════════╩═════" + _ ' HEDR174/RM11159301
"═════════════════════════════════════╝" + ZEmphasizeOff$, 1) ' HEDR174
GOTO 58208 ' RM11229301
* INSERTING new line(s)
58204 CALL QuickTPut("+- " + ZRBBSName$ + " ----- File Area: " + _ ' HEDR174
ZConfName$ + " " + _ ' HEDR174
STRING$(LineLen%,45) + "+", 1) ' HEDR174/RM11229301/RM03119401
OutTxt$ = "| " + DirToSearch$ + " : " + CategoryDesc$ + HDR$ + _ ' HEDR174/SG081502/RM11229301
ZEmphasizeOn$ + SrchDir$ ' HEDR174/SG081502
GOSUB 58205 ' HEDR174/SG081502
CALL QuickTPut(OutTxt$ + "|", 1) ' HEDR174/SG081502
CALL QuickTPut("|------------+--------+--------+-------" + _ ' HEDR174
"-----------------------------------|", 1) ' HEDR174
CALL QuickTPut("| File Name | Size | ", 0) ' HEDR174
CALL QuickTPut("Date | Description"+ _ ' HEDR174
" |", 1) ' HEDR174
CALL QuickTPut("+------------+--------+--------+--------" + _ ' HEDR174
"----------------------------------+", 1) ' HEDR174
GOTO 58208 ' RM11229301
58205 IF SpaceLen% < 0 THEN _ ' HEDR174/SG081502/RM11229301
OutTxt$ = LEFT$(OutTxt$, LEN(OutTxt$) + SpaceLen%) + _ ' HEDR174/SG081502/RM11229301
ZEmphasizeOff$ _ ' HEDR174/SG081502
ELSE _ ' HEDR174/SG081502
OutTxt$ = OutTxt$ + ZEmphasizeOff$ + _ ' HEDR174/SG081502
STRING$(SpaceLen%,32) ' HEDR174/SG081502/RM11229301/RM03119401
RETURN ' HEDR174/SG081502
58208 END SUB ' RM11229301
* REPLACING old line(s) by new
58210 ' $SUBTITLE: 'Remove - subroutine to delete a string from within a string'
' $PAGE
'
' NAME -- Remove
'
' INPUTS -- PARAMETER MEANING
' BADSTRING$ STRING CONTAINING CHARACTERS
' TO BE DELETED FROM "WasL$"
' WasL$ STRING TO BE ALTERED
'
' OUTPUTS -- WasL$ WITH THE CHARACTERS IN
' "BADSTRING#" DELETED FROM IT
'
' PURPOSE -- To remove all instances of the characters in
' "BADSTRING$" from "WasL$"
'
* ------[ first line different ]------
SUB Remove (WasL$,BadString$) ' RM11159302
WasJ = 0
FOR WasI=1 TO LEN(WasL$)
IF INSTR(BadString$,MID$(WasL$,WasI,1)) = 0 THEN _
WasJ = WasJ + 1 : _
MID$(WasL$,WasJ,1) = MID$(WasL$,WasI,1)
NEXT WasI
WasL$ = LEFT$(WasL$,WasJ)
END SUB
'
* REPLACING old line(s) by new
58250 ' $SUBTITLE: 'SmartText - smart text substitution'
' $PAGE
'
' NAME -- SmartText (WRITTEN BY DOUG AZZARITO)
'
' INPUTS -- StringWork$ string to scan for Smart Text
' CRFound Does this line contain a CR?
' ZSmartTextCode Smart Text control code
'
' OUTPUTS -- StringWork$ Input string with Smart replaced
'
' PURPOSE -- Smart Text allows control strings in text files
' to be replaced at runtime with user info or other
' data. The Smart Text control code is a 1-byte
' code (configurable) with a 2-byte action code.
'
SUB SmartText (StringWork$, CRFound, OverStrike) STATIC
IF SmartCarry$<>"" THEN _
StringWork$ = SmartCarry$+StringWork$
Index = INSTR(StringWork$, ZSmartTextCode$)
WHILE Index > 0 AND Index < LEN(StringWork$)-1
IF INSTR(MID$(StringWork$, Index+1,2)," ") THEN _
SmartAct = 0 _
ELSE _
SmartAct = INSTR(ZSmartTable$, MID$(StringWork$, Index+1, 2))
IF SmartAct = 0 THEN _
WasI = 1 : _
GOTO 58254
SmartAct = (SmartAct+2)/3
* ------[ first line different ]------
IF SmartAct > 50 THEN _ ' DGS
GOTO 58251 ' DGS
ON SmartAct GOSUB 58260, 58261, 58262, 58263, 58264, 58265, _
58266, 58267, 58268, 58269, 58270, _
58271, 58272, 58273, 58274, 58275, _
58276, 58277, 58296, 58297, 58298, _ ' COLR174
58299, 58278, 58279, 58280, _ ' COLR174
58281, 58282, 58283, 58284, 58285, _
58286, 58287, 58289, 58290, 58291, _
58292, 58293, 58294, 58295, 58255, _ ' DROP174/RM100301
58300, 58301, 58302, 58303, 58304, _ ' DD052302
58305, 58306, 58307, 58308, 58309 ' DD052302
GO TO 58253 ' DGS
* INSERTING new line(s)
58251 SmartActTemp = SmartAct - 50
ON SmartActTemp GOSUB _
58310, 58311, 58312, 58313, 58314, _ ' RM02089401/GS02119401
58315, 58316, 58317, 58319, 58318, _ ' DGS
58320, 58321 ' DGS
58253 GOSUB 58256 ' DGS
WasI = LEN(SmartHold$)
ReplaceLen = 3
IF OverStrike OR Overlay THEN _
IF WasI > 2 THEN _
ReplaceLen = WasI _
ELSE _
SmartHold$ = SmartHold$ + SPACE$(3 - WasI)
StringWork$ = LEFT$(StringWork$, Index-1) + SmartHold$ + _
MID$(StringWork$,Index+ReplaceLen)
* INSERTING new line(s)
58255 SmartHold$ = STR$(ZDropTimes) ' DC Carrier Drops ' DROP174/RM100301/DGS092401-DS
CALL Trim (SmartHold$) ' DROP174/RM100301
RETURN ' DROP174/RM100301
* REPLACING old line(s) by new
* ------[ first line different ]------
58265 SmartHold$ = STR$(ZUserSecLevel) ' SL Security level
CALL Trim (SmartHold$)
RETURN
* REPLACING old line(s) by new
* ------[ first line different ]------
58266 SmartHold$ = DATE$ ' DT Date
RETURN
* REPLACING old line(s) by new
58267 CALL AMorPM
* ------[ first line different ]------
SmartHold$ = ZTime$ ' TM Time
RETURN
* REPLACING old line(s) by new
* ------[ first line different ]------
58269 CALL TimeRemain(MinsRemaining) ' TE Time elapsed (mm:ss)
SmartHold$ = MID$(STR$(INT(ZSecsUsedSession!/60)),2)+":"+ _
MID$(STR$((ZSecsUsedSession! MOD 60)+100),3)
RETURN
* REPLACING old line(s) by new
* ------[ first line different ]------
58270 SmartHold$ = MID$(STR$(INT((ZTempTimeLock+0.5)/60)),2) ' TL - Time Lock period ' RM02089401
SmartHold$ = SmartHold$ + ":"+ MID$(STR$((ZTempTimeLock MOD 60)+100),3) ' RM02089401
RETURN
* REPLACING old line(s) by new
* ------[ first line different ]------
58293 SmartHold$ = ZSysopFirstName$ ' FS Sysops First Name
CALL NameCaps(SmartHold$)
RETURN
* REPLACING old line(s) by new
* ------[ first line different ]------
58294 SmartHold$ = ZSysopLastName$ ' LS Sysops Last Name ' RM051701
CALL NameCaps(SmartHold$)
RETURN
* REPLACING old line(s) by new
58295 SmartHold$ = ZConfName$ ' CN Conference Name
RETURN
* ------[ first line different ]------
* INSERTING new line(s)
58296 SmartHold$ = ZFG5$ ' C5 Color 5 ' COLR174
GOTO 58258 ' COLR174
58297 SmartHold$ = ZFG6$ ' C6 Color 6 ' COLR174
GOTO 58258 ' COLR174
58298 SmartHold$ = ZFG7$ ' C7 Color 7 ' COLR174
GOTO 58258 ' COLR174
58299 SmartHold$ = ZFG8$ ' C8 Color 8 ' COLR174
GOTO 58258 ' COLR174
* REPLACING old line(s) by new
* ------[ first line different ]------
58300 SmartHold$ = ZFG9$ ' C9 Color 9 ' DD061303
GOTO 58258 ' DD061303
* REPLACING old line(s) by new
* ------[ first line different ]------
58301 SmartHold$ = ZFGA$ ' CA Color 10 ' DD061303
GOTO 58258 ' DD061303
* REPLACING old line(s) by new
* ------[ first line different ]------
58302 SmartHold$ = ZFGB$ ' CB Color 11 ' DD061303
GOTO 58258 ' DD061303
* REPLACING old line(s) by new
* ------[ first line different ]------
58303 SmartHold$ = ZFGC$ ' CC Color 12 ' DD061303
GOTO 58258 ' DD061303
* REPLACING old line(s) by new
* ------[ first line different ]------
58304 SmartHold$ = ZFGD$ ' CD Color 13 ' DD061303
GOTO 58258 ' DD061303
* REPLACING old line(s) by new
* ------[ first line different ]------
58305 SmartHold$ = ZFGE$ ' CE Color 14 ' DD061303
GOTO 58258 ' DD061303
* INSERTING new line(s)
58306 SmartHold$ = ZFGF$ ' CF Color 15 ' DD061303
GOTO 58258 ' DD061303
* REPLACING old line(s) by new
* ------[ first line different ]------
58307 SmartHold$ = ZBG0$ ' G0 Background Color 1 ' DD081801/BGCOLOR
GOTO 58258 ' DD081801/BGCOLOR
* INSERTING new line(s)
58308 SmartHold$ = ZBG1$ ' G1 Background Color 2 ' DD081801/BGCOLOR
GOTO 58258 ' DD081801/BGCOLOR
58309 SmartHold$ = ZBG2$ ' G2 Background Color 3 ' DD081801/BGCOLOR
GOTO 58258 ' DD081801/BGCOLOR
58310 SmartHold$ = ZBG3$ ' G3 Background Color 4 ' DD081801/BGCOLOR
GOTO 58258 ' DD081801/BGCOLOR
58311 SmartHold$ = ZBG4$ ' G4 Background Color 5 ' DD081801/BGCOLOR
GOTO 58258 ' DD081801/BGCOLOR
58312 SmartHold$ = ZBG5$ ' G5 Background Color 6 ' DD081801/BGCOLOR
GOTO 58258 ' DD081801/BGCOLOR
58313 SmartHold$ = ZBG6$ ' G6 Background Color 7 ' DD081801/BGCOLOR
GOTO 58258 ' DD081801/BGCOLOR
58314 SmartHold$ = ZBG7$ ' G7 Background Color 8 ' DD081801/BGCOLOR
GOTO 58258 ' DD081801/BGCOLOR
58315 SmartHold$ = ZDirToSearch$ 'FD ' DGS011501-DS
RETURN ' DGS011501-DS
58316 SmartHold$ = ZHDR$ 'FH ' DGS011501-DS
RETURN ' DGS011501-DS
58317 SmartHold$ = ZCatDesc$ 'FC ' DGS011501-DS
RETURN ' DGS011501-DS
58318 SmartHold$ = STR$(ZBaudTest!) ' BA Baud Rate ' GS021194
RETURN ' GS021194
58319 IF ZOnlyOneTimeLockPerDay AND LEFT$(ZLastDateTimeOnSave$,8) = ZCurDate$ THEN _ ' RM02089401/RM02099401
CALL TimeRemain(MinsRemaining) : _ ' LT - Time Lock period elapsed ' RM02089401
Temp = INT(ZSecsUsedSession!/60) : _ ' RM02089401
Temp = Temp + CVI(ZElapsedTime$) : _ ' RM02089401
SmartHold$ = MID$(STR$(Temp),2) + ":" + _ ' RM02089401
MID$(STR$((ZSecsUsedSession! MOD 60) + 100),3) : _ ' RM02089401
RETURN _ ' RM02089401
ELSE _ ' RM02089401
GOTO 58269 ' RM02089401
58320 SmartHold$ = STR$(ZGlobalBankTime) ' BT Banked Time ' DGS
RETURN ' DGS
58321 SmartHold$ = ZUserXferDefault$ ' TP Transfer Protocol ' DGS
RETURN ' DGS
END SUB
'
58350 ' $SUBTITLE: 'BufString - write a string with imbedded ZCR/LF' ' DD
' $PAGE
'
' NAME -- BufString
'
' INPUTS -- PARAMETER MEANING
' PassedStrng$ STRING TO BE WRITTEN OUT
' DataSize LENGTH OF STRING - # LEFT
' CHARS TO OUTPUT
'
' OUTPUTS -- PassedStrng$ IS WRITTEN TO THE USER
'
' PURPOSE -- To search the string, PassedStrng$, for embedded carriage
' returns and line feeds and write out each line with
' the appropriate substitution (cr/lf if to the local
' screen or cr/nulls/lf if to the communications port).
'
SUB BufString (PassedStrng$,PassedDataSize,AbortIndex) STATIC
'print "^";passedstrng$;"^"
WasL = LEN(PassedStrng$)
'print "passed length=";wasl;" pds=";passeddatasize
IF PassedDataSize < WasL THEN _
WasL = PassedDataSize
IF WasL = 0 THEN _
EXIT SUB
Temp = LEN(Hold$)
IF WasL = -1 THEN _ ' Clear Buffer
IF Temp < 1 THEN _
EXIT SUB _
ELSE WasL = 0
IF LEN(Strng$) >= WasL+Temp THEN _
LSET Strng$ = Hold$ : _
MID$(Strng$,Temp+1) = PassedStrng$ _
ELSE Strng$ = Hold$ + PassedStrng$
'if len(hold$) > 0 then print "adding <";hold$;">":input xxx$
'print "hold len=";temp;" wasl=";wasl
WasL = WasL + LEN(Hold$)
Hold$ = ""
' IF ZDeleteInvalid THEN IF PassedDateSize > 0 THEN _ ' RM02109401
' CALL FindLast (LEFT$(PassedStrng$,WasL),"[",Temp,ZWasZ) : _
' IF Temp > 0 THEN _
' Hold$ = MID$(PassedStrng$,Temp) : _
' WasL = WasL - LEN(Hold$)
ZFF = ZPageLength - 1
StartByte = 1
ZRet = ZFalse
IF CarryOver THEN _
IF ASC(Strng$) = 10 THEN _
StartByte = 2 : _
CALL SkipLine (1+ZJumpSearching)
CarryOver = (MID$(Strng$,WasL,1) = ZCarriageReturn$)
WasL = WasL + CarryOver
58351 CRat = INSTR(StartByte,Strng$,ZCarriageReturn$) ' DD
IF CRat > 0 AND CRat < WasL THEN _
CRFound = (MID$(Strng$,CRat + 1,1) = ZLineFeed$) _
ELSE CRFound = ZFalse
EOLlen = -2 * CRFound
IF CRFound THEN _
EOD = CRat _
ELSE EOD = WasL + 1
NumBytes = EOD - StartByte
StringWork$ = MID$(Strng$,StartByte,NumBytes)
IF NOT ZDeleteInvalid THEN _
GOTO 58352 ' DD
Index = INSTR(StringWork$,"[")
WasJ = LEN(StringWork$) - 1
WHILE Index > 0 AND Index < WasJ
IF MID$(StringWork$,Index + 2,1) = "]" THEN _
IF INSTR (ZInvalidOpts$,MID$(StringWork$,Index + 1,1)) THEN _
MID$(StringWork$,Index + 1,1) = "*"
Index = INSTR(Index + 1,StringWork$,"[")
WEND
58352 IF ZJumpSearching THEN _ ' DD
Temp$ = StringWork$ : _
CALL AllCaps (Temp$) : _
HiLitePos = INSTR (Temp$,ZJumpTo$) : _
IF HiLitePos = 0 THEN _
GOTO 58357 _ ' DD
ELSE CALL Bracket (StringWork$,HiLitePos,HiLitePos+LEN(ZJumpTo$)-1,ZEmphasizeOn$,ZEmphasizeOff$) : _
ZJumpSearching = ZFalse
IF ZSmartTextCode THEN _
CALL SmartText (StringWork$, CRFound, ZFalse)
IF NOT ZLocalUser THEN _
CALL EofComm (Char) : _
IF Char <> -1 THEN _
GOTO 58353 ' comm port input ' DD
ZKeyboardStack$ = INKEY$ : _
IF ZKeyboardStack$ <> "" THEN _ ' keyboard input
GOTO 58353 ' DD
CALL QuickTPut (StringWork$, - (CRFound))
GOTO 58354 ' DD
58353 ZOutTxt$ = StringWork$ ' DD
ZSubParm = 4
IF CRFound THEN ZSubParm = 5
CALL TPut
58354 IF ZRet THEN ' UG070509/DD
IF ZFossil THEN ' UG070509
CALL FosTxPurge(ZComPort) ' UG070509
CALL SkipLine (1) ' UG070509
CALL QuickTPut (ZEmphasizeOff$,0) ' UG070509
END IF ' UG070509
EXIT SUB
END IF ' UG070509
IF ZLinesPrinted < ZFF THEN _
GOTO 58357 ' DD
58355 CALL CheckTimeRemain (MinsRemaining) ' DD
CALL CheckCarrier
IF ZSubParm = -1 THEN _
EXIT SUB
IF ZNonStop THEN _
GOTO 58357 ' DD
IF NOT CRFound THEN _
GOTO 58357 ' DD
ZForceKeyboard = ZTrue
CALL AskMore ("",ZTrue,ZFalse,AbortIndex,ZStopInterrupts)
IF ZNo THEN _
ZRet = ZTrue : _
EXIT SUB
58357 StartByte = EOD + EOLlen ' DD
IF StartByte <= WasL THEN _
GOTO 58351 ' DD
END SUB
* REPLACING old line(s) by new
58400 ' $SUBTITLE: 'BufFile - subroutine to write a sequential file to the user'
' $PAGE
'
' NAME -- BufFile
'
' INPUTS -- PARAMETER MEANING
' FileSpec$ NAME OF THE FILE TO WRITE TO
' OUT TO THE USER
'
' OUTPUTS -- NONE FILE IS WRITTEN TO THE USER
'
' PURPOSE -- To display a sequential file to the user
'
SUB BufFile (FilName$,AbortIndex) STATIC
CALL FindIt (FilName$)
IF NOT ZOK THEN _
GOTO 58419
ZNo = ZFalse
* ------[ first line different ]------
CALL OpenRSeq (FilName$,NumRecs,LenLastRec,ZBufferSize,2) ' RM01139402
IF ZErrCode > 0 THEN _
GOTO 58419
DataSize = ZBufferSize
FIELD 2, DataSize AS SeqRec$
ZNonStop = ZNonStop OR (ZPageLength < 1)
ZJumpLast$ = ""
ZJumpSearching = ZFalse
ZJumpSupported = ZTrue
' IF NOT ZStopInterrupts THEN _ ' RM01289401
' IF NOT ZConcatFIles THEN _ ' RM01289401
' IF NOT ZNonStop THEN _ ' RM01289401
' ZOutTxt$ = "* Ctrl-K(^K) / ^X aborts. ^S suspends ^Q resumes *" : _ ' RM01289401
' ZSubParm = 2 : _ ' RM01289401
' CALL TPut ' RM01289401
WasTU = 0
* INSERTING new line(s)
58500 ' $SUBTITLE: 'BufFile2 - subroutine to write a sequential file to the user'
' $PAGE
'
' NAME -- BufFile2
'
' INPUTS -- PARAMETER MEANING
' FileSpec$ NAME OF THE FILE TO WRITE TO
' OUT TO THE USER
'
' OUTPUTS -- NONE FILE IS WRITTEN TO THE USER
'
' PURPOSE -- To display a sequential file to the user. Uses file number
' generated by system. ' RM03199402
'
SUB BufFile2 (FilName$,AbortIndex) STATIC ' RM03199402
CALL FindFile (FilName$,ZOK) ' RM03199402
IF NOT ZOK THEN _
GOTO 58519
FilNum = FREEFILE ' RM03199402
ZNo = ZFalse
CALL OpenRSeq (FilName$,NumRecs,LenLastRec,ZBufferSize,FilNum) ' RM01139402/RM03199401
IF ZErrCode > 0 THEN _
GOTO 58519
DataSize = ZBufferSize
FIELD FilNum, DataSize AS SeqRec$ ' RM03199402
ZNonStop = ZNonStop OR (ZPageLength < 1)
ZJumpLast$ = ""
ZJumpSearching = ZFalse
ZJumpSupported = ZTrue
WasTU = 0
58505 WasTU = WasTU + 1
IF WasTU < NumRecs THEN _
GET FilNum,WasTU _ ' RM03199402
ELSE IF WasTU = NumRecs THEN _
GET FilNum,WasTU : _ ' RM03199402
WasX = INSTR(SeqRec$,CHR$(26)) : _
IF WasX = 0 OR WasX > LenLastRec THEN _
DataSize = LenLastRec _
ELSE DataSize = WasX - 1 _
ELSE GOTO 58519
CALL BufString (SeqRec$,DataSize,AbortIndex)
58508 IF ZSubParm <> -1 AND NOT ZRet THEN _
GOTO 58505
58519 CLOSE FilNum ' RM03199402
CALL BufString ("",-1,AbortIndex)
ZBypassTimeCheck = ZFalse
ZStopInterrupts = ZFalse
CALL QuickTPut (ZEmphasizeOff$,0)
ZJumpSupported = ZFalse
END SUB
* REPLACING old line(s) by new
58600 ' $SUBTITLE: 'FindLast - find last occurence of a string'
' $PAGE
'
' NAME -- FindLast
'
' INPUTS -- PARAMETER MEANING
' LookIn$ STRING TO LOOK INTO
' LookFor$ STRING TO SEARCH FOR
'
' OUTPUTS -- WhereFound POSITION IN LookIn$ THAT
' LookFor$ Found
' NumFinds HOW MANY OCCURENCES IN LookIn$
'
' PURPOSE -- Finds last occurence of LookFor$ in LookIn$ and
' returns count of # of occurences. If none found,
' both returned parameters are set to 0.
'
* ------[ first line different ]------
SUB FindLast (LookIn$,LookFor$,WhereFound,NumFinds) ' RM11159302
WhereFound = INSTR(LookIn$,LookFor$)
NumFinds = -(WhereFound > 0)
NextFound = INSTR(WhereFound + 1,LookIn$,LookFor$)
WHILE NextFound > 0
NumFinds = NumFinds + 1
WhereFound = NextFound
NextFound = INSTR(WhereFound + 1,LookIn$,LookFor$)
WEND
END SUB
* REPLACING old line(s) by new
58700 ' $SUBTITLE: 'RotorsDir - search thru a list of subdirs for a file'
' $PAGE
'
' NAME -- RotorsDir
'
' INPUTS -- PARAMETER MEANING
' FilName$ FILE NAME TO LOOK FOR
' SDIR.ARA ARRAY OF SUBDIRECTORIES
' MaxSearch MAX # OF SUBDIRECTORIES
' MarkingTime WHETHER TO MARK TIME
'
' OUTPUTS -- FNAME$ ADD SUBDIRECTORY TO THE
' FILE NAME IF FOUND. OTHER-
' WISE DON'T.
' ZOK TRUE IF FILE WAS Found
'
' PURPOSE -- Hunt through a list of subdirectories to determine
' if a file is in any of them. If file is found, open
' the file as file #2, add the drive/path to the file
' name, and sets ZOK to true. If file isn't found, set
' file name to the last subdirectory searched -- which
' should be the upload subdirectory.
'
' If the library menu is selected (ZMenuIndex = 6), then
' only 2 subdirectories are searched. The first being
' the work disk and the second being the selected
' library disk.
'
SUB RotorsDir (FilName$,SDirAra$(1),MaxSearch,MarkingTime,PassToMacro$) STATIC
* ------[ first line different ]------
FilNum = FREEFILE ' RM01229401
ZOK = ZFalse
ZDotFlag = ZFalse
IF ZMenuIndex = 6 AND ZCDRom AND ZUseCDWorkDrive THEN ' RM04099401
NoticeSent = ZFalse ' RM04099401
X = 1 ' RM04099401
WasX = 0 ' RM04099401
58701 CALL FindFile ("CDWORK" + ZLibDrive$ + ".WRK",Found) ' RM04099401
IF Found THEN ' RM04099401
CALL Carrier ' RM04099401
IF ZSubParm = -1 THEN _ ' RM04099401
EXIT SUB ' RM04099401
IF NOT NoticeSent THEN _ ' RM04099401
CALL QuickTPut (ZFG1$ + "CD ROM Drive is busy...please wait" + _
ZEmphasizeOff$,0) : _ ' RM04099401
NoticeSent = ZTrue ' RM04099401
CALL Delaytime (1) ' RM04099401
CALL MarkTime (WasX) ' RM04099401
X = X + 1 ' RM04099401
IF X = 30 THEN _ ' Allow 30 seconds for clear ' RM04099401
CALL SkipLine (1) : _ ' RM04099401
CALL QuickTPut1 (ZEmphasizeOn$ + "File " + FilName$ + _
" currently unavailable...please try again!" + _
ZEmphasizeOff$) : _ ' RM04099401
ZDotFlag = ZTrue : _ ' RM04099401
GOTO 58710 ' RM04099401
GOTO 58701 ' RM04099401
END IF ' RM04099401
END IF ' RM04099401
IF MarkingTime THEN _
CALL QuickTPut (ZFG5$ + "Searching for " + ZFG7$ + FilName$ + ZEmphasizeOff$,0) ' RM051801
IF ZMenuIndex = 6 AND NOT ZCDRom THEN _ ' RM03259401
GOTO 58705
NumSearch = 1
WasX = 0
WHILE (NOT ZOK) AND NumSearch <= MaxSearch AND _
SDirAra$(NumSearch) <> ""
IF MarkingTime THEN _
CALL MarkTime (WasX)
WasX$ = SDirAra$(NumSearch) + _
FilName$
CALL FindFile (WasX$,ZOK)
NumSearch = NumSearch + 1
WEND
IF ZOK OR NOT ZFastFileSearch THEN _
GOTO 58710
FSize = 21 ' Mpl
CALL OpenRSeq (ZFastFileList$,HighRec&,WasX,FSize,FilNum) ' LRGE174/YB102001/WM050501/RM01139402/RM01229401
FIELD FilNum, 12 AS SearchFile$, _ ' WM050501/RM01229401
4 AS SearchPath$, _ ' WM050501
3 AS SearchDate$, _ ' WM050501
2 AS SearchCrLf$ ' WM050501
GET FilNum,1 ' Mpl/RM01229401
IF SearchCrLf$ <> ZCrLf$ THEN _ ' Mpl
CLOSE FilNum : _ ' RM10309301/RM01229401
FSize = 18 : _ ' Mpl
CALL OpenRSeq (ZFastFileList$,HighRec&,WasX,FSize,FilNum) ' RM10309301/RM01139402/RM01229401
IF ZErrCode <> 0 THEN _
GOTO 58710
CALL TrimTrail (FilName$,".")
CALL BinSearch (FilName$,1,12,FSize,HighRec&,RecFoundAt&,RecFound$,FilNum) ' LRGE174/YB102001/WM050501/RM10309301/RM01229401
ZOK = (RecFoundAt& > 0) ' LRGE174/YB102001
IF NOT ZOK THEN _
GOTO 58710
ZOK = ZFalse
CALL CheckInt (MID$(RecFound$,13,4))
IF ZTestedIntValue < 1 THEN _
GOTO 58710
Temp$ = WasX$ ' RM03219401
IF FSize = 21 THEN ' RM03279401
WasX$ = DATE$ ' WM050501
LSET SearchDate$ = CHR$ (VAL (MID$ (WasX$, 9, 2)) - 48) + _ ' WM050501
CHR$ (VAL (MID$ (WasX$, 1, 2)) + 31) + _ ' WM050501
CHR$ (VAL (MID$ (WasX$, 4, 2)) + 31) ' WM050501
PUT FilNum, RecFoundAt& ' WM050501/RM01229401
END IF ' RM03279401
CLOSE FilNum ' RM01229401
CALL OpenRSeq (ZFastFileLocator$,HighRec&,WasX,66,FilNum) ' LRGE174/YB102001/RM01139402/RM01229401
IF ZErrCode <> 0 OR ZTestedIntValue > HighRec& THEN _ ' LRGE174/YB102001
GOTO 58710
FIELD FilNum, 66 AS LocatorRec$ ' RM01229401
GET FilNum, ZTestedIntValue ' RM01229401
WasX$ = LEFT$(LocatorRec$,63)
CALL Trim (WasX$)
IF LEFT$(WasX$,2) = "M!" THEN ' RM03279401
IF ZFoundExtra THEN ' BTCH174/RM111201
ZOK = ZTrue ' BTCH174/RM111201
GOTO 58710 ' BTCH174/RM111201
ELSE ' BTCH174/RM111201
ZOK = ZFalse
ZGSRAra$(1) = PassToMacro$
WasX$ = RIGHT$(WasX$,LEN(WasX$)-2)
CALL Trim (WasX$)
ZFileLocation$ = ""
CALL MacroExe (WasX$)
IF ZFileLocation$ = "" THEN
ZOK = ZFalse
WasX$ = Temp$
GOTO 58710
ELSE
WasX$ = ZFileLocation$
END IF ' RM03279401
END IF ' RM03279401
END IF ' RM03279401
WasX$ = WasX$ + FilName$
CALL FindFile (WasX$,ZOK)
IF NOT ZOK THEN _
WasX$ = SDirAra$(MaxSearch) + FilName$
GOTO 58710
* REPLACING old line(s) by new
58711 CALL SkipLine (-MarkingTime)
* ------[ first line different ]------
CLOSE FilNum ' RM01229401
END SUB
* REPLACING old line(s) by new
58800 ' $SUBTITLE: 'WipeLine - Wipe away a line so next overprints'
' $PAGE
'
' NAME -- WipeLine
'
' INPUTS -- PARAMETER MEANING
' ZCarriageReturn$
' CharsToWipe # OF CHARACTERS TO BLANK
' ZNulls
'
' OUTPUTS -- NONE
'
' PURPOSE -- Wipe away a line and leave cursor at beginning of the
' same line so that the next line will print in its place
'
* ------[ first line different ]------
SUB WipeLine (CharsToWipe) ' RM11159302
IF ZNulls OR CharsToWipe > 79 THEN _
CALL SkipLine (1) : _
EXIT SUB
IF NOT ZLocalUser THEN _
Strng$ = ZCarriageReturn$ + SPACE$(CharsToWipe) + ZCarriageReturn$ : _
CALL PutCom (Strng$)
IF ZSnoop THEN _
LOCATE ,1 : _
CALL LPrnt(SPACE$(CharsToWipe),0) : _
LOCATE ,1
IF ZF7Msg$ = "" OR _
ZF7Msg$ = "NONE" OR _
NOT ZSysopNext THEN _
EXIT SUB
ZBypassTimeCheck = ZTrue
CALL BufFile (ZF7Msg$,WasX)
END SUB
* REPLACING old line(s) by new
58950 ' $SUBTITLE: 'ConvertDir -- Converts coded response to right directory'
' $PAGE
'
' NAME -- ConvertDir
'
' INPUTS -- PARAMETER MEANING
' Start ELEMENT TO BEGIN WITH
' ZUserIn$ ARRAY TO CONVERT
' ZWasQ Last ELEMENT TO CONVERT
'
' OUTPUTS -- ZUserIn$ CONVERTED DIRECTORY LIST
'
' PURPOSE -- Let the user put in a short standard string for a directory
'
'
* ------[ first line different ]------
SUB ConvertDir (Start) ' RM11159302
FOR WasI=Start TO ZLastIndex
CALL AraAllCaps (ZUserIn$(),WasI)
IF ZUserIn$(WasI)="U" THEN _
ZUserIn$(WasI) = ZUpldDirCheck$
IF ZUserIn$(WasI) = "A" THEN _
ZUserIn$(WasI) = "ALL"
NEXT
END SUB
* REPLACING old line(s) by new
59100 ' $SUBTITLE: 'Muzak - subroutine to PLAY ZMusic'
' $PAGE
'
' NAME -- Muzak
'
' INPUTS -- PARAMETER MEANING
' 1 PLAY CONSIDER YOURSELF(OPENING SCREEN)
' 2 PLAY WALK RIGHT IN(NEW USERS)
' 3 PLAY DRAGNET (SECURITY VIOLATION)
' 4 PLAY GOODBYE CHARLIE (GOODBYE)
' 5 PLAY TAPS (ACCESS DENIED)
' 6 PLAY OOM PAH PAH (DOWNLOAD)
' 7 PLAY THNKS FOR MEMORIES(UPLOAD)
'
' OUTPUTS -- NONE
'
' PURPOSE -- Provide sysops and the visually impaired with
' auditory feedback on what RBBS-PC is doing
'
* ------[ first line different ]------
SUB Muzak (PassedArg) ' RM11159302
ZFF = PassedArg
ZSubParm = 0
IF (NOT ZSnoop) OR (NOT ZMusic) OR ZLocalUserMode THEN _
EXIT SUB
ON ZFF GOTO 59102,59104,59106,59108,59110,59112,59114
EXIT SUB
* REPLACING old line(s) by new
59200 ' $SUBTITLE: 'TwoByteDate -- subroutine to put date in 2 bytes'
' $PAGE
'
' NAME -- TwoByteDate
'
' INPUTS -- PARAMETER MEANING
* ------[ first line different ]------
' TYear FOUR DIGIT YEAR (I.E. 1987) ' MSVB/RM041101
' WasMM MONTH
' WasDD DAY
' Result$ LOCATION TO PLACE THE Result
'
' OUTPUTS -- Result$ TWO BYTE COMPRESSED DATE FOR USE IN
' A RANDOM RECORD
'
' PURPOSE -- Compress a WasY,ZMsgPtr,WasD date into two characters
'
SUB TwoByteDate (TYear,WasMM,WasDD,Result$) ' MSVB/RM041101/RM11159302
Result$ = CHR$(((TYear - 1980) * 2) OR - ((WasMM AND 8) <> 0)) + _ ' MSVB/RM041101
CHR$((WasMM AND NOT 8) * 32 + WasDD)
END SUB
* REPLACING old line(s) by new
59201 ' $SUBTITLE: 'PackDate -- subroutine to Compress STRING DATE'
' $PAGE
'
' NAME -- PackDate
'
' INPUTS -- PARAMETER MEANING
' Strng$ String Date (mm-dd-yyyy)
'
' OUTPUTS -- Result$ TWO BYTE COMPRESSED DATE FOR USE IN
' A RANDOM RECORD
'
' PURPOSE -- Compress an 8-character date into two characters
'
* ------[ first line different ]------
SUB PackDate (Strng$,Result$) ' RM11159302
IF LEN(Strng$) < 8 THEN _
EXIT SUB
TYear = VAL(MID$(Strng$,7)) ' MSVB/RM041101
WasMM = VAL(Strng$)
WasDD = VAL(MID$(Strng$,4))
CALL TwoByteDate (TYear,WasMM,WasDD,Result$) ' MSVB/RM041101
END SUB
* REPLACING old line(s) by new
59202 ' $SUBTITLE: 'UnPackDate -- subroutine to UNCompress DATE'
' $PAGE
'
' NAME -- UnPackDate
'
' INPUTS -- PARAMETER MEANING
' CompressedDate$ Date in 2 byte compressed form
'
* ------[ first line different ]------
' OUTPUTS -- TYear Year of compressed date ' MSVB/RM041101
' WasMM Month of compressed date
' WasDD Day of compressed date
' DisplayDate$ 8 char display date (mm-dd-yyyy)
'
' PURPOSE -- Uncompress a 2 char date to get Y,M,D & display
'
SUB UnPackDate (CompressedDate$,TYear,WasMM,WasDD,DisplayDate$) ' MSVB/RM041101/RM11159302
CALL GetYMD (CompressedDate$,1,TYear) ' MSVB/RM041101
CALL GetYMD (CompressedDate$,2,WasMM)
CALL GetYMD (CompressedDate$,3,WasDD)
DisplayDate$ = RIGHT$("00" + MID$(STR$(WasMM),2),2) + _
"-" + _
RIGHT$("00" + MID$(STR$(WasDD),2),2) + _
"-" + _
RIGHT$(STR$(TYear),2) ' MSVB/RM041101
END SUB
* REPLACING old line(s) by new
59204 ' $SUBTITLE: 'GetYMD -- subroutine to unpack a two-byte date'
' $PAGE
'
' NAME -- GetYMD
'
' INPUTS -- PARAMETER MEANING
' TwoByte$ PACKED TWO-BYTE DATE FIELD
' YMD 1 = YEAR
' 2 = MONTH
' 3 = DAY
' Result LOCATION TO PLACE THE Result
'
' OUTPUTS -- Result FOUR DIGIT Result OF UNPAKING THE DATE
'
' PURPOSE -- Unpack a compressed two-byte date field
'
* ------[ first line different ]------
SUB GetYMD (TwoByte$,YMD,Result) ' RM11159302
ON YMD GOTO 59206,59210,59215
EXIT SUB
* INSERTING new line(s)
59300 ' $SUBTITLE: 'PersFile - processes requests for personal files'
' $PAGE
'
' NAME -- PersFile
'
' INPUTS -- PARAMETER MEANING
' PersonalCat$ CATEGORY IN DIR FOR CALLER
' ZPersonalLen # CHARS IN PERSONAL CATEGORY
' OUTPUTS -- NONE UP ZDnlds
'
' PURPOSE -- Show caller what personal files have for downloading,
' verify and process requests for downloads
'
SUB PersFile (PersonalCat$,DnldFlag) STATIC
CALL FindIt (ZPersonalDir$)
59302 IF NOT ZOK THEN _
CALL QuickTPut1 (ZEmphasizeOn$ + "No personal files available" +_
ZEmphasizeOff$) : _ ' RM01179401
ZLastIndex = 0 : _
EXIT SUB
CALL Line25 ' RM01199401
GOSUB 59338
IF LOF(2) < WasL THEN _
ZOK = ZFalse : _
GOTO 59302
ZUserIn$(0) = ""
MaxPrint = ZPageLength - 1
ZNonStop = ZNonStop OR (ZPageLength < 1)
ZStopInterrupts = ZFalse
IF Downloading THEN _
Downloading = ZFalse : _
PersIndex = DnldFlag : _
DnldFlag = 0 : _
WasL = ZTrue : _ ' RM02049406
GOTO 59306
GOTO 59305 ' RM01179401
59303 CALL QuickTPut (ZEmphasizeOff$,0)
CALL Line25 ' RM01179401
ZOutTxt$ = "End list. " + "(" + LEFT$("L)ist",-4 * (NOT ZExpertUser) + 1) + LEFT$(",V)iew",-4 * (NOT ZExpertUser) + 2) + _ ' RM02219401
LEFT$(",M)ark",-4 * (NOT ZExpertUser) + 2) + LEFT$(",D)nld file(s)",-12 * (NOT ZExpertUser) + 2) + _
",* = new)" + ZPressEnterExpert$ ' RM01179401/RM01189401/RM01199401/RM02189401
ZMacroMin = 99
ZLastIndex = 1 ' RM03169401
ZStackC = ZTrue
ZTurboKey = -ZTurboKeyUser ' DS02119401
CALL PopCmdStack
IF ZSubParm = -1 OR ZWasQ = 0 THEN _
GOTO 59335 ' RM01199401
59304 CALL AllCaps (ZUserIn$(ZAnsIndex)) ' RM01199401
ON INSTR("LDMV*",ZUserIn$(ZAnsIndex)) GOTO 59342,59330,59326,59350,59327 ' RM01179401/RM01189401/RM01199401/RM01279401
GOTO 59303
59305 PersIndex = PersIndex + ZUpInc ' RM01229401
WasL = ZFalse
59306 IF PersIndex < 1 OR PersIndex > LastRec THEN _ ' RM01229401
IF WasL THEN _
GOTO 59303 _
ELSE _
CALL QuickTPut1 (ZFG5$ + "No Files For You" + ZEmphasizeOff$) : _ ' RM01179401/RM02179401
GOTO 59303
GET #2,PersIndex
PersIndex = PersIndex + ZUpInc ' RM01229401
IF INSTR(PartToPrint$,"\FMS") > 0 THEN _ ' RM01229401
GOTO 59306 ' RM01229401
IF ASC(PrivateCat$) = 32 THEN _
IF ZUserSecLevel < VAL(PrivateCat$) THEN _
GOTO 59306 _
ELSE GOTO 59308
IF INSTR(PrivateCat$,PersonalCat$) = 0 AND NOT ZSysOp THEN _ ' RM02059401
GOTO 59306 ' RM02059401
59308 WasL = ZTrue
59320 ZOutTxt$ = PartToPrint$
IF PersonalStatus$ = "*" AND LEFT$(ZOutTxt$,1) <> " " THEN _
MID$(ZOutTxt$, INSTR(ZOutTxt$," ")) = "*"
CALL TrimTrail (ZOutTxt$," ") ' RM01179401
CALL ColorDir (ZOutTxt$,"Y")
IF ZLocalUser THEN _
GOTO 59322
CALL EofComm (Char)
IF Char <> -1 THEN _
GOTO 59323 ' comm port input
59322 ZKeyboardStack$ = INKEY$
59323 ZSubParm = 5
CALL TPut
IF ZRet THEN _
GOTO 59303
IF ZSubParm = -1 THEN _
GOTO 59335
59324 IF ZLinesPrinted <= MaxPrint THEN _
GOTO 59306
CALL TimeRemain (MinsRemaining)
IF MinsRemaining <= 0 THEN _
ZSubParm = -1 : _
GOTO 59335
CALL Carrier
IF ZSubParm = -1 THEN _
GOTO 59335
IF ZNonStop THEN _
GOTO 59306
59325 IF PersIndex > 0 THEN _
ExtraPrompt$ = LEFT$(",V)iew",-4 * (NOT ZExpertUser) + 2) + LEFT$(",M)ark",-4 * (NOT ZExpertUser) + 2) + _
LEFT$(",D)nld",-4 * (NOT ZExpertUser) + 2) + LEFT$(",* = New",-6 * (NOT ZExpertUser) + 2) : _ ' RM01179401/RM01189401/RM02049401/RM02189401
ELSE GOTO 59303
ZStackC = ZTrue
ZTurboKey = -ZTurboKeyUser ' DS02119401
CALL AskMore (ExtraPrompt$,ZTrue,ZFalse,AbortIndex,ZFalse) ' RM01179401
IF ZSubParm = -1 THEN _
GOTO 59335 _ ' RM01239401
ELSE _ ' RM01239401
ZLastIndex = ZWasQ : _ ' RM01239401
IF NOT ZNo THEN _ ' RM01239401
ZAnsIndex = 1 ' RM01239401
ZNonStop = (ZNonStop OR INSTR(" Cc",ZUserIn$) > 1)
IF (PersIndex < 1 OR PersIndex > LastRec) AND ZWasQ = 0 THEN _ ' RM01229401
GOTO 59335
CALL WipeLine (78)
IF ZNo THEN _
ZLastIndex = 0 : _ ' RM01239401
GOTO 59303
IF ZUserIn$(1) = "*" THEN _ ' RM02049401
GOTO 59327 ' RM02049401
CALL AllCaps (ZUserIn$(1)) ' RM01179401
IF ZUserIn$(1) = "V" THEN _ ' RM01179401
GOTO 59350 ' RM01179401
IF ZUserIn$(1) = "M" THEN _ ' RM01199401
GOTO 59326 ' RM01199401
IF ZUserIn$(1) = "D" THEN _ ' RM01189401
GOTO 59330 ' RM01189401
ZLastIndex = 0 ' RM01189401
GOTO 59306
59326 Temp$ = ZUserIn$(1) ' RM01199401
IsMarking = ZTrue ' RM01209401
GOSUB 59345 ' RM01199401
IF ZFileSysParm = 4 THEN _ ' RM01209401
GOTO 59335 ' RM01209401
GOTO 59306 ' RM01199401/RM01239401
59327 GOSUB 59340 ' handle new files ' RM02049405
ZLastIndex = 0
WHILE PersIndex > 0 AND ZLastIndex < UBOUND(ZUserIn$)
GET 2,PersIndex
IF PersonalCat$ <> PrivateCat$ THEN _
GOTO 59329
IF PersonalStatus$ <> "*" THEN _
GOTO 59329
ZLastIndex = ZLastIndex + 1
WasI = ZLastIndex
GOSUB 59336
IF ZOK THEN _
WasX$ = MID$(STR$(PersIndex),2) : _
ZUserIn$(0) = ZUserIn$(0) + _
WasX$ + _
SPACE$(5 - LEN(WasX$)) _
ELSE ZLastIndex = ZLastIndex - 1
59329 PersIndex = PersIndex - 1
WEND
IF ZLastIndex = 0 THEN _
ZOutTxt$ = ZEmphasizeOn$ + "No new files for you" + ZEmphasizeOff$ : _ ' RM01179401
CALL QuickTPut1 (ZOutTxt$) : _
GOTO 59303
ZAnsIndex = 1
GOTO 59332
59330 Temp$ = "D" ' RM01189401
IsMarking = ZFalse ' RM01209401
GOSUB 59345 ' RM01199401
IF ZFileSysParm = 4 THEN _ ' RM01209401
GOTO 59335 ' RM01209401
IF ZWasQ = 0 THEN _ ' RM01189401
GOTO 59306 ' RM01189401
CALL AllCaps (ZUserIn$(ZAnsIndex)) ' RM01189401
IF ZUserIn$(ZAnsIndex) = "M" THEN _ ' RM01199401
ZWasZ$ = ZUserIn$(ZAnsIndex) : _ ' RM01199401
CALL UnMarkItems (PrivMarkedFiles$,ZAnsIndex,ZLastIndex,FoundMarked,ZTrue) ' RM01199401
SelectedProtocol$ = "" ' RM01199401
IF ZLastIndex > 1 THEN _ ' RM01199401
IF LEN(ZUserIn$(ZLastIndex)) = 1 THEN _ ' RM01199401
SelectedProtocol$ = ZUserIn$(ZLastIndex) : _ ' RM01199401
CALL AllCaps (SelectedProtocol$) : _ ' RM01199401
IF INSTR(ZDefaultXfer$,SelectedProtocol$) = 0 THEN _ ' RM01199401
SelectedProtocol$ = "" _ ' RM01199401
ELSE ZLastIndex = ZLastIndex - 1 ' RM01199401
WasI = ZAnsIndex ' handle list of files ' RM01189401
WHILE WasI <= ZLastIndex
ZOK = ZFalse
WasJ = LastRec + 1
CALL AllCaps (ZUserIn$(WasI))
WasX = INSTR(ZUserIn$(WasI),".")
IF WasX = 0 THEN _
ZUserIn$(WasI) = ZUserIn$(WasI) + "." + ZDefaultExtension$ _
ELSE IF WasX = LEN(ZUserIn$(WasI)) THEN _
ZUserIn$(WasI) = LEFT$(ZUserIn$(WasI),WasX-1)
WHILE WasJ > 1 AND NOT ZOK
WasJ = WasJ - 1
GET #2,WasJ
IF (PersonalCat$ = PrivateCat$ OR ZSysop OR _ ' RM01179401
(ASC(PrivateCat$) = 32 AND _
ZUserSecLevel => VAL(PrivateCat$))) THEN _
MID$(PartToPrint$,13,1) = " " : _
ZOK = (ZUserIn$(WasI) = LEFT$(PartToPrint$,INSTR(PartToPrint$," ") - 1))
WEND
IF ZOK THEN _
GOSUB 59336 : _
IF ZOK THEN _
WasX$ = MID$(STR$(WasJ),2) : _
ZUserIn$(0) = ZUserIn$(0) + _
WasX$ + _
SPACE$(5 - LEN(WasX$))
IF NOT ZOK THEN _
CALL QuickTPut1 (ZFG7$ + ZUserIn$(WasI) + ZFG5$ + " not found - omitted" + _ ' RM01199401
ZEmphasizeOff$) : _ ' RM01179401
FOR WasK = WasI + 1 TO ZLastIndex : _
ZUserIn$(WasK - 1) = ZUserIn$(WasK) : _
NEXT : _
ZLastIndex = ZLastIndex - 1 : _
WasI = WasI - 1
WasI = WasI + 1
WEND
IF ZLastIndex = 0 THEN _
GOTO 59306 ' RM01199401
59332 DnldFlag = PersIndex ' set protocol
Downloading = ZTrue
ZWasB = 1
IF SelectedProtocol$ = "" THEN _
IF ZPersonalProtocol$ <> " " THEN _
SelectedProtocol$ = ZPersonalProtocol$
IF SelectedProtocol$ <> "" THEN _
ZLastIndex = ZLastIndex + 1 : _
ZUserIn$(ZLastIndex) = SelectedProtocol$
EXIT SUB
59335 CLOSE 2
ZLastIndex = 0 ' RM01199401
PrivMarkedFiles$ = "" ' RM01199401
EXIT SUB
59336 ZUserIn$(WasI) = LEFT$(PartToPrint$,INSTR(PartToPrint$," ") - 1)
CALL FindFile (ZPersonalDrvPath$ + ZUserIn$(WasI),ZOK)
IF ZOK THEN _
ZUserIn$(WasI) = ZPersonalDrvPath$ + ZUserIn$(WasI) _
ELSE _ ' RM01199401
CALL RotorsDir (ZUserIn$(WasI),ZSubDir$(),ZSubDirCount + _
((ZUserSecLevel < ZMinSecToView) OR _
NOT ZCanDnldFromUp),ZTrue,"D")
RETURN
59338 CLOSE 2
CALL OpenFMS (LastRec,ZPersonalLen) ' RM01179401
FIELD #2,33 + ZMaxDescLen AS PartToPrint$, _
ZPersonalLen AS PrivateCat$, _
1 AS PersonalStatus$, _
2 AS Filler$
59340 IF ZUpInc = -1 THEN _ ' RM01229401
PersIndex = LastRec + 1 _ ' RM01229401
ELSE _ ' RM01229401
PersIndex = 0 ' RM01229401
RETURN
59342 GOSUB 59340 ' RM01279401
GOTO 59305 ' RM01279401
59345 ZLastIndex = ZWasQ ' RM01239401
ZAnsIndex = 1 ' RM01239401
CALL AskItems ("DM",Temp$,IsMarking,"file",PrivMarkedFiles$,ZPersonalDnld) ' RM01179401/RM01209401/RM01239401
RETURN ' RM01179401
59350 ZLastIndex = ZWasQ ' RM01179401
ZAnsIndex = 1 ' RM01179401
CALL GetArc ' RM01179401
59360 ZWasA = PersIndex ' RM01179401
GOSUB 59338 ' RM01179401
PersIndex = ZWasA ' RM01179401
GOTO 59306 ' RM01179401
END SUB
* REPLACING old line(s) by new
59400 ' $SUBTITLE: 'LogPDown -- subroutine to record private downloads'
' $PAGE
'
' NAME -- LogPDown
'
' INPUTS -- PARAMETER MEANING
'
' OUTPUTS --
'
' PURPOSE -- Puts a "!" in place of an "*" in private directory
' after downloaded
'
SUB LogPDown (PrivateDnld,DwnIndex) STATIC
IF NOT PrivateDnld THEN _
EXIT SUB
ZWasEN$ = ZActiveFMSDir$
WasBX = &H4
ZSubParm = 9
CALL FileLock
* ------[ first line different ]------
CALL OpenRand2 (ZWasEN$,ZFMSFileLength,2) ' RM01139402
IF ZErrCode > 0 THEN _
GOTO 59405
FIELD #2,ZFMSFileLength AS PersonalRec$
L = LEN(ZUserIn$(0))
FOR Temp = 1 TO ZDownFiles
X = 5 * (DwnIndex - Temp) + 1
IF X > 0 AND X < L THEN _
ZWasA = VAL(MID$(ZUserIn$(0),X,5)) : _
IF ZWasA > 0 THEN _
GET #2,ZWasA : _
MID$(PersonalRec$,ZFMSFileLength-2,1) = "!" : _
PUT #2,ZWasA
NEXT
* REPLACING old line(s) by new
* ------[ first line different ]------
59492 CALL QuickTPut1 (ZFG5$ + "No such option <" + ZFG7$ + ZWasZ$ + _
ZFG5$ + ">" + ZEmphasizeOff$) ' RM052001
Call FlushKeys
GOTO 59460
END SUB
* REPLACING old line(s) by new
59510 ZFileName$ = CurMenu$
InMenu = ZTrue
CALL BreakFileName (FrontOpt$,WasX$,FrontPre$,ZWasDF$,ZTrue)
CALL BreakFileName (CurMenu$,MenuDrv$,WasX$,ZWasDF$,ZTrue)
MenuFront$ = MenuDrv$ + LEFT$(WasX$,LEN(WasX$)-LEN(PreSuf$))
IF CurMenu$ = LastSubMenu$ THEN _
MenuFront$ = LEFT$(MenuFront$,LEN(MenuFront$)-1)
CALL Graphic (ZFileName$)
CurMenuVer$ = ZFileName$
ZStopInterrupts = ZFalse
* ------[ first line different ]------
* INSERTING new line(s)
59514 IF ZAnsIndex < ZLastIndex OR ZExpertUser THEN _ ' KG011501
GOTO 59520
* REPLACING old line(s) by new
* ------[ first line different ]------
59520 CALL Line25 ' RM01239401
ZOutTxt$ = PassedPrompt$ 'get response
CALL PopCmdStack
IF ZWasQ = 0 OR ZSubParm = -1 THEN _
EXIT SUB
* REPLACING old line(s) by new
59532 GOSUB 59547
* ------[ first line different ]------
GOTO 59514 ' KG011501
* REPLACING old line(s) by new
* ------[ first line different ]------
59547 CALL QuickTPut1 (ZFG6$ + "No such option " + ZFG7$ + ZWasZ$ + ZEmphasizeOff$) ' RM052301
ZLastIndex = 0
IF VerifyInMenu AND InMenu AND NOT RequireInMenu THEN _
CALL UpdtCalr("Option " + ZWasZ$ + " on menu " + _
CurMenu$ + " but not found",1)
RETURN
* REPLACING old line(s) by new
59698 ' $SUBTITLE: 'MsgImport -- subroutine to import a message'
' $PAGE
'
' NAME -- MsgImport
'
' INPUTS -- PARAMETER MEANING
' MaxLines MAXIMUM # OF LINES
' MaxLen MAXIMUM LENGTH OF A LINE
' NumLines NUMBER OF LINES ALREADY IN MESSAGE
' LineAra$ ARRAY OF LINES IN MESSAGE
'
' OUTPUTS -- NumLines
' LineAra$
'
' PURPOSE -- Allows local user to append a text file to
' a message. Will word wrap if needed.
'
SUB MsgImport (MaxLines,MaxLen,NumLines,LineAra$(1)) STATIC
* ------[ first line different ]------
IF ZWelcomeAboard THEN _ ' NEWU174
ZUserIn$ = "WELCOME.DEF" : _ ' NEWU174
GOTO 59701 ' NEWU174
IF NOT (ZLocalUser OR ZSysop) THEN _
CALL QuickTPut1 ("Only for SysOps/local users") : _
EXIT SUB
* REPLACING old line(s) by new
59700 ZOutTxt$ = "Import what file" + ZPressEnter$
CALL PopCmdStack
IF ZSubParm = -1 OR ZWasQ = 0 THEN _
EXIT SUB
CALL FindIt (ZUserIn$(ZAnsIndex))
IF NOT ZOK THEN _
CALL QuickTPut1 (ZUserIn$(ZAnsIndex) + " not found") : _
GOTO 59700
* ------[ first line different ]------
* INSERTING new line(s)
59701 IF ZWelcomeAboard THEN _ ' NEWU174
CALL FindIt (ZUserIn$) ' NEWU174
WHILE NOT EOF(2) AND NumLines < MaxLines
NumLines = NumLines + 1
LINE INPUT #2,LineAra$(NumLines)
WEND
CLOSE 2
CALL WordWrap (MaxLen,NumLines,LineAra$())
END SUB
* REPLACING old line(s) by new
59704 CALL TrimTrail (LineAra$(WasJ)," ")
WasK = LEN(LineAra$(WasJ))
IF WasK <= MaxLen THEN _
GOTO 59705
CALL FindLast (LineAra$(WasJ)," ",LastPos,HowMany)
* ------[ first line different ]------
IF MID$(LineAra$(WasJ), 3, 1) = ">" THEN _ ' QUOT174
CALL AnyBut (LineAra$(WasJ),3,">",WasX) _ ' QUOT174
ELSE _ ' QUOT174
CALL AnyBut (LineAra$(WasJ),1,">",WasX) ' QUOT174
IF WasX = 0 THEN WasX = 2
IF MID$(LineAra$(WasJ + 1),3,1) = ">" THEN _ ' QUOT174
CALL AnyBut (LineAra$(WasJ + 1),3,">",Temp) _ ' QUOT174
ELSE _ ' QUOT174
CALL AnyBut (LineAra$(WasJ+1),1,">",Temp) ' QUOT174
IF LEFT$(LineAra$(WasJ + 1),2) = " " OR ((Temp > 0) AND WasX <> Temp) THEN _
FOR WasK = NumLines TO WasJ + 1 STEP -1 : _
LineAra$(WasK + 1) = LineAra$(WasK) : _
NEXT : _
NumLines = NumLines + 1 : _
LineAra$(WasJ + 1) = ""
IF WasX > 1 THEN _
IF MID$(LineAra$(WasJ),WasX,1) = " " THEN _
WasX = WasX + 1
WasX$ = LEFT$(LineAra$(WasJ),WasX-1)
IF LastPos < SplitOn THEN _
LineAra$(WasJ + 1) = WasX$ + MID$(LineAra$(WasJ),MaxLen) + MID$(LineAra$(WasJ + 1),WasX) : _
LineAra$(WasJ) = LEFT$(LineAra$(WasJ),MaxLen - 1) + "-" _
ELSE ZUserIn$ = LEFT$(" ", - (LEN(LineAra$(WasJ + 1)) > 0)) : _
LineAra$(WasJ + 1) = WasX$ + MID$(LineAra$(WasJ),LastPos + 1) + ZUserIn$ + MID$(LineAra$(WasJ + 1),WasX) : _
LineAra$(WasJ) = LEFT$(LineAra$(WasJ),LastPos - 1)
ReFormatted = ZTrue
GOTO 59704
* REPLACING old line(s) by new
59850 ' $SUBTITLE: 'ConfMail -- quickly checks mail waiting'
' $PAGE
'
' NAME -- ConfMail
'
' INPUTS -- PARAMETER MEANING
' SKIP.CONFIRM Whether to skip confirm of option
' ZConfMailList$ File of user/message pairs to check
' ZActiveUserFile$ Active user file (restored on exit)
' ZActiveMessageFile$ Active msg file (restored)
' OUTPUTS -- None
'
' PURPOSE -- Quicking scans message header record to get
' last msg # and user record to get whether any
' new mail and last msg read, reports both, using
' highlighting if new mail to caller.
'
SUB ConfMail (MailCheckConfirm,LinkNew,LinkPers) STATIC
SkipJoinUnjoin = ZNonStop OR LinkNew OR LinkPers
IF ZStartHash = 1 AND ZUserFileIndex > 0 THEN _
CALL FindIt (ZConfMailList$) _
ELSE ZOK = ZFalse
IF NOT ZOK THEN _
EXIT SUB
IF PrevMailList$ <> ZConfMailList$ THEN _
SkipParms = 0
PrevMailList$ = ZConfMailList$
IF MailCheckConfirm THEN _
* ------[ first line different ]------
ZOutTxt$ = ZFG6$ + "Check conferences for mail/uploads ([Y]" + _
ZFG6$ + ",N)" + ZEmphasizeOff$ : _ ' RM052601
ZTurboKey = -ZTurboKeyUser : _
CALL PopCmdStack : _
IF ZNo OR ZSubParm < 0 THEN _
EXIT SUB
HaveMailFile% = ZFalse ' SG082101
CALL BreakFileName (ZActiveUserFile$,WasX$,NowInPre$,NowInExt$,ZFalse)
CALL BreakFileName (ZOrigUserFile$,WasX$,OrigPre$,OrigExt$,ZFalse)
CALL SkipLine (1)
CALL QuickTPut1 (ZFG7$ + "Checking Message Bases... (* = linked)" + ZEmphasizeOff$) ' RM051801
IF LinkNew OR LinkPers THEN _
ZLinkedConf$ = ""
AnyMail = ZFalse
ZStopInterrupts = ZFalse
WasA1$ = ZActiveUserFile$
MsgFileSave$ = ZActiveMessageFile$
TempIndivValue$ = ""
UserFileIndexSave = ZUserFileIndex
UserRecordHold$ = ZUserRecord$
ZOK = ZTrue
CALL ReadParms (ZWorkAra$(),1,SkipParms)
IF SkipParms = 0 THEN _
LogicalEOF$ = "" _
ELSE LogicalEOF$ = ZWorkAra$(1)
* REPLACING old line(s) by new
59852 IF InCur THEN _
FileWait = ZFileWaiting : _
WasX = ZMailWaiting : _
ZWasA = ZLastMsgRead _
ELSE ZWasA = CVI(MID$(ZUserRecord$,51,2))
ZWasB = VAL(LEFT$(ZMsgRec$,8))
WasZ = (ZWasB - ZWasA)
IF WasZ < 0 THEN _
ZWasA = 0 : _
WasZ = ZWasB _
ELSE IF WasZ = 0 THEN _
WasX = ZFalse
ZWasSL = LEN(CurPre$)
IF CurPre$ = "USERS" AND CurExt$ = "" THEN _
Conf$ = "MAIN" _
ELSE Conf$ = LEFT$(CurPre$,ZWasSL-1)
ZOutTxt$ = MID$(STR$((ZWasB > ZWasA) * WasZ),2)
Temp = LEN(ZOutTxt$)
* ------[ first line different ]------
ZOutTxt$ = SPACE$(-(Temp<4) * (4-Temp)) + ZOutTxt$
ConMsg = VAL(ZOutTxt$) ' TR07099301/SG082121
IF ConMsg = 0 THEN _ ' SG082101
ZOutTxt$ = ZFG6$ + " No" _ ' SG082101
ELSE _ ' SG082101
ZOutTxt$ = ZFG7$ + ZOutTxt$ ' SG082101
IF (WasZ > 0 AND LinkNew) OR (WasX AND LinkPers) THEN _
IF (NOT InCur) THEN _
CALL AddLink (Conf$)
Temp = (INSTR(ZCarriageReturn$ + ZLinkedConf$,ZCarriageReturn$ + Conf$ + ZCarriageReturn$) > 0)
ZWasY$ = MID$(" *",1-Temp,1) + Conf$ + SPACE$(-(ZWasSL<8) * (8-ZWasSL))
IF WasX THEN _
WasX$ = ZEmphasizeOn$ + "Some to you" + ZEmphasizeOff$ _ ' SG082101
ELSE WasX$ = " " ' SG082101
IF FileWait THEN _
Temp$ = " - " + ZEmphasizeOn$ + "Personal file(s)" + ZEmphasizeOff$ _ ' SG082101
ELSE Temp$ = ""
ZSubParm = 5 ' SG082101
IF ConMsg OR ZFF = 16 OR FileWait THEN _ ' TR07099301/SG082101
ZOutTxt$ = ZFG5$ + ZWasY$ + ": " + ZOutTxt$ + ZFG6$ + _ ' TR07099301/SG082101
" new message(s) " + ZEmphasizeOff$ + WasX$ + Temp$ : _ ' TR07099301/SG082101
CALL TPut : _ ' TR07099301/SG082101
HaveMailFile% = ZTrue ' SG082101
ZJumpSupported = ZFalse
IF SkipJoinUnjoin OR WasZ = 0 THEN _
CALL AskMore ("",ZTrue,ZTrue,WasX,ZTrue) : _
GOTO 59853
ZTurboKey = -ZTurboKeyUser
CALL AskMore (",J)oin,U)njoin,L)ink,D)elink",ZTrue,ZFalse,WasX,ZFalse)
IF ZNo THEN _
GOTO 59856
WasX$ = LEFT$(ZUserIn$(1),1)
CALL AllCaps (WasX$)
IF WasX$ = "J" THEN _
ZLastIndex = ZWasQ : _
ZHomeConf$ = Conf$ : _
GOTO 59856
IF WasX$ = "D" THEN _
CALL DeLink (Conf$) : _
GOTO 59852
IF WasX$ = "L" THEN _
CALL AddLink (Conf$) : _
GOTO 59852
IF WasX$ = "U" THEN _
IF InCur OR (OrigPre$ = CurPre$ AND OrigExt$ = CurExt$) THEN _
CALL QuickTPut1 ("Can't omit yourself from the board or conference you're in") _
ELSE LSET ZUserRecord$ = CHR$(0) + "deleted user" : _
ZUserFileIndex = HoldUserFileIndex : _
ZSubParm = 6 : _
CALL FileLock : _
PUT 5, HoldUserFileIndex : _
ZSubParm = 8 : _
CALL FileLock : _
CALL QuickTPut1 ("Omitted you from " + Conf$)
* REPLACING old line(s) by new
59856 ZActiveUserFile$ = WasA1$
CALL OpenUser (ZHighestUserRecord)
FIELD 5, 128 AS ZUserRecord$
IF (NOT ZRet) AND NOT AnyMail THEN _
* ------[ first line different ]------
CALL QuickTPut1 (ZFG6$ + " You have not joined any conferences" + _
ZEmphasizeOff$) _ ' SG082101
ELSE _ ' SG082101
IF NOT HaveMailFile% THEN _ ' SG082101
CALL QuickTPut1 (ZFG6$ + " There is no new mail" + ZEmphasizeOff$) ' SG082101
ZUserFileIndex = UserFileIndexSave
LSET ZUserRecord$ = UserRecordHold$
ZActiveMessageFile$ = MsgFileSave$
CALL OpenMsg
FIELD 1, 128 AS ZMsgRec$
GET 1,1
ZNonStop = (ZPageLength < 1)
WasX$ = ZUserIn$(ZAnsIndex+1)
CALL AllCaps (WasX$)
ZAnsIndex = ZAnsIndex - (WasX$ = "C")
SkipParms = -(NOT EOF(2))*SkipParms
LinkNew = ZFalse
LinkPers = ZFalse
CLOSE 2 ' KG012501
END SUB
* REPLACING old line(s) by new
59860 CALL QuickTPut (ZEmphasizeOff$,0)
IF CantInterrupt THEN _
ZTurboKey = 2 : _
ZForceKeyboard = ZTrue : _
* ------[ first line different ]------
ZOutTxt$ = ZEmphasizeOn$ + "Press any key to continue" + ZEmphasizeOff$ _
ELSE GOSUB 59870 : _
ZOutTxt$ = ZMorePrompt$ + Temp$ + ExtraPrompt$ + LEFT$(")",-ZExpertUser) ' RM02179401
WasX = LEN(ZOutTxt$) + 2
ZNoAdvance = OverWrite
CALL Line25 ' RM01239401/RM02149401/RM02249401
ZSubParm = 1
IF ExtraPrompt$ = "" AND ZTurboKey = 0 THEN _
ZTurboKey = -ZTurboKeyUser
ZMacroMin = 2
CALL TGet
IF ZSubParm = -1 THEN _
EXIT SUB
ZTurboKey = ZFalse
ZWasDF$ = ZUserIn$ (1)
CALL AllCaps (ZWasDF$)
WasI = INSTR(";C;A;",";"+ZWasDF$+";")
IF WasI = 1 THEN _
ZNonStop = ZTrue : _
ZWasQ = 0
CALL WipeLine (WasX + LEN(ZUserIn$))
IF NOT ZHiLiteOff THEN _
CALL QuickTPut (ZLastSmartColor$,0)
IF CantInterrupt THEN _
ZNo = ZFalse : _
EXIT SUB
IF WasI = 3 THEN _
ZLastIndex = 0 : _
AbortIndex = 32000
IF ZNo THEN _
ZKeyboardStack$ = "" : _
ZCommPortStack$ = "" : _
ZLastSmartColor$ = ""
IF NOT ZJumpSupported THEN _
EXIT SUB
IF ZWasDF$ = "J" THEN _
IF ZWasQ > 1 THEN _
ZUserIn$ = ZUserIn$(2) : _
GOTO 59866 _
ELSE ZOutTxt$ = "Jump to what text" + ZPressEnterExpert$ : _
CALL PopCmdStack : _
IF ZWasQ = 0 THEN _
EXIT SUB _
ELSE GOTO 59866
IF ZWasDF$ <> "R" THEN _
EXIT SUB
ZUserIn$ = ZJumpLast$
* REPLACING old line(s) by new
59880 ' $SUBTITLE: 'CompDate -- subroutine to compute elased days'
' $PAGE
'
' NAME -- CompDate
'
' INPUTS -- PARAMETER MEANING
* ------[ first line different ]------
' TYear YEAR ' MSVB/RM041101
' WasMM MONTH
' WasDD DAY
' Result! LOCATION TO PLACE THE Result
'
' OUTPUTS -- Result! COMPUTE COMPUTATIONAL DATE
'
' PURPOSE -- Computes a computational date from YEAR, MONTH, DAY.
' Results may be used to compute the number of elapsed
' days between two dates. You may pass a 2 or 4 digit
' year, but for meaningful results, be consistent
'
SUB CompDate (TYear,WasMM,WasDD,Result!) STATIC ' MSVB/RM041101
IF WasMM < 1 OR WasMM > 12 THEN _
WasMM = 1
Result! = TYear * 365.0 + _ ' MSVB/RM041101
INT((TYear - 1) / 4) + _ ' MSVB/RM041101
(WasMM - 1) * 28 + _
VAL(MID$("000303060811131619212426",(WasMM - 1) * 2 + 1,2)) - _
((WasMM > 2) AND ((TYear MOD 4) = 0)) + _ ' MSVB/RM041101
WasDD
END SUB
* REPLACING old line(s) by new
* ------[ first line different ]------
59922 Temp$ = ZEscape$ + "[0" + MID$(ZDR4$,4,(LEN(ZDR4$) - 3)) ' RM032401
Strng$ = Temp$ + Strng$ ' RM032401
EXIT SUB
* REPLACING old line(s) by new
59934 ' $SUBTITLE: 'SetHiLite - subroutine to reset highlight preference'
' $PAGE
'
' NAME -- SetHiLite
'
' INPUTS -- PARAMETER MEANING
' SetTo New value (True or False)
' ZEmphasizeOnDef$ String turns emphasize on
' ZEmphasizeOffDef$ String turns emphasize off
'
' OUTPUTS -- ZHiLiteOff Callers preference on Hilite
' ZEmphasizeOn$ String to use for emphasis
' ZEmphasizeOff$ String to use after emphasis
'
SUB SetHiLite (SetTo) STATIC
ZHiLiteOff = (ZEmphasizeOnDef$ <> "" AND SetTo)
* ------[ first line different ]------
IF ZHiLiteOff THEN ' RM11149301
ZEmphasizeOn$ = ""
ZEmphasizeOff$ = ""
ZFG1$ = "" ' RM11149301
ZFG2$ = ""
ZFG3$ = ""
ZFG4$ = ""
ZFG5$ = ""
ZFG6$ = ""
ZFG7$ = ""
ZFG8$ = ""
ZFG9$ = ""
ZFGA$ = ""
ZFGB$ = ""
ZFGC$ = ""
ZFGD$ = ""
ZFGE$ = ""
ZFGF$ = ""
ZBG0$ = ""
ZBG1$ = ""
ZBG2$ = ""
ZBG3$ = ""
ZBG4$ = ""
ZBG5$ = ""
ZBG6$ = ""
ZBG7$ = ""
ELSE ' RM11149301
ZEmphasizeOn$ = ZEmphasizeOnDef$ ' RM11149301
ZFG1$ = ZFG1Def$ ' RM11159301
ZFG2$ = ZFG2Def$ ' RM11159301
ZFG3$ = ZFG3Def$ ' RM11159301
ZFG4$ = ZFG4Def$ ' RM11159301
ZFG5$ = ZFG5Def$ ' RM11159301
ZFG6$ = ZFG6Def$ ' RM11159301
ZFG7$ = ZFG7Def$ ' RM11159301
ZFG8$ = ZFG8Def$ ' RM11159301
ZFG9$ = ZFG9Def$ ' RM11159301
ZFGA$ = ZFGADef$ ' RM11159301
ZFGB$ = ZFGBDef$ ' RM11159301
ZFGC$ = ZFGCDef$ ' RM11159301
ZFGD$ = ZFGDDef$ ' RM11159301
ZFGE$ = ZFGEDef$ ' RM11159301
ZFGF$ = ZFGFDef$ ' RM11159301
ZBG0$ = ZBG0Def$ ' RM11159301
ZBG1$ = ZBG1Def$ ' RM11159301
ZBG2$ = ZBG2Def$ ' RM11159301
ZBG3$ = ZBG3Def$ ' RM11159301
ZBG4$ = ZBG4Def$ ' RM11159301
ZBG5$ = ZBG5Def$ ' RM11159301
ZBG6$ = ZBG6Def$ ' RM11159301
ZBG7$ = ZBG7Def$ ' RM11159301
ENDIF
END SUB
* REPLACING old line(s) by new
59943 WasY = INSTR(WasX,Strng$,">")
IF WasY < 1 THEN _
GOTO 59945
CALL Bracket (Strng$,WasX,WasY,ZFG4$,ZEmphasizeOff$)
WasY = INSTR(Strng$," ")
IF WasY > 1 AND WasY < WasX THEN _
Strng$ = ZFG1$ + Strng$ : _
WasZ = INSTR(WasY+1,Strng$," ") : _
IF WasZ > 1 AND WasZ < WasX+LEN(ZFG1$) THEN _
* ------[ first line different ]------
Strng$ = LEFT$(Strng$,WasZ) + ZFG2Def$ + MID$(Strng$,WasZ+1) + ZEmphasizeOff$ ' RM02179401
EXIT SUB
* REPLACING old line(s) by new
59945 WasX = 1
* ------[ first line different ]------
IF INSTR(Strng$,"More") > 0 THEN _ ' RM02189401
Strng$ = ZFG4$ + LEFT$(Strng$,4) + ZEmphasizeOff$ + MID$(Strng$,5) ' RM02189401
IF INSTR(Strng$,"End list.") > 0 THEN _ ' RM02219401
Strng$ = ZFG4$ + LEFT$(Strng$,9) + ZEmphasizeOff$ + MID$(Strng$,10) ' RM02219401
DidInsert = ZFalse
WasL = LEN(ZFG4$)
* REPLACING old line(s) by new
59980 ' $SUBTITLE: 'SetGraphic - Sets user graphic preference'
' $PAGE
'
' NAME -- SetGraphic
'
' INPUTS -- PARAMETER MEANING
' GraphicsNumber 0=None, 1=Ascii, 2=color
'
' OUTPUTS -- ZWasGR Shared var - set to
' graphics.number
' ZUserGraphicDefault$ What add to file name to
' see if got graphics file ver
'
' PURPOSE -- Sets file graphics preference
'
SUB SetGraphic (GraphicsNumber) STATIC
ZWasGR = GraphicsNumber
IF ZWasGR = 2 THEN _
ZDR1$ = ZFG1Def$ : _
ZDR2$ = ZFG2Def$ : _
ZDR3$ = ZFG3Def$ : _
* ------[ first line different ]------
ZDR4$ = ZFG4Def$ : _ ' RM11159301
ZDR5$ = ZFG5Def$ : _ ' RM11159301
ZDR6$ = ZFG6Def$ : _ ' RM11159301
ZDR7$ = ZFG7Def$ : _ ' RM11159301
ZDR8$ = ZFG8Def$ : _ ' RM11159301
ZDR9$ = ZFG9Def$ : _ ' RM11159301
ZDRA$ = ZFGADef$ : _ ' RM11159301
ZDRB$ = ZFGBDef$ : _ ' RM11159301
ZDRC$ = ZFGCDef$ : _ ' RM11159301
ZDRD$ = ZFGDDef$ : _ ' RM11159301
ZDRE$ = ZFGEDef$ : _ ' RM11159301
ZDRF$ = ZFGFDef$ _ ' RM11159301
ELSE ZDR1$ = "" : _
ZDR2$ = "" : _
ZDR3$ = "" : _
ZDR4$ = "" : _ ' COLR174
ZDR5$ = "" : _ ' COLR174
ZDR6$ = "" : _ ' COLR174
ZDR7$ = "" : _ ' COLR174
ZDR8$ = "" : _ ' COLR174
ZDR9$ = "" : _ ' RM11159301
ZDRA$ = "" : _ ' RM11159301
ZDRB$ = "" : _ ' RM11159301
ZDRC$ = "" : _ ' RM11159301
ZDRD$ = "" : _ ' RM11159301
ZDRE$ = "" : _ ' RM11159301
ZDRF$ = "" ' RM11159301
IF ZRIPTest = ZTrue THEN _ ' RM07159301/RIP
ZUserGraphicDefault$ = "R" _ ' RM07159301/RIP
ELSE _ ' RM07159301/RIP
ZUserGraphicDefault$ = MID$(" GC",ZWasGR+1, - (ZWasGR > 0)) ' RM07159301/RIP
END SUB
* REPLACING old line(s) by new
60135 MetaVal$ = MID$(Strng$,WasX+1,WasY-WasX-1)
* ------[ first line different ]------
WasI = INSTR(" BAUD CBAUD PORT PORT# PARITYPROTO NODE FILE UPDIR ",MetaVal$) ' BTCH174
IF WasI = 0 OR LEN(MetaVal$) < 4 THEN _
WasY = WasX + 1 : _
GOTO 60131
WasJ = (WasI-1)\6 + 1
WasK = (WasI+4)\6 + 1
IF WasK > WasJ THEN _
EXIT SUB
ON WasJ GOTO 60155, _
60137, _
60138, _
60139, _
60141, _
60143, _
60145, _
60147, _
60149, _
60150, _ ' BTCH174
60151
* REPLACING old line(s) by new
* ------[ first line different ]------
60149 IF ZWasBatchTransfer AND NOT ZHighSpeedTransfer THEN _ ' BTCH174
WorkHold$ = ZUpldSubDir$ + "\" : _ ' BTCH174
GOTO 60151 ' BTCH174
IF ZBatchTransfer OR ZHighSpeedTransfer THEN _ ' BTCH174
WorkHold$ = "@" + ZDownloadWorkFile$ _ ' BTCH174
ELSE _ ' BTCH174
WorkHold$ = ZFileName$ ' BTCH174
GOTO 60151
* INSERTING new line(s)
60150 WorkHold$ = ZUpldSubDir$ ' BTCH174
GOTO 60151 ' BTCH174
* REPLACING old line(s) by new
60300 ' $SUBTITLE: 'AutoPage - NOTIFIES ZSysop WHEN SPECIFIC USER CALLS'
' $PAGE
'
' NAME -- AutoPage 'Contributed by Gregg and Bob Snyder
' 'and RoseMarie Siddiqui
'
' INPUTS -- ZAutoPageDef$ List of conditions that trigger
' notification and how
'
' OUTPUTS -- NONE
'
' PURPOSE -- Search ZAutoPageDef$ for match on whether
' on name, security level, whether new user.
' Also controls whether caller notified and
' number of times sysop has bell rung.
' And what tune to play (if any).
'
SUB AutoPage STATIC
CALL FindIt (ZAutoPageDef$)
IF NOT ZOK THEN _
EXIT SUB
ZErrCode = 0
ZOK = ZFalse
WHILE NOT EOF(2) AND ZOK = ZFalse AND ZErrCode = 0
CALL ReadParms (ZWorkAra$(),4,1)
IF ZErrCode = 0 THEN _
ZOK = (ZWorkAra$(1) = ZActiveUserName$) : _
IF NOT ZOK THEN _
IF ZNewUser AND ZWorkAra$(1) = "NEWUSER" THEN _
ZOK = ZTrue _
ELSE IF LEFT$(ZWorkAra$(1),1) = "/" AND LEN(ZWorkAra$(1)) > 2 THEN _
ZWasB = INSTR (2,ZWorkAra$(1),"/") : _
IF ZWasB > 0 AND LEN(ZWorkAra$(1)) > ZWasB THEN _
IF ZUserSecLevel <= VAL(MID$(ZWorkAra$(1),ZWasB+1)) AND _
ZUserSecLevel >= VAL(MID$(ZWorkAra$(1),2)) THEN _
ZOK = ZTrue
WEND
CLOSE 2
IF ZErrCode > 0 OR NOT ZOK THEN _
ZErrCode = 0 : _
EXIT SUB
ZPageStatus$ = "AP!"
IF LEFT$(ZWorkAra$(2),1) = "N" THEN _
* ------[ first line different ]------
ZOutTxt$ = "Telling SysOp you're on..." : _
CALL RingCaller
ZWasB = (ZWorkAra$(4) = "")
ZWorkAra$(5) = ""
TempSnoop = ZSnoop
ZSnoop = ZTrue
CALL Line25
FOR WasI = 1 TO VAL(ZWorkAra$(3))
IF ZWasB THEN _
CALL LPrnt (ZBellRinger$,0) : _
ELSE ZWorkAra$(5) = ZWorkAra$(5) + "O4 X" + VARPTR$(ZWorkAra$(4))
NEXT
IF NOT ZWasB THEN _
CALL RBBSPlay (ZWorkAra$(5))
ZSnoop = TempSnoop
END SUB
* REPLACING old line(s) by new
62540 ' $SUBTITLE: 'RptTime -- Reports time on system'
' $PAGE
'
' NAME -- RptTime
'
' INPUTS -- PARAMETER MEANING
'
' OUTPUTS --
'
' PURPOSE -- Tells user time used on system
'
SUB RptTime STATIC
CALL SkipLine (1)
CALL GetTime
CALL AMorPM
Mins = (ZSessionHour * 60) + ZSessionMin
CALL Carrier
IF ZSubParm = -1 THEN _
EXIT SUB
* ------[ first line different ]------
CALL QuickTPut1 (ZFG5$ + "It's Now: " + ZFG7$ + DATE$ + ZFG5$ + " at " + _
ZFG7$ + TIME$ + ZEmphasizeOff$) ' RM051901
CALL QuickTPut1 (ZFG5$ + "Time On:" + ZFG7$ + STR$(Mins) + ZFG5$ + " mins," + _
ZFG7$ + STR$(ZSessionSec) + ZFG5$ + " secs" + ZEmphasizeOff$) ' RM051901
CALL Talk (7,ZOutTxt$)
END SUB
* REPLACING old line(s) by new
62620 ' $SUBTITLE: 'Transfer - Subroutine for external protocols'
' $PAGE
'
' NAME -- Transfer
'
' INPUTS -- PARAMETER MEANING
' ZTransferFunction = 1 DOWNLOAD FILE TO USER
' = 2 UPLOAD FILE TO RBBS-PC
' ZFileName$ NAME OF FILE FOR Transfer
' ZComPort$ NAME OF COMMUNICATIONS PORT
' TO BE USED BY KERMIT (COM1
' OR COM2)
' ZBPS = -1 FOR 300 BAUD
' = -2 FOR 450 BAUD
' = -3 FOR 1200 BAUD
' = -4 FOR 2400 BAUD
' = -5 FOR 4800 BAUD
* ------[ first line different ]------
' = -6 FOR 7200 BAUD
' = -7 FOR 9600 BAUD
' = -8 FOR 12000 BAUD
' = -9 FOR 14400 BAUD
' = -10 FOR 16800 BAUD ' BB08219301
' = -11 FOR 19200 BAUD
' = -12 FOR 21600 BAUD ' BB09039301
' = -13 FOR 24000 BAUD
' = -14 FOR 26400 BAUD
' = -15 FOR 28800 BAUD ' BB08219301/BB09039301
' = -16 FOR 38400 BAUD ' BB09039301
' = -17 FOR 57600 BAUD ' BB08219301
' = -18 FOR 115200 BAUD ' BB09039301
'
' OUTPUTS -- NONE
'
' PURPOSE -- To transfer files using external protocols
'
SUB Transfer STATIC
IF ZUpBatchTransfer THEN _ ' BTCH174
EXIT SUB ' BTCH174
IF ZPrivateDoor THEN _
CALL PrivDoorRtn : _
EXIT SUB
IF ZTransferFunction = 1 THEN _
ZUserIn$ = ZDownTemplate$ : _
ZWasZ$ = "send: " _ ' RM092101
ELSE IF ZTransferFunction = 2 THEN _
ZUserIn$ = ZUpTemplate$ : _
ZWasZ$ = "receive: " ' RM092101
CALL MetaGSR (ZUserIn$,ZFalse)
CALL QuickTPut1 (ZFG5$ + "Protocol : " + ZFG7$ + ZProtoPrompt$ + ZEmphasizeOff$)
CALL QuickTPut (ZFG5$ + "Ready to " + ZWasZ$ + ZEmphasizeOff$,0) ' RM092101
IF ZBatchTransfer OR (ZWasBatchTransfer AND NOT ZHighSpeedTransfer) THEN _ ' BTCH174
CALL QuickTPut1 (ZFG7$ + "(BATCH)" + ZEmphasizeOff$) ' BTCH174
IF (ZWasBatchTransfer AND NOT ZHighSpeedTransfer) OR ZTransferFunction = 2 THEN _ ' BTCH174
Temp$ = ZUploadWorkFile$ : _ ' BTCH174
GOTO 62621 ' BTCH174
IF ZBatchTransfer OR ZHighSpeedTransfer THEN _ ' BTCH174
Temp$ = ZDownloadWorkFile$ _ ' BTCH174
ELSE _ ' BTCH174
CALL QuickTPut1 (ZFG7$ + ZFileNameHold$ + ZEmphasizeOff$) : _ ' BTCH174/RM092101
GOTO 62622 ' BTCH174
* INSERTING new line(s)
62621 CALL OpenWork (2,Temp$) ' BTCH174
WHILE NOT EOF(2)
CALL ReadAny
CALL BreakFileName (ZOutTxt$,ZWasZ$,ZWasY$,WasX$,ZTrue)
CALL QuickTPut1 (ZFG7$ + " " + ZWasY$+WasX$ + ZEmphasizeOff$) ' BTCH174
WEND
62622 CALL PrivDoorRtn ' BTCH174
END SUB
* REPLACING old line(s) by new
62624 ' $SUBTITLE: 'PrivDoorRtn - subroutine to exit as a private door.'
' $PAGE
'
' NAME -- PrivDoorRtn
'
' INPUTS -- PARAMETER MEANING
' ZTransferFunction = 1 DOWNLOAD FILE TO USER
' = 2 UPLOAD FILE TO RBBS-PC
' = 3 USER REGISTRATION PGM
' ZUserIn$ NAME OF FILE TO EXIT TO
' ZComPort$ NAME OF COMMUNICATIONS PORT
' TO BE USED BY KERMIT (COM1
' OR COM2)
' ZBPS = -1 FOR 300 BAUD
' = -2 FOR 450 BAUD
' = -3 FOR 1200 BAUD
' = -4 FOR 2400 BAUD
' = -5 FOR 4800 BAUD
' = -6 FOR 9600 BAUD
' = -7 FOR 19200 BAUD
'
' OUTPUTS -- NONE
'
' PURPOSE -- To transfer control to another program
'
SUB PrivDoorRtn STATIC
IF ZPrivateDoor THEN _
GOTO 62630
IF ZFakeXRpt THEN _
CALL FakeXRpt (ZWasFT$)
IF ZAdvanceProtoWrite THEN _
CALL OpenOutW ("XFER-"+ZNodeID$+".DEF") : _
IF ZErrCode < 1 THEN _
CALL PrintWorkA (ZFileName$+",,"+ZWasFT$) : _
CLOSE 2
* ------[ first line different ]------
IF (ZTransferFunction = 1 AND LEFT$(ZProtoMethod$,1) = "S") OR _ ' KG020501
(ZTransferFunction = 2 AND RIGHT$(ZProtoMethod$,1) = "S") THEN _ ' KG020501
GOTO 62629
* REPLACING old line(s) by new
62629 GOSUB 62633
* ------[ first line different ]------
CALL LPrnt (ZOutTxt$,1)
CALL ShellExit (ZUserIn$)
* REPLACING old line(s) by new
* ------[ first line different ]------
62633 ZOutTxt$ = ZFG7$ + STR$(ZUserSecLevel) + _ ' RM100502
" " + _
ZActiveUserName$ + _
" " + _
ZWasCI$ + ZEmphasizeOff$ ' RM100502
RETURN
END SUB
* REPLACING old line(s) by new
62660 ' $SUBTITLE: 'SetExpert - subroutine to adjust for expert change'
' $PAGE
'
' NAME -- SetExpert
'
' INPUTS -- PARAMETER MEANING
' ZExpertUser WHETHER IS AN EXPERT
'
' OUTPUTS -- ZMorePrompt$ Pause prompt
' ZPressEnter$ Prompt to press enter
'
' PURPOSE -- Make more helpful prompt for novices and shorter
' one for experts
'
SUB SetExpert STATIC
IF ZExpertUser THEN _
* ------[ first line different ]------
ZMorePrompt$ = "More ([Y],N,C,A" : _ ' RM02179401
ZPressEnter$ = ZPressEnterExpert$ : _
EXIT SUB
ZMorePrompt$ = "More [Y]es,N)o,C)ont,A)bort"
ZPressEnter$ = ZPressEnterNovice$
END SUB
* REPLACING old line(s) by new
62670 ZOutTxt$ = Prompt$
ZMacroMin = 99
ZHidden = ZTrue
CALL PopCmdStack
ZHidden = ZFalse
IF ZSubParm < 0 OR ZWasQ = 0 THEN _
EXIT SUB
* ------[ first line different ]------
ZOutTxt$ = "" ' UG070508
IF LEN(ZUserIn$) > 15 THEN _
ZOutTxt$ = "15 chars max" ' UG070508
IF INSTR(ZUserIn$,";") > 0 THEN _
ZOutTxt$ = "Cannot use ';'" ' UG070508
IF DisallowSpaces THEN _
IF ZUserIn$ = SPACE$(LEN(ZUserIn$)) THEN _
ZOutTxt$ = "Not all blanks" ' UG070508
IF ZOutTxt$ <> "" THEN _ ' UG070508
CALL QuickTPut1(ZOutTxt$) : _ ' UG070508
GOTO 62670 ' UG070508
CALL AllCaps (ZUserIn$)
ZWasZ$ = ZUserIn$
END SUB
* REPLACING old line(s) by new
64003 ' $SUBTITLE: 'AskUsers - subroutine to get registration information'
' $PAGE
'
' NAME -- AskUsers (WRITTEN BY JON MARTIN)
'
' INPUTS -- PARAMETER MEANING
' ZFileName$ NAME OF THE FILE CONTAINING THE
' SCRIPT TO BE USED WHEN ASKING
' THE USER QUESTIONS.
' ZActiveUserName$ NAME OF THE CURRENT USER
' ZUserSecLevel USER'S SECURITY
' ZUpperCase SET IF USER NEEDS UPPERCASE
'
' OUTPUTS -- WRITE THE USER'S RESPONSES TO THE QUESTIONS TO THE
' FILE NAME SPECIFIED AS THE First PARAMETER IN THE
' First RECORD OF THE FILE CONTAINING THE SCRIPT TO
' BE USED.
' ZUserSecLevel CAN BE RAISED OR LOWERED
'
' PURPOSE -- Provides a sophisticated, script driven mechanism by
' which a sysop can control the interaction with the
' user. Special function questionnaires include the
' registration questionnaire and the epilog.
'
SUB AskUsers STATIC
ZQuestAborted = ZFalse
ZQuestChainStarted = ZFalse
* ------[ first line different ]------
Temp = 256 ' RM08299301
REDIM ZOutTxt$(Temp) ' RM08299301
REDIM ZWorkAra$(ZMaxWorkVar),ZGSRAra$(ZMaxWorkVar)
PrevAppend$ = ""
AppendFileName$ = ""
'
'
' * LOAD SCRIPT CONTAINING THE QUESTIONS INTO THE ZOutTxt$ DIMENSION *
'
'
* REPLACING old line(s) by new
64636 IF ZAnsIndex < ZLastIndex THEN _
GOTO 64638
ZOutTxt$ = "A)utodwnld B)ullet C)ase F)ile H)ilite"
CALL TopPrompt
ZOutTxt$ = "L)ine feeds N)ulls T)urboKey X)pert !)bell"
* ------[ first line different ]------
CALL TopPrompt ' RCHAT401
ZOutTxt$ = "I)nternode Chat Page Availability" ' RCHAT401
CALL ColorPrompt (ZOutTxt$)
* REPLACING old line(s) by new
64638 ZStackC = ZTrue
ZTurboKey = -ZTurboKeyUser
CALL PopCmdStack
IF ZWasQ=0 OR ZSubParm < 0 THEN _
EXIT SUB
ZWasZ$ = ZUserIn$(ZAnsIndex)
CALL AllCaps (ZWasZ$)
* ------[ first line different ]------
ZFF = INSTR("ABCFHLNTX!I",ZWasZ$) ' RCHAT401
IF ZFF < 1 THEN _
GOTO 64636
CALL Toggle (ZFF)
GOTO 64636
END SUB
SUB TopPrompt STATIC
CALL ColorPrompt (ZOutTxt$)
CALL QuickTPut1 (ZOutTxt$)
END SUB
* REPLACING old line(s) by new
64645 ' * sets new user defaults
' * formerly 12900 of rbbs-pc.bas
SUB SetNewUserDef STATIC
LSET ZUserName$ = ZActiveUserName$
LSET ZUserOption$ = MKI$(0) + _
MKI$(0) + _
" 0" + _
MKI$(64) + _
MKI$(16) + _
MKI$(0) + _
CHR$(23) + _
ZDefaultEchoer$
LSET ZUserDnlds$ = MKI$(0)
LSET ZUserUplds$ = MKI$(0)
IF ZEnforceRatios THEN _
LSET ZTodayDl$ = MKS$(0) : _
LSET ZTodayBytes$ = MKS$(0) : _
LSET ZDlBytes$ = MKS$(0) : _
LSET ZULBytes$ = MKS$(0)
LSET ZSecLevel$ = MKI$(ZTempSecLevel)
LSET ZElapsedTime$ = MKI$(0)
* ------[ first line different ]------
LSET ZDropTimes$ = CHR$(0) ' DROP174
LSET ZBankTime$ = CHR$(0)
END SUB