                ===============================
                NComm Host Script Documentation
                ===============================
           Doc ver 3, for script 2.10E, date 90-10-14

   The NComm Host Script was written by Daniel Bloch 1989.
 The NComm Host Script eXtended (ver 2.00Enad and up) was written by
                     Nils-Arne Dahlberg 1990
   Documentation written by Torkel Lodberg and Nils-Arne Dahlberg

      This is the third "official" english release, the things that have
changed since 2.06E is not many, but some nasty bugs have been removed.
For more info about them, see the script. The new features is described
later in this document. I have also made some corrections (sigh) from
the erlier version.

   The archive is released in two ways:
   HostxxxE.lzh, where xxx is the current scriptversion, only includes
the script and this document
   NHSXxxxE.lzh, where xxx still is the current script version, is a
complete setup with all directories as in the script.
 
   The original plan was to implement the NComm host mode as a part
of the NComm program, but, since the program would grow _large_,
the host mode was implemented as a script. Of course, the NComm
script language had to be enhanced, and functions specifically
needed for the project were implemented. The result is one of
the most powerful host modes available by any communication
program...

                How to set up NHS
                =================

   Before setting up NHS, please assure that the following files are
available; 'C:LIST', 'C:DELETE', 'C:FILENOTE', 'C:EXECUTE', 'C:COPY' and
one of 'LHarc', 'Arc', or 'Zoo'.

   To set up NHS, a few changes have to be made to the 'host.script'.
All variables that need to be maintained have been placed at top
of the script. First, a few directory names have to be defined. All
directory names should end with a colon or a slash, and the directories
must exist before you start using the script.

   The variable '$dir' shall contain the name of the directory where
all miscellaneous files are kept. In other words, this is where
bulletins, menus, messages, textfiles and so on have to rely. The
NComm Host Script will log all user operations in a log file that
will be created in this directory.

   The variable '$uldir' shall contain the name of the NHS upload
directory - all files uploaded will be placed here.

   The variable '$dldir' shall contain the name of the NHS download
directory - copy the files which shall be available for download
into this directory. Use the command 'FILENOTE' for adding file
descriptions. If '$uldir' and '$dldir' point to the same directory,
files uploaded will be available for download immediately. Otherwise,
the files have to be moved to the '$dldir' directory.

   The variables '$apack', '$alist' and '$aextract' is to be set to the
archive program's pack, list end extract commands. The variable '$arch'
should contain the program's default extension.

   The variable '$hold' shall contain the name of the NHS hold
directory. All ZOO files extracted will be placed in this directory.
Please notice that existing HOLD files wil be deleted at
initialization, do not store other files in this directory!

   Now, a few file names have to been defined. The variable '$holdzoo'
shall contain the name of the temporary hold ZOO file. Files will be
added to this file.

   The variable '$tmp' shall contain the name of the temporary text
file used by NHS for file listings and so on.

   The variable '$sysop' shall contain the directory containing sysop's name
and password.

   The variable '$cosysop' is teh directory containing all cosysop's names.

   The variable '$sysname' shall contain the name of your system.

   The variable '$doscomm' should contain the directory where the
doscommands sysop and cosysops can execute from remote is placed.

   Specify the name of the directory lister in the
variable '$list'.  This will normally be C:List.

   The variable '$maxbaud' is to be set to your modems maximum baudrat.

   Finally, set the variable '$hostMNPARQ' to "FALSE" if your modem,
does'n support MNP or ARQ error correction. If your no sure, set it
to "FALSE".

   A few changes also have to be made to the NComm configuration.
End-Of-Line TX should be set to CR+LF, the character set should be
set to ISO and G&R Host Mode has to be ENABLED. You should use a
two colour screen for faster screen updates. The G&R download dir
MUST be set to the directory specified in the variable '$dldir'.
This is due to Zmodem downloads always being created in the current
download directory. Save the configuration as "host.config" and
place it in the directory used for miscellaneous files. A sample
configuration file has been included.

   NHS will display two files at logon. The file "prelog" contains
the actual login text, "postlog" will be displayed after a successful
login... And at the logout NHS will show the file 'logout'. When a new user
is loggin on the file 'NewUser' is showed. Edit them to suit your needs.

   All menus are stored as textfiles. The file "menu0" contains
