ÝÛÝ ÝÛÝ ÝÛÛÛÛÛÛÛÛÝ ÝÛÛÛÛÛÛÛÝ ÝÛÛÛÛÛÛÛÛÛ ÝÛÝ ÝÛÝ ÝÛÝ ÝÛÝ ÝÛÝ ÝÛÝ ÝÛÝ ÝÛÝ ÝÛÝ ÝÛÝ ÝÛÝ ÝÛÝ ÝÛÝÛÛÛÛÛÝÛÝ ÝÛÝ ÝÛÝ ÝÛÝÝÛÛÛÛÝ ÝÛÝ ÝÛÝ ÝÛÝ ÝÛÝ ÝÛÝ ÝÛÝ ÝÛÝ ÝÛÝ ÝÛÝ ÝÛÝ ÝÛÝ ÝÛÝ ÝÛÝ ÝÛÝ ÝÛÝ ÝÛÛÛÛÛÛÛÛÝ ÝÛÛÛÛÛÛÛÝ ÝÛÝ By Tsung Hu White River Software Introduction ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Telemate host mode is written with its script language and can be modified freely with no royalty. In Telemate 3.00, there are many useful commands, such as file and string handling, which make the host script easier to be written. The following are the host-related files: HCONFIG.SCR - Host configuration script HCONFIG.TMS - Compiled script, C>TMS HCONFIG HOST.SCR - Host mode script HOST.TMS - Compiled script, C>TMS HOST HCONFIG.HST - Configuration file (created after first run) HUSER.HST - User information (created after first run) HWELCOME.HST - Welcome message HNOTICE.HST - Notice or bulletin HMENU.HST - Main menu HPROT.HST - Protocol menu BGOODBYE.HST - Goodbye message HSHELL.BAT - [S]hell batch file (created during configuration) HLOCAL.BAT - [R]un local program HREMOTE.BAT - [R]un remote program HOST.DIR - [F]ile directory file (run-time temporary file) To Install The Host Mode ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ . Set the modem answer string to "~~~+++~~~AT S0=1^M" under the Options/Communication dialog . Run the HCONFIG.SCR by passing [Alt S]. HCONFIG will ask you which COM port you are using. If it is COM1 or COM2, it will generate the HSHELL.BAT batch file with the following content, CTTY COM1 COMMAND CTTY CON EXIT supposed the modem is in COM1. This batch file allows you to shell to DOS with the [S]hell command. Then it will display the menu A: New user level : 1 B: Sysop level : 2 C: Detect baud rate : ON D: Initial baud rate : 2400 E: Yell time : 3 seconds F: Yell sound : 1 seconds G: Host directory : \TM H: Download directory : \TM I: Upload directory : \TM J: Close system : OFF S: Save configuration and run host mode Q: Abort configration Telemate's host uses two user levels. Level 2 (the sysop level) can use the [S]hell, [R]un remote program and [Z] shut down commands while level 1 cannot. As an open system, new user can join the system freely. Each of them have his own password. If the option is turned on, new user is not allowed until the sysop adds his name and password to the user file. (See Format Of The User File.) Some modems can lock the COM port at a certain baud rate. For example, a 2400 baud MNP modem can lock at 4800 or 9600 baud with the "AT &B1" command. For these modems, the option should be turned off. should be the highest possible baud rate of your modem. and are the amount of time, in second, that the alarm appears and yells when the [C]hat command is issued. To disable the [C]hat command, you can set the to 0. is the directory containing all the H*.HST and H*.BAT files, they are the bulletin, the menu and the batch file for shelling to DOS. is the host download directory. The [F]ile, [T]ype and [D]ownload commands can only access files in this directory. If multiple directories are specified, only the first directory will be used. is the host upload directory. All upload will go to this directory. After setting up these parameters, you can press 'S' to save the configuration and it will chain to the host script automatically. . However, installation is not completed yet. To make full use of the host script, you should also modify the HSHELL.BAT, HLOCAL.BAT and HREMOTE.BAT batch file. HSHELL.BAT will be executed when the [S]hell command is issued. Although it is already created by the HCONFIG.SCR, the batch file does not monitor carrier signal. That means the computer will hang up when the remote user drop carrier. You should use a third-party product such as WATCHDOG or DOORWAY for maximum security. Note: In local mode, HOST will shell to DOS directly and will not use this batch file. HREMOTE.BAT will be executed when the [R]un remote program command is issued by a caller. This program can be a game or an BBS editor. HLOCAL.BAT is similar to HREMOTE.BAT but it is executed when the [R] command is issued in local mode. You may use the same program but different options or use a completely different program in this batch file. Of course, you should customize your own welcome message and bulletin. A warm welcome will make the user feel much better. If you don't have any bulletin, you may delete the HNOTICE.HST. Running The Host Mode ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ To run the HOST.SCR, you could press [Alt S] while you are in Telemate. Or type C>TM HOST while you are in DOS command line. When the host mode begin, you could press 'L' for local mode 'C' for configuration (run HCONFIG.SCR) [Esc] to terminate host [Alt H] to temrinate the user (hang up the phone) When a call is encounter, the user will be asked for his name and password. The name and password must be or longer than 4 characters. After that, the user can choose a command from the menu. Most of the users should have experiences with different types of BBSs. But they all have the commands [F]ile directory [U]pload a file [D]ownload a file [T]ype a file [C]hat with sysop [X]pert mode [G]oodbye The [F]ile command will shell to DOS and execute the DOS command DIR >\HOST.DIR which store the file list into a file. Then HOST.SCR will display the file. So don't worry when it shell to DOS, it is just a [F]ile command. When the user issues the [C]hat command, the alarm will be pop-up. Sysop should press [Enter] to accept [Esc] to deny If [Enter] is pressed, HOST.SCR will begin a chat mode. The sysop should press [Esc] to terminate the chat mode. There are three commands provided for sysop. They are [S]hell to DOS [R]un remote program [Z] shut down The [S]hell command will jump to DOS directly in local mode; and run the HSHELL.BAT to shell to DOS if it is a remote call. The [R]un command will run HLOCAL.BAT in local mode; and run HREMOTE.BAT in remote mode. The [Z] shut down command should be issued only if you don't need the host mode any more. It will ask you 'Are you sure ?'. If you said 'Y'es, the call will be disconnected and will not answer any more callers. Format Of The User File (HUSER.HST) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ A user's name, password and access level are stored in the file HUSER.HST. The format is first last;password# where is 1 or 2. For example, my record will look like first last;mypass#1 To raise a user's access level, you can use a text editor to change the 1 to 2. After that, the record will look like first last;mypass#2 There may be several records in the file, they all have the same format. If the option is turned on, the sysop must add the user's name and password manually. Further Improvement ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ There are a lot of space for improvements. Here are a few suggestions: . More access levels and different menu for different level. . Usage log: If you would like to keep track of a user's activities, you could add USAGE "Host: User attempts to shell to DOS" etc. . Inactive timeout: This can be done by IF NOT LOCAL WHENIDLE 600,"^*" ENDIF which send the modem hangup string if there is no activity through the COM port in 10 minutes. . Time limit: You may calcuate the connect time using the procedure DIFFTIME in toolbox #3. . ANSI graphics or full screen command: Toolbox #1 is a good start for this attempt. If you need any assistance, you can contact Winfred Hu at the Telemate support BBS's or the following network: RelayNet Telemate conference FidoEcho National Telemate Echo CompuServe [72070,3515] InterNet 72070.3515@compuserve.com