home *** CD-ROM | disk | FTP | other *** search
- ;
- ; HCONFIG.SCR by Tsung Hu, 21 May, 1990
- ;
-
- NEWUSERLEVEL = 1 ; new user level
- SYSOPLEVEL = 2 ; sysop level
- DETECTBAUD = 1 ; set to 0 if COM baud rate is locked
- INITIALBAUD = 2400 ; initial baud rate (highest baud rate)
- YELLTIME = 3 ; amount of time to display the alarm
- YELLSOUND = 1 ; amount of time to ring the alarm
- HOSTDIR = "\TM" ; directory holding *.HST
- DOWNLOADDIR = "\TM" ; host download directory
-
- COMPORT = "1"
-
- procedure Pause
- string ch
- print
- print "Press [Enter] to continue ",
- repeat
- inputch ch
- until success
- print
- print
- endproc
-
- open "HSHELL.BAT" ; [S]hell batch file
- if not success
- print
- print
- print "Which COM port is your modem connected to (1-8) ? COM",
- repeat
- inputch COMPORT
- if success
- print COMPORT
- strpos "12345678",COMPORT,pos
- if pos=0
- print "Which COM port is your modem connected to (1-8) ? COM",
- endif
- endif
- until success and pos>0
- print
- if COMPORT<>"1" and COMPORT<>"2"
- print "Due to DOS limit, only COM1 and COM2 is supported for"
- print "the [S]hell command in host mode. However, you may"
- print "create your own HSHELL.BAT and use a third-party program,"
- print "such as DOORWAY, which allows you to use COM",COMPORT
- else
- create "HSHELL.BAT"
- if success
- print "Creating HSHELL.BAT, the batch file for [S]hell command"
- write "CTTY COM",COMPORT
- write "COMMAND"
- write "CTTY CON"
- write "EXIT"
- close
- else
- print "Cannot to create HSHELL.BAT"
- endif
- endif
- Pause
- else
- close ; already exist, skip it
- endif
-
- open "HCONFIG.HST"
- string s
- 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*.HST
- read DOWNLOADDIR ; download directory
- ; (upload always go to Telemate
- ; downlaod directory)
- close
- endif
-
- finish = 0
- while not finish
- clear text
- 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
- 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*.HST: ",
- 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 "S":
- delete "HCONFIG.HST"
- create "HCONFIG.HST"
- if not success
- print "Cannot create HCONFIG.HST"
- print "Configuration aborted"
- finish = 1
- else
- write NEWUSERLEVEL
- write SYSOPLEVEL
- write DETECTBAUD
- write INITIALBAUD
- write YELLTIME
- write YELLSOUND
- write HOSTDIR
- write DOWNLOADDIR
- close
- print "Configuration completed"
- Pause
- print "Starting host mode"
- script "HOST"
- endif
- case "Q":
- print "Configuration aborted"
- finish = 1
- endswitch
- endwhile
-