the main menu, "menu1" contains a list of file transfer commands, "menu3"
contains the SYSOP commands, "menu4" is the private mail menu and finally
"menu5" is the messages areas menu. Example files have been (or will
be...) included.
   The second menu-choice is taken from files named .menu0, .menu1,
.menu2, .menu4 and .menu5. There is no .menu3 because the sysop menu
is not reached by more than one or two users anyway.

   To install bulletins, simply create files "bull0", "bull1" and
so on. You must also remember to edit the bulletin menu, which
is contained in the text file "menu2". Again, example files have been
included. (or will be...)


                Using the NComm Host Script
                ===========================

   Execute the 'host.script' using the Execute Script function.
If all files and directories have been created successfully,
the modem will be initialized and a small menu will appear on
screen. You may enter 'SPACE' (and, at least on scripts up to 2.05,
'R') for logging on locally. The 'R'-command is for testing the
remote/local check that is included for sysops. Remember to turn off
the modem before logging on local, otherwise the text will be echoed
back from the modem.

   The NComm Host Script does not support Page Break, so use
CTRL-S and CTRL-Q for halting / resuming text output.

   When logging in, the file 'prelog' will be displayed. The
host will now prompt you for your name. Log on with your SYSOP name
if you want to gain SYSOP privileges, or use another name to log on
as a user. Enter the password that has been configured in the
"host.script" file at the 'Password' prompt. The second time you enter
an uncorrect password, you will be thrown off the board. You will also
be thrown off the board after 5 minutes of inactivity. If you used
the correct password, the file 'postlog' will be displayed...

   Press 'Enter' to continue - NHS will now display the main menu.
Here is a description of the different commands available;

MAIN MENU                                                  File; "menu0"
========================================================================
<B>     Bulletines
                        Displays  the  bulletin  menu.  A description of
                        bulletin menu commands follows further down.

<C>     Comments to sysop
                        Enters  comment  into system.  Prompts you for a
                        subject.   You  will  then  enter  a simple line
                        editor  that  must  be  used  for  entering your
                        comment.   Press  CTRL-Z  on  a  blank line when
                        finished.  The message will be added to the file
                        'comments'  -  it can be read by using the SYSOP
                        command [R]ead private messages.

<E>     Read and Write private messages
                        Goto teh Private Mail menu.

<F>     File-menu
                        Displays  the  file menu.  A description of file
                        menu commands follows further down.

<G>     Log out
                        Brings up a prompt asking you if you want to log
                        off  the  system or not.  The hangup string will
                        be  sent to the modem if the answer is positive.
                        NHS will start waiting for the next caller.

<L>     List Users
                        Prints a list of all users, and with thier status.
                        The status is written into the textfile and can be
                        changed by the sysop. The status have no effect
                        on the program.

<M>     Messages menu
                        Jump to a submenu for messages.

<O>     Page operator
                        Will  ring  the bell for SYSOP at local console.
                        When  chatting,  you may return to the main menu
                        by pressing CTRL-Z.

<P>     Change Password
                        Used if you want to change your password. You are
                        asked to input it twice to make sure that you
                        haven't done any spellingmisstakes.

(S)     Sysop functions
                        Only available for SYSOP and cosysop. Displays
                        the SYSOP menu. A description of SYSOP menu
                        commands follows further down.
                        This entry isn't in the menu, but it still works.


<V>     View version number
                        Outputs the current version of the script. It
                        was actually first just placed there for testing
                        purposes, but it's easier to leave it than risk
                        messing things up removing it...

FILE MENU                                                  File; "menu1"
========================================================================

<ADD> file to HOLD
                            Prompts  you  for  a filename. The file will
                            be added to the HOLD directory.

<DIR> List files in HOLD
                            Displays the contents of the HOLD directory.

<EXT>ract packed file to HOLD
                            Prompts you  for  a  filename. The file must
                            have  the extension $arch. The file will be
                            extracted into the HOLD directory.

<DEL>ete file(s) from HOLD
                            Prompts you for a filename. The file will be
                            deleted from the HOLD directory.

