home *** CD-ROM | disk | FTP | other *** search
- ;
- ; MODIFIED from: THCONFIG.SCR by White River Software, 3 January, 1992
- ;
-
- String scriptdir,ch
-
- NEWUSERLEVEL = 1 ; new user level
- SYSOPLEVEL = 2 ; sysop level
- DETECTBAUD = 1 ; set to 0 if COM baud rate is locked
- query baud,INITIALBAUD ; initial baud rate (highest baud rate)
- YELLTIME = 3 ; amount of time to display the alarm
- YELLSOUND = 1 ; amount of time to ring the alarm
- query dirscript,HOSTDIR ; directory holding *.SBH
- query dirupload,DOWNLOADDIR ; host download directory
- query dirdownload,UPLOADDIR ; host upload directory
- RUNPROGRAM="" ; RUN PROGRAM program
-
- TIMEWAIT = 30 ; Set this to allow for phone to stop ringing.
- TIMEIDLE = 300 ; Set inactivity timeout in seconds.
- CACHE = 0 ; Flush a delayed write cache.
- FLUSHCOMMAND="" ; DOS command used to flush cache.
-
- procedure Pause
- string ch
- print
- print "Press [Enter] to continue ",
- repeat
- inputch ch
- until success
- print
- print
- endproc
-
-
-
- query dirscript,scriptdir
- concat SCRIPTDIR,"\"
- strpos SCRIPTDIR,"\\",pos
- If pos=0
- concat SCRIPTDIR,"THCONFIG.SBH"
- else
- substr SCRIPTDIR,1,pos,SCRIPTDIR
- concat SCRIPTDIR,"THCONFIG.SBH"
- endif
- open scriptdir
-
- if success
- read s
- atoi s,NEWUSERLEVEL ; new user level
- read s
- atoi s,SYSOPLEVEL ; sysop level
- read s
- atoi s,DETECTBAUD ; detect baud rate
- read s
- atoi s,INITIALBAUD ; initial baud rate
- read s
- atoi s,YELLTIME ; yell time
- read s
- atoi s,YELLSOUND ; yell sound
- read HOSTDIR ; directory containing H*.SBH
- read DOWNLOADDIR ; download directory
- read UPLOADDIR ; upload directory
- read s
- atoi s,TIMEWAIT ; Active Delay Time
- read s
- atoi s,TIMEIDLE ; Inactive Timeout
- read s
- atoi s,CACHE ; Use Cache?
- read FLUSHCOMMAND ; DOS flush command for cache
- read RUNPROGRAM ; RUN PROGRAM program
- close
- endif
-
- finish = 0
- while not finish
- clear text
- print
- print " Tel-Host Configuration "
- print
- print "A: New user level : ",NEWUSERLEVEL
- print "B: Sysop level : ",SYSOPLEVEL
- print "C: Detect baud rate : ",
- if DETECTBAUD
- print "ON"
- else
- print "OFF"
- endif
- print "D: Initial baud rate : ",INITIALBAUD
- print "E: Yell time : ",YELLTIME," seconds"
- print "F: Yell sound : ",YELLSOUND," seconds"
- print "G: Host directory : ",HOSTDIR
- print "H: Download directory : ",DOWNLOADDIR
- print "I: Upload directory : ",UPLOADDIR
- print
- print "Advanced features..."
- print
- print "J: Activation Delay : ",TIMEWAIT," seconds"
- print "K: Inactive Timeout : ",TIMEIDLE," seconds"
- print "L: Using D/W Cache? : ",
- if CACHE
- print "YES Flush Command = ",FLUSHCOMMAND
- else
- print "NO"
- endif
- print "M: RUN Program : ",RUNPROGRAM
- print " (See Tel-Host Documentation)"
- print
- print "S: Save configuration and run host mode"
- print "Q: Abort configuration"
- print
- print "Which option: ",
- repeat
- inputch ch
- until success
- print ch
- print
- print
-
- switch ch
- case "A":
- print "Enter new user level: ",
- input s
- ss = ""
- concat ss,s
- if ss<>""
- atoi ss,NEWUSERLEVEL
- endif
- case "B":
- print "Enter sysop level: ",
- input s
- ss = ""
- concat ss,s
- if ss<>""
- atoi ss,SYSOPLEVEL
- endif
- case "C":
- DETECTBAUD = not DETECTBAUD
- case "D":
- print "Enter initial baud rate: ",
- input s
- ss = ""
- concat ss,s
- if ss<>""
- atoi ss,baud
- endif
- switch baud
- case 300: INITIALBAUD = baud
- case 1200: INITIALBAUD = baud
- case 2400: INITIALBAUD = baud
- case 4800: INITIALBAUD = baud
- case 9600: INITIALBAUD = baud
- case 19200: INITIALBAUD = baud
- case 38400: INITIALBAUD = baud
- otherwise : print
- print "Invalid value"
- print
- Pause
- endswitch
- case "E":
- print "Enter yell time (0 to turn off): ",
- input s
- ss = ""
- concat ss,s
- if ss<>""
- atoi ss,YELLTIME
- endif
- case "F":
- print "Enter yell sound length (0 to turn off): ",
- input s
- ss = ""
- concat ss,s
- if ss<>""
- atoi ss,YELLSOUND
- endif
- case "G":
- print "Enter host directory which contains H*.SBH: ",
- input s
- ss = ""
- concat ss,s
- if ss<>""
- HOSTDIR = ss
- endif
- case "H":
- print "Enter host download directory: ",
- input s
- ss = ""
- concat ss,s
- if ss<>""
- DOWNLOADDIR = ss
- endif
- case "I":
- print "Enter host upload directory: ",
- input s
- ss = ""
- concat ss,s
- if ss<>""
- UPLOADDIR = ss
- endif
- case "J":
- print "Enter Active Delay time in seconds: ",
- input s
- ss = ""
- concat ss,s
- if ss<>""
- atoi ss,TIMEWAIT
- endif
- case "K":
- print "Enter Inactive Time-out, in seconds: ",
- input s
- ss = ""
- concat ss,s
- if ss<>""
- atoi ss,TIMEIDLE
- endif
- case "L":
- If CACHE
- CACHE=0
- FLUSHCOMMAND = ""
- else
- CACHE=1
- print "Make sure to include the no prompt flag..."
- print "Enter DOS command to flush cache: ",
- input s
- ss = ""
- concat ss,s
- if ss<>""
- FLUSHCOMMAND = ss
- endif
- endif
- case "M":
- print "Enter program. (Include PATH) : ",
- input s
- ss = ""
- concat ss,s
- if ss<>""
- RUNPROGRAM = ss
- endif
- case "S":
- delete SCRIPTDIR
- create SCRIPTDIR
- if not success
- print "Cannot create THCONFIG.SBH"
- print "Configuration aborted"
- finish = 1
- else
- write NEWUSERLEVEL
- write SYSOPLEVEL
- write DETECTBAUD
- write INITIALBAUD
- write YELLTIME
- write YELLSOUND
- write HOSTDIR
- write DOWNLOADDIR
- write UPLOADDIR
- write TIMEWAIT
- write TIMEIDLE
- write CACHE
- write FLUSHCOMMAND
- write RUNPROGRAM
- close
- print "Configuration completed"
- Pause
- print "Starting host mode"
- concat HOSTDIR,"\"
- strpos HOSTDIR,"\\",pos
- If pos=0
- concat HOSTDIR,"TEL-HOST.SCR"
- else
- substr HOSTDIR,1,pos,HOSTDIR
- concat HOSTDIR,"TEL-HOST.SCR"
- endif
- script HOSTDIR
- endif
- case "Q":
- print "Configuration aborted"
- finish = 1
- endswitch
- endwhile
-
-
-