home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
t
/
tm400-3.zip
/
HOST.EXE
/
HCONFIG.SCR
next >
Wrap
Text File
|
1993-01-01
|
6KB
|
239 lines
;
; HCONFIG.SCR by White River Software, 1 January, 1993
;
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 dirtelemate,HOSTDIR ; directory holding *.HST
query dirupload,DOWNLOADDIR ; host download directory
query dirdownload,UPLOADDIR ; host upload directory
CLOSESYSTEM = 0 ; set to 1 if close system
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
read UPLOADDIR ; upload directory
read s
atoi s,CLOSESYSTEM ; open or close system
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 "I: Upload directory : ",UPLOADDIR
print "J: Close system : ",
if CLOSESYSTEM
print "ON"
else
print "OFF"
endif
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 "I":
print "Enter host upload directory: ",
input s
ss = ""
concat ss,s
if ss<>""
UPLOADDIR = ss
endif
case "J":
CLOSESYSTEM = not CLOSESYSTEM
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
write UPLOADDIR
write CLOSESYSTEM
close
print "Configuration completed"
Pause
print "Starting host mode"
script "HOST"
endif
case "Q":
print "Configuration aborted"
finish = 1
endswitch
endwhile