<GET> files in HOLD
                            Packs  the  contents  of  the HOLD directory
                            into the hold packed  file. The command will
                            prompt   you   for  the  preferred  transfer
                            protocol (Xmodem / YModem / Zmodem /
                            Ymodem-Batch / YModem-G), and the transfer
                            will start.

<L>ist files
                            Lists the contents of the download directory
                            using  the  command specified in the '$list'
                            variable.

<D>ownload file
                            Prompts  you  for  a  filename  and transfer
                            protocol (Xmodem / YModem / Zmodem /
                            Ymodem-Batch / YModem-G), and the transfer
                            will start.

<U>pload file
                            Prompts  you  for  a  filename  and transfer
                            protocol (Xmodem / YModem / Zmodem /
                            Ymodem-Batch / YModem-G), and the transfer
                            will start.

<V>iew packed file
                            Prompts  you  for  a filename. The file must
                            have  the  extension . The contents of
                            the file will be displayed on screen.

<Q>uit
                            Quits to main menu.



BULLETIN MENU                                              File; "menu2"
========================================================================

<xx>
         Displays bulletin #xx on screen. The file 'BULLxx' must exist.

<Enter> or <Q>
         Quits to main menu.


SYSOP MENU                                                 File; "menu3"
========================================================================

<B>ackup
                         Starts a remote backup-sequence.

<R>ead private messages
                         Displays  the  file  'comments' on screen.  All
                         user comments are contained here.

<L>ist user log
                         Displays the file 'log' on screen. The log file
                         contains  a  list  of  all user operations that
                         have been made.

<D>elete user log
                         Asks for a confirm. Deletes the file 'log' from
                         disk and creates a blank log file.

<C>omments delete
                         Asks for a confirm. Deletes the file 'comments'
                         from disk and creates a blank comments file.

<Q>uit to main menu
                         Quits to main menu.

<S>tart another script
                         Starts another script, just a experimental thing.


Above this, you can input a DOS-command wich will be executed and the result
will be outputed too the screen. Which commands you can execute is depending
on the scriptsetup. (See Above.)
 
Private Mail                                         Menu4;
==================================================================
<Q>  To Main menu
                        Quits to main menu.

<R>  Read letters to you
                        Read the letters to you.

<W>  Write a letter to someone
                        Write a letter to someone. You have to input the
                        Name of the reciver and a subject. You  will
                        then enter a simple line editor that must be used
                        for  entering your message. Press CTRL-Z on a
                        blank line when finished. The message will be
                        added to the file '<reciversname>' - it can be
                        read by using the command <R>ead letters.

<E>  Erase all letters to you
                        Ask for confirmation and if ok, erases yor messages
                        file.

<G>  Grab all messages and letters in a file
                        First, copies your messages to hold, and asks if the
                        same shall be done with areamessages and bulletines.
                        The messages are packed and sent as a binary file.

Boringtowns BBSs Areamenu:
==========================
<xx> Different messagesareas

<R> Read messages
                        Asks for wich area and sends that asciifile.

<W> Write messages
                        Asks for wich area and reciver of message. After
                        that you are asked to input a subject. The message-
                        entering are made in the same way as comment to
                        sysop. (See Above)
<Q> Back to Main menu
                        You should know this by now, really.


  Some new features (2.10)

   If you want another program to stop NHSx, without just throwing a
possible user away, do it this way:
   Let the program create a file called "RAM:C/NHSQUIT" and place the
delete command in ram:c. Then you just let the program wait until the
file "RAM:C/NHSQUIT" doesnt exists and go on after that. One possible
use of this is if you want to use your computer for automatic phone-
calls at certain times (using it as a fido-point or fido-host).

   You can, from the sysop menu, now start a ncomm-script. This is 
purely exprimental, and you cant get back to the BBS, but I'll think
of some use :-).
   This script MUST end with the line:
   CHAIN Host2.10E.script
To restart the BBS. An example, do-nothing, script is included.




Things changed since version 1.3 of the script is:

 * All users have thier own password

 * Cosysop status added

 * All of NComms protocols is supported

 * Private messages to/from all users

 * Multiple messages areas

 * A remote-backup function added

 * Possibility to choose archive program by sysop

Added since 2.06E

 * Possibility to let another program break the script

 * The sysop or cosysop can start another script from the sysop menu
    This is just an experimental feature without use, yet...

