home *** CD-ROM | disk | FTP | other *** search
-
- HOSTBBS:
- A General Purpose BBS Program in SALT
-
-
- 1. Introduction:
-
- TELIX is a very popular communication program on IBM PC. It
- is published by Exis Inc. in Canada. TELIX has a very powerful script
- language -- SALT (Script Application Language for Telix). The
- following is a description of a general-purpose BBS (Bulletin Board
- System) program written entirely in SALT.
-
- There are several sample programs written in SALT distributed
- with TELIX. One of them is HOST.SLT. TELIX manual calls it "host
- mode of TELIX" when it is run. It lets a caller dial up and get access to
- files and data in a remote IBM PC. However, the "host mode" offered
- by TELIX's HOST is too crude to be called a BBS. Therefore, I made
- some drastic changes to HOST, converting it into a somewhat complete,
- general-purpose BBS program. I call it HOSTBBS.
-
- HOSTBBS lets a user dial up, get on-line, download/upload files,
- enter/read messages, read bulletins, and chat with sysop. A HOSTBBS
- sysop can do all the things that an average user can do; besides,
- he/she can enter DOS shell, reboot computer, examine each part of the
- hard disk, and force a user into the chat mode from the host PC.
-
- HOSTBBS has many functions found in many other BBS. For
- example, it sets a user's online time to 60 minutes; however, sysop can
- change this easily. HOSTBBS also checks if a user doesn't do anything
- for a preset period of time. It will cut off the line if users just don't do
- anything. However, sysop does not have this "timeout" limit when
- he/she calls HOSTBBS remotely.
-
- I will distribute the source program of HOSTBBS (in SALT) as a
- public domain software in the future. In the mean time, I will set up
- a BBS based on HOSTBBS. This BBS is called "Mackey Mouse" since I
- am also a Macintosh user. And all the files and messages in Mackey
- Mouse are about Macintosh. You may call Mackey Mouse if you use
- Macintosh and you want to see how HOSTBBS looks like.
-
- The following sections describe the details of setting up a
- HOSTBBS. Only sysop needs to read them. A user is not required to
- read those details since HOSTBBS, once setup, is very easy to use.
-
-
-
- 2. How to Set Up HOSTBBS In Hard Disk
-
- HOSTBBS should be set up on an IBM PC with a hard disk. You
- should make a subdirectory named "HOSTBBS" in the root directory of
- hard disk. (C:\HOSTBBS) This subdirectory is used to hold all the
- necessary files (programs, data files, message files, and configuration
- files). The name of this subdirectory is not defined in the
- HOSTBBS.SLT source file. Sysop may use a different name and put all
- the needed files in that subdirectory. The following is a list of all the
- needed files in this subdirectory:
-
- Program files:
- TELIX.EXE the Telix program, used to run the HOSTBBS script
- HOSTBBS.SLC HOSTBBS script compiled from HOSTBBS.SLT by CS.EXE
- CHATMODE.SLC chat mode script compiled from CHATMODE.SLT
-
- (The above 3 files are not distributed with this package. You may get
- TELIX.EXE from other popular BBS. And you should use CS.EXE to
- compile HOSTBBS.SLT and CHATMODE.SLT into HOSTBBS.SLC and
- CHATMODE.SLC. All the following files are in the distributed package.)
-
- RESET.COM small program used to re-boot IBM PC
-
- Data files:
- USERLIST.TXT user list file used by HOSTBBS
- LOGON.LST user logon list maintained by HOSTBBS
- HOSTBBS.LOG detailed logon session maintained by HOSTBBS
-
- (Also, the above 3 files are not part of the distributed package.
- HOSTBBS will create them automatically.)
-
- FILES.DIR listing of existing files in the file area
-
- Configuration files:
- ANSI.KEY key definition used by TELIX to emulate ANSI terminal
- CLRHOST.CNF configuration file used by TELIX
-
- Message files:
- ASKANSI.TXT hello screen asking for ANSI mode or TTY mode
- ---------------
- QUESTION.MSG question hello screen, to be seen by first-time user
- LOGO.MSG first hello screen, usually BBS logo is put in this file
- WELCOME.MSG second hello screen, usually a brief description of BBS
- TLXBYE.MSG bye-bye message, to be seen when log-off
- HELP.MSG help screen, to be displayed when user needs help
- BLTN.MSG title bulletin message
- ---------------
- QUESTION.TTY TTY version of QUESTION.MSG
- LOGO.TTY TTY version of LOGO.MSG
- WELCOME.TTY TTY version of WELCOME.MSG
- TLXBYE.TTY TTY version of TLXBYE.MSG
- HELP.TTY TTY version of HELP.MSG
- BLTN.TTY TTY version of title bulletin message
-
- Bulletin files:
- BLTN_x.MSG x is a number from 1 to 20
-
- Program files are used to run HOSTBBS under TELIX.
-
- Data files are maintained or used by HOSTBBS.
-
- Configuration files are used by TELIX to set up terminal mode.
-
- Message files are used to display screen contents to the user.
- Bulletin files are also used to display some information. Sysop may
- modify message files and bulletin files to change the outlook of
- HOSTBBS. And this is how each sysop put his/her own personal
- character into HOSTBBS.
-
- In addition to this C:\HOSTBBS\ subdirectory, three more
- subdirectories must also be set up in the root of hard disk. One for the
- file area, one for the message area, and another for the uploaded file.
- File area is where users download files. Message area is where users
- write messages. Upload area is where uploaded files go. Each one of
- the three subdirectories must be present or else the HOSTBBS program
- will not function normally. HOSTBBS defines three standard
- subdirectories:
-
- C:\BBSFILES\ standard file area
- C:\BBSUPLDS\ standard upload area
- C:\BBSMSG\ standard message area
-
- The name of standard file area is defined in the global string
- variable HOST_DOWNLOADS[], which has the value "C:\BBSFILES\".
- The name of standard upload area is defined in the global string
- variable HOST_UPLOADS[], which has the value "C:\BBSUPLDS\". The
- name of standard message area is defined in the global string variable
- HOST_MESSAGE[], which has the value "C:\BBSMSG\". The names of
- these three subdirectories can be changed by changing the value of
- their corresponding string variables in HOSTBBS.SLT, then recompiling
- the file to HOSTBBS.SLC.
-
- In summary, each hard disk has four subdirectories for use by
- HOSTBBS; C:\HOSTBBS\ is where all HOSTBBS files reside.
- C:\BBSFILES\ is where files for downloading reside. C:\BBSUPLDS\ is
- where uploaded files go. C:\BBSMSG\ is where BBS messages are
- placed. The names of those four subdirectories can be changed by
- sysop who prefer using different names as defined in the original
- HOSTBBS.SLT source program. Of course, you must re-compile the
- source program if you decided to use different names.
-
-
-
- 3. User ID and Password
-
- Each user has a unique ID and password in each HOSTBBS
- system. This information is kept in the file USERLIST.TXT. Whenever
- a user calls HOSTBBS, HOSTBBS will ask for an ID. Then HOSTBBS
- searches USERLIST.TXT to see if this ID can be found in this file.
- HOSTBBS knows this user is a first-time caller if the ID entered is not
- found in USERLIST.TXT. HOSTBBS will ask for a matching password if
- this ID is found in USERLIST.TXT, ensuring the uniqueness of user ID.
-
- USERLIST.TXT is not distributed with the HOSTBBS package
- since this file will be created by HOSTBBS automatically.
-
- HOSTBBS keeps only two access levels, which are determined by
- the ID and password. One is for the average users, the other one is for
- the sysop.
-
- Sysop (System Operator) of HOSTBBS has complete control over
- the entire computer. In addition to average users' access level, he/she
- can enter DOS shell, download from any subdirectory, reboot the
- computer, and see any file he/she is interested in. When sysop is
- sitting by the host computer and a user is on-line, he/she can force
- the user into the chat mode, terminate the calling session, start
- capturing the session, peep the user's personal data, or reset the user's
- time to default (60 minutes).
-
- Because sysop has such a privilege to control over the host
- computer remotely, HOSTBBS keeps a unique ID and password for
- sysop to guard against inappropriate access to the computer system.
- This unique ID and password is "hard-coded" into the HOSTBBS
- system; i.e. defined in the source program of HOSTBBS.SLT. Each sysop
- MUST choose his/her own ID and passwords, change the system's
- corresponding global string variables, and recompile the HOSTBBS
- script program before he/she can open the BBS to the public.
-
- Here is how to do it.
-
- HOSTBBS defines one sysop ID in every system. This sysop ID
- has two parts: first name and last name. First name is defined by the
- global string variable SYSOP_FIRST[] while last name is defined by
- the global string variable SYSOP_LAST[]. These two variables
- together define the sysop ID used in HOSTBBS.
-
- HOSTBBS also defines two more passwords for sysop: one for
- sysop to gain access to the system, the other for sysop to enter DOS
- shell or to reboot the computer. The former is defined in the global
- string variable SYSOP_PASSWORD[], the latter is defined in the global
- string variable SHELLPASS[].
-
- Remember, the version of HOSTBBS.SLT you received should not
- have defined anything ("dummy") in the above variables for sysop ID
- and passwords. You MUST define them and recompile the program
- before you can set up your own HOSTBBS system.
-
- In summary, four string variables in HOSTBBS.SLT define sysop
- ID and passwords:
-
- SYSOP_FIRST[] defines first name of sysop ID
- SYSOP_LAST[] defines last name of sysop ID
- SYSOP_PASSWORD[] defines password of sysop
- SHELLPASS[] defines password to reboot computer or to enter DOS shell
-
-
-
- 4. Files for Uploading/Downloading in HOSTBBS
-
- HOSTBBS keeps one file area for users to download. The name
- of the file directory is defined by the global string variable
- HOST_DOWNLOADS[]. Users may see file list by invoking the (L)ist
- command in the (F)ile sub-command. What an average user sees is
- actually a text file prepared by sysop. Sysop should put whatever
- he/she wants the user to see in this text file, typically a listing of file
- names, size, and description about those files.
-
- What sysop sees when he/she invoke the (L)ist command is
- somewhat different from that of average users. Sysop can see actual
- listing of the files in the file area, somewhat similar to typing DIR
- under DOS. Wildcard is also supported for sysop. Besides, TELIX will
- also calculate the estimated transfer time according to the total size of
- listed files and current modem speed.
-
- HOSTBBS's first command is the (F)ile command. This command
- is for (L)isting files in the file area, (U)ploading files, (D)ownloading
- files, or (T)yping a text file on screen to see its contents. TELIX offers
- many file transfer protocols for uploading/downloading files. Users
- may choose one protocol after requesting uploading or downloading
- functions.
-
- As previously said, sysop can get access to any part of the hard
- disk. The biggest difference between an average user and a sysop
- when invoking the (F)ile command is that sysop can:
-
- 1. Download files from any part of the hard disk by entering
- drive name, path name, and file name. For example, when HOSTBBS
- asks sysop to enter a file name to download, he/she can just enter a
- file name for the file in the default file area; or he/she can enter
- C:\DOS\UTILITY\SORT.* to download another file in another deeply
- nested subdirectory. Only sysop is allowed to do this.
-
- 2. List files in any part of the hard disk. Wild card characters
- are also allowed. If only RETURN is entered when he/she is prompted
- with file name request, the default file list text file (FILES.DIR) is
- displayed as usual. But he/she can also type
- C:\LETTER\ORDER*.TXT to list all files with .TXT extension in the
- subdirectory LETTER.
-
- Uploaded file goes to the same directory, whether it is uploaded
- by an average user or sysop.
-
- The consistence of files in file area and text file FILES.DIR is a
- somewhat tricky task for sysop. Sysop must make effort to maintain
- this consistence; otherwise, what the users see in FILES.DIR may not
- be the same with what are actually in the file area. For example, if
- the file FOO.TXT is removed from the file area while text file FILES.DIR
- still keeps the entry for FOO.TXT, users can't download FOO.TXT even
- he/she can still see the entry which is actually only a line of text in
- the file FILES.DIR. So it is a sysop's responsibility to maintain the
- consistence of file area and FILES.DIR.
-
-
-
-
- 5. Message area of HOSTBBS
-
- Message area of HOSTBBS contains all the messages entered by
- users. The on-line line-oriented text editor is implemented with the
- inspiration of GT Powercomm's text editor in mind. Any one familiar
- with GT-based BBS should feel at home when using this editor to enter
- message.
-
- I didn't add some useful functions yet. For example, you can't
- quote other's message when writing a reply message. It shall be
- added in the next release of HOSTBBS.
-
-
-
-
- 6. System Functions of HOSTBBS
-
- HOSTBBS has three system commands, one for average users
- and two for the sysop.
-
- Users can (P)age the sysop for a chat. Sysop may grant the
- request by pressing F1 to enter chat mode or any other keys to deny
- the request. HOSTBBS will be back to BBS mode 20 seconds after user
- pages sysop.
-
- Users can also see the logon list which is actually a text file
- maintained by HOSTBBS. Logon-logoff data/time, modem speed, ANSI
- mode, and user names are listed on the screen. A "*" mark between
- modem speed and ANSI mode indicates an abnormal logoff, such as
- accidental hang-up or failed logon.
-
- Users may also change ANSI mode from On to Off or vise versa
- during the logon session.
-
- Sysop may enter DOS shell remotely or reboot computer
- remotely.
-
- Why do we need to reboot computer remotely, anyway?
-
- Well, this function is actually a "system patch" for earlier
- version of HOSTBBS when it is being developed under TELIX 3.10.
- That version of TELIX had trouble finding file handle after invoking
- DOS shell several times and this made a sysop impossible to invoke
- DOS shell several times later. This function gives sysop a chance to
- reboot the system remotely and the whole HOSTBBS system is started
- by a batch file. Although the problem of losing file handle is cured in
- TELIX 3.12, this function is retained, anyway.
-
- Another improvement over the DOS shell function is the support
- for DOORWAY by TELIX 3.12. The original HOST program enters DOS
- shell very similar to the CTTY COM under DOS. This method is
- somewhat undesirable. The whole system will be locked up if the
- modem linkage is suddenly lost during the DOS shell session. Local
- computer will print "Read/Write error in COM: A)bord R)etry
- I)gnore". The only way to get out of this condition is to type some
- keys from the local computer. And this is of course not very robust
- for an unattended, self-running BBS system. On the other hand,
- DOORWAY will reboot the computer if modem linkage is lost, thus
- giving the system a chance to restart HOSTBBS from a batch file.
-
-
-
-
- 7. Bulletin Functions of HOSTBBS
-
- Bulletin is an area where sysop can tell users useful
- information, system-specific information, updated files, or anything
- sysop likes to let users know.
-
- HOSTBBS reserves 20 vacant "slots" for this function and they
- are numbered from 1 to 20. Each slot is for one bulletin text file.
- Here's how to set up the bulletin by yourself.
-
- The main bulletin screen showing all 20 available bulletins is
- actually a text file named "BLTN.MSG". It can be edited with any text
- editor, and adding a new bulletin or changing the title of an existing
- bulletin is straight forward. Just use your text editor, open BLTN.MSG,
- type over the proper positions for that bulletin, then save it with the
- original name.
-
- Other bulletin files are named with their corresponding bulletin
- numbers. For example, bulletin number one is simply named
- BLTN_1.MSG, bulletin number two is named BLTN_2.MSG, etc. Each
- one is a text file to be displayed when user invokes the bulletin
- function and types a bulletin number.
-
-
-
-
-
- 8. Special Functions for Sysop
-
- Current version of HOSTBBS offers four special functions for
- sysop -- the Chat mode function, Display user data function, Text-
- capturing function, and Reset-time functions. This section describes
- these functions in detail.
-
- (1) The Chat Mode -- F1 & F2
-
- HOSTBBS is said to be in HOST mode when a user calls it and
- gets on-line. Many functions are offered in this mode. However,
- sysop can also make HOSTBBS enter the Chat mode by pressing F1 at
- any time. This mode is used for user and sysop to talk (chat) to each
- other through computer or terminal keyboard. Everything typed on
- the keyboard will be echoed on the screen and be sent to remote
- terminal. Everything comes in through the communication port will
- be displayed on screen. Sysop and user may talk to each other in this
- electronic manner.
-
- The only way to leave chat mode and back to HOST mode is
- pressing F2 key. It is of no use if user pressed F2 key on the remote
- terminal/computer. Only sysop can use F2 key to get back to HOST
- mode.
-
- F1/F2 keys are also used to enter chat mode when sysop is
- "paged" by the user. F1 key is used to enter chat mode while F2 key
- is used to get out of chat mode.
-
-
- (2) Displaying User's Data -- F3
-
- User's basic data is kept in the file USERLIST.TXT by HOSTBBS.
- Sysop may see a caller's personal data by pressing F3 key while
- HOSTBBS is in HOST mode. A small "window" on screen displays
- current caller's name, age, occupation, password, and telephone
- number. This function is useful if sysop wants to know who is the
- current user.
-
-
- (3) Text-capturing -- F4 & F5
-
- Sysop may tell HOSTBBS, which is run under TELIX, to start
- capturing screen contents by pressing F4 key at any time. Pressing F4
- key again while text-capturing is in effect will terminate text-
- capturing of HOSTBBS. Sysop may also press F5 key while text-
- capturing is in effect to suspend the process; pressing F5 key again
- restores text-capturing (pause and unpause).
-
- It is of no use to press F5 key when HOSTBBS is not capturing
- anything.
-
- Captured text file is named "HOSTBBS.CAP" and you may use
- any text editor to use that file.
-
-
- (4) Reset User's Remaining On-line Time -- F6
-
- Each user's on-line time is set to 60 minutes. However, sysop
- may reset this time by pressing F6 at any time. A short message in a
- small window tells sysop that user's remaining on-line time has been
- reset.
-
-
- In summary, four special functions are provided by current
- version of HOSTBBS:
-
- Enter and leave chat mode -- F1 & F2
- Display user's Data -- F3
- Enable and disable text-capturing -- F4 & F5
- Reset on-line time limit -- F6
-
-
-
- 9. The ANSI Problems
-
- HOSTBBS supports ANSI mode if user's terminal or computer
- supported it. ANSI code is a kind of escape sequence used to control
- screen display, such as color, cursor position, character attribute, and
- so on. If user replied "Y" to the question asking for ANSI mode,
- HOSTBBS will display ANSI characters throughout the whole session
- until log-off or user disables ANSI mode during the session.
-
- Attention Macintosh users: I will set up a BBS dedicated to all
- Macintosh users. However, most EARLY communication programs on
- Macintosh does not support ANSI mode; but latest programs do.
- ZTerm 0.85, the most often used shareware in this category is
- recommended when you want to call HOSTBBS with Macintosh. ZTerm
- 0.85 supports full set of ANSI code. It can even display colors if you
- are using it on a Macintosh II with a color monitor. I use my
- Macintosh II to test HOSTBBS and it works perfectly fine. Highly
- recommended!!!
-
- Several text files have two versions with identical contents, one
- has embedded ANSI codes while the other one doesn't. The one with
- embedded with ANSI codes have ".MSG" as the file extension; the one
- without ANSI codes has file extension ".TTY". HOSTBBS will decide
- which text file to display according to current setting of ANSI mode.
- Files with ".MSG" will be displayed if current ANSI mode is on and the
- ones with ".TTY" will be displayed if current ANSI mode is off. Text
- files with two versions are listed below:
-
- ANSI version Plain Text version
-
- LOGO.MSG LOGO.TTY
- BLTN.MSG BLTN.TTY
- HELP.MSG HELP.TTY
- QUESTION.MSG QUESTION.TTY
- TLXBYE.MSG TLXBYE.TTY
- WELCOME.MSG WELCOME.TTY
-
-
- ---------------------------------------------------------
-
- That's all folks. I believe this humble BBS will be useful for
- some hackers, office users, or evangelists for TELIX. HOSTBBS
- provides most of the important, though not necessarily powerful,
- functions of a general-purpose BBS. Typical usage of HOSTBBS may be
- an office user who wants to get access to his computer at home.
- Without dealing with all the hassles of setting up a full-scale BBS like
- GT or Fido, he/she can set up HOSTBBS within 10 minutes. And
- he/she can still lets his/her colleagues have limited access to this
- family BBS.
-
- You are seeing a humble BBS in its very early days. Any
- comment for improvement or enhancement is welcome. The author
- can be contacted at the following address:
-
- Chester H. Lin
- 5-3 Lane 4 Pu Chen Street
- Taipei, Taiwan 10611
- Republic of China
-
-
- Chester Lin
- January 29, 1990
- Taipei, Taiwan