Version 0.95b notes:
--------------------
I fixed that problem with the forwarding - where it would forward the
request, get a reply, and start a cycle of messages that said "Invalid
password" back and forth.

Version 0.94b notes:
--------------------
(Sorry this didn't get added for v0.94b!)  I chopped my main function into
smaller functions and made the code neater, used CodePRobe on it, and found
a possible un-ending loop - fixed it.  Looks good so far.  Hope you're all
happy with it so far!

Version 0.93b notes:
--------------------
Basicly, this is a new feature update.  I've refined it a little, and added:
- FORWARDING of echo requests to systems of your choice.
This is the main reason for this update.  It's in testing, so I won't be
surprised if there's bugs!

Version 0.92b notes:
--------------------
- Stopped putting comments after AREA lines, because Paragon didn't like it.
<sniff>, <sniff>, they looked so nice, too.  I moved them to the line
before, which should work OK.
- Added SEARCH keyword in AreaFix.CFG file, so instead of searching for the
correct NetMail base, you tell ME where it is.  Saves some trouble of
scanning thru all your bases to find it numbered 128 or something.  Updated
this doc to show how it's used too.
- Fixed Re-Scan requests, they used to cause a re-scan of the wrong base.
Thanx to Gert Pedersen.
- Fixed message header size... Lattice was padding the structure to make it
end on a long-word I guess.  Thanx again Gert Pedersen!
- Made AreaFix check each of your AREA lines to make sure it is a valid
echomail area.  It will remove any that aren't.  Even more automates the
process, as now you don't even have to remove areas from this list, it will
take them out if the areatag or the message base name is less than 2
characters, if the type is not EchoMail, or if the access level is above
15.

Paragon AreaFix v0.95b by Russel Miranda
----------------------------------------

All standard disclaimers apply.... I am not responsible for any distruction
or havoc this program may cause on your otherwise perfect computer system.
Although, I will feel sincerely sorry, and attempt to rectify the bug that
caused said failure.  I don't guarantee it to do anything, except (if left
in original un-altered form) take up space on your floppy or hard disk
drive.  This program is freely distributable, so upload it to any and every
BBS you can afford to send it to, give it to your friend, or give it to your
users group's BBS sysop.

====================================
What is this program SUPPOSED to do?
====================================

Glad you asked... Paragon AreaFix is a work-almost-alike to AreaFix of the
IBM and compatible world.  What it does, is automate the connection and
disconnection of nodes to your AREAS.CTL file, thus making it possible for
other nodes that you feed to add/subtract echo message areas without
your intervention.  It is basicly a time and frusteration saving device,
very useful for those who have the masochistic desire to become a net or
regional Echo Coordinator or hub.  Paragon AreaFix (known from here on in
this documentation as AreaFix) will save you the trouble of finding the
area number that matches with the correct area tag, adding an address to
the list, or subtracting one, every time the system you feed wants the new
GEE_WHIZ echo... ;^)

=================
How does it work?
=================

Simple.  If a node you feed would like to add or remove an echo base, he/she
simply sends your AreaFix a NetMail (Matrix) message.  On the subject line
of that message should be a password, plus any of the optional commands that
are described below.  AreaFix will detect a message addressed to it, and
act accordingly by modifying your AREAS.CTL file.  A reply will be generated
to the system from which the message originated, and everyone will be
(hopefully) happy.

=====================
What do I need to do?
=====================

  I.  The Config File -
	OK.... Included somewhere in the archive you obtained should be a
	sample configuration file.  This file is VERY important! So you can
	modify this file, I have included a discription of each	of the
	keyword lines that are recognized.  They are:
	
      A.  Passwords -
	    You must place a password for EACH AND EVERY system you wish
	    to allow AreaFix sessions.  The syntax of a password line is
	    as follows:
	    
PASS <Net/Node> <Password> <SecLevel>
	    
	    "PASS" alerts AreaFix that a password line follows.  <Net/Node>
	    is the address of the system to which this line applies.
	    <Password> is the password, maximum of nine characters, and is
	    NOT case sensitive.  <SecLevel> is the level of security you
	    wish to grant this system, more about this is explained in the
	    PROTECT statement's description.
	    
	    If a PASS line is not found for a system, AreaFix will claim "Invalid
	    Password" and refuse to process the system's message.
	    
      B.  Aliases -
    	    AreaFix will automaticly process messages addressed to
	    "Areafix" if their destination is your system.  You can also
	    get it to respond to other names by placing them on ALIAS lines.
	    The syntax for an alias line is:
	    
ALIAS <Alternate Name>
	    
	    Where <Alternate Name> is the alias to which it should respond.
	    You may have an unlimited amount of alias lines, within the
	    limits of available memory, but it should be noted that having
	    a large number of them slows down the config file parsing, and
	    the command message parsing.
	    
      C.  Protection lines -
	    Every message area not "protected" is assumed to have a minimum
	    security level of 0.  Protecting a message area prevents systems
	    with low security levels from accessing it.  To add an echo base
	    with a security level of 10, a system must have a security level
	    of 10 or above.  Security levels can range from -32768 thru
	    32767.  If a system requests a "Query" of available areas, the
	    reply message will only show echo bases that are available to
	    his security level.  Protection lines have the following syntax:
	    
PROTECT <AreaTag> <Security Level>
	    
	    Where <AreaTag> is the tag of the echomail base, and security
	    level is the lowest security level that is allowed to add this
	    area.

      D.  Input and Output -
	    It is possible to have Paragon AreaFix operate on other files
	    than your AREAS.CTL.  If for testing or other purposes it this
	    becomes necessary, you may change the input and output files
	    via the "INPUT" and "OUTPUT" keywords.  Their syntax is:
	    
INPUT <InputFile>
OUTPUT <OutputFile>
	    
	    Where <InputFile> and <OutputFile> are the alternate input
	    and output files respectivly.  The default is, of course,
	    Areas.CTL in the BBS's default path.
	    
      F.  Your NetMail area -
	    AreaFix needs to know what message base to search for the
	    messages addressed to it that it is to process.  This message
	    base must have an access level lower than 16, must have the
	    areatag MATRIX, and must be of type "NetMail."  To tell areafix
	    what area to search, use the "SEARCH" keyword.  It MUST appear
	    in the configuration file, or AreaFix will abort.  The syntax
	    for the "SEARCH" keyword is:
	    
SEARCH <BaseNumber>
	    
	    where <BaseNumber> is the number of the message base.
	
      G.  Forwarding protection -
	    If left un-set, any system can request an echo from you and if
	    you are not linked to it, but can get it from another system,
	    AreaFix will send an AreaFix message to that system.  When the
	    first message is received in that echo, an entry will be created
	    for it and each system it is to be connected to.  To prevent a
	    system from accessing the automatic forwarding, you can set the
	    protection of the forwarding higher than the clearance of the
	    individual system.  The syntax for a forwarding protection is:
	    
FORWARD <Security Level>

	    where <Security Level> is the minimum security level that may
	    access the auto-forwarding.
	        
      H.  Misc. notes about the config file -
	    Comments may be indicated by a semi-colon (;) character, which
	    makes the config file parser ignore the rest of the line.
	    Keywords should be the first non-whitespace characters on the
	    line.
	    Not all syntax errors are "fatal", the program may continue
	    after skipping the incorrect line.
	    
 II.  The Areas.CTL file -
	The Areas.CTL file should be as defined by the Paragon BBS
	documentation.  In summary, the file has two types of lines:
	
      A.  Area lines -
    	    The first non-comment line should be an AREA line.  An area
	    line signals the start of a block of addresses, all recieving
	    the echo this Area represents.  They should have the following
	    syntax:
	    
AREA <AreaNum>
	    
	    Where <AreaNum> is the message base number of an EchoMail base.
	    
      B.  Address lines -
    	    Lines following the AREA lines should be address lines, listing
	    the systems that are connected to each EchoMail base.  The
	    syntax should be:
	    
<Net/Node>
	    
	    Where <Net/Node> is the address of the system.
	    The first address listed after an AREA line is considered to
	    be the "feed" of that echo, and that system will be notified
	    of such whenever it receives a list of the areas to which it
	    is connected.
	    
      C.  Comments -
    	    AreaFix will wipe out any comments put in the Areas.CTL file.
	    At the top of the new Areas.CTL file, AreaFix will place a
	    small header, and on every line before each AREA line it places
	    a comment indicating the areatag for the message base.  These
	    comments are simply to make the file more readable to humans,
	    and may be deleted if the sysop so desires.
	    
III.  AreaFix.HPT -
          To keep track of the last message processed, AreaFix creates a
	  "HighPoint" or "High Water Mark" file.  To cause AreaFix to re-
	  scan the entire MATRIX base, you can delete this file.
	  WARNING:  Doing so will cause AreaFix to re-process all of the
	  messages addressed to it, and is NOT recommended at this time.
	  In future versions, AreaFix will mark messages that it has
	  processed as "received" or optionally delete them, but it does
	  NOT at this time.
	  
 IV.  AreaFix.LOG
 	  AreaFix keeps a log of all sessions in AreaFix.LOG.  This file
	  lists times AreaFix was run, indicates what messages were
	  processed, what their origin was, and what changes were made
	  while processing the message.  AreaFix creates the log in a
	  manner to make it easy to see the beginning of each session, and
	  the processing of each message.  It creates a bracket that
	  starts at the beginning of each session, and runs down to the
	  end of the session.  A second bracket indicates the processing
	  of each message, and any errors that occur.  Error marks appear
	  anywhere AreaFix encountered an error.  The mark indicates the
	  severity of the error.  An "E" indicates a fatal error, one that
	  AreaFix was forced to abort after.  A "<" symbol indicates an
	  error that AreaFix was able to work around, usually a syntax
	  error in a config file, or another mild error.  A ":" is a
	  special error symbol indicating an invalid password in a message
	  it was attempting to process.

  V.  EchoReq.LST
	  This is the list of echos you can get from other systems.  It is
	  used for forwarding of requests for echos you don't have.  This
	  file has two different types of lines.
	  
        A.  System lines.  These lines alert AreaFix to which system you
	    are going to begin a list of echos for.  The format for a
	    system line is:

#SYSTEM <Net/Node> <Password>
	    
	    Where <Net/Node> is the address of the system (in the normal
	    Net/Node format.  <Password> is the AreaFix session password
	    you have set up with the sysop of this system.
	
	B.  Echo tag lines.  These lines are what make up the list of echo
	    conferences you can get from the system.  The format for an
	    echo tag line is:

<AREATAG>
	    
	    Where <AREATAG> is the echo conference tag.

 VI.  AreaFix.QUE
 	  This is where AreaFix will put the list of requests that are
	  waiting to be filled.  When a request for an echo comes in,
	  and it is forwarded, AreaFix puts the name of the echo, plus
	  the addresses of all systems that are to be connected to this
	  echo when it comes in.  AreaFix will scan this list, and then
	  compare the list with the area tags that Paragon has in memory.
	  If it finds a match, it creates an entry in AREAS.CTL and adds
	  all the systems listed.  The line is then deleted.  You can
	  trick AreaFix into adding a bunch of systems for you by entering
	  lines into this file by yourself.  The format of each line is:

<AREATAG> <Net/Node> <Net/Node> <Net/Node> <Net/Node> ....

	  Where, as usual, <AREATAG> is the echo conference tag, and the
	  <Net/Node>'s are the addresses of all the systems that are to
	  be connected to that echo.  It will NOT add any system that is
	  already connected to the echo, and it will not create duplicate
	  AREA lines in AREAS.CTL if the area already exists.


========================================
What is the format of a command message?
========================================


  I.  The message header -
	These are all parts of the header of the message:
      
      A.  The TO: line -
            The message must be addressed to "Areafix" or another alias
	    as configured in the AreaFix.CFG file.
	
      B.  The Subject line -
	    The subject line has the following format:
	      
	      <Password> [-cmd] [-cmd] [-cmd]
	      
	  1.  <Password> -
	        <Password> is the password set up for the system that
	        sent this message.  Passwords can be set in the
	        AreaFix.CFG file, see there for more details.
		  
	  2.  Subject line commands -
		These options are all available by placing them on the
	        subject line of the command message, after the password,
	        separated by at least one space.
	      
	      a.  Query -
		    A system may request a list of all available areas by
		    attaching a query request onto the subject line.  The
		    syntax is simply "-q".  The system will see only a list
		    of areas that are available to it, with areas that are
		    currently active marked with an asterisk (*).
		    
	      b.  List request -
		    This command will attempt to send (converted to a
		    message) the file AvailAreas.TXT.  The intention of
		    this function was to provide a list of areas each
		    system can request, but it could be used for other
		    purposes as well.  The syntax is "-l".
		
	      c.  Re-scan request
		    When this command is present, it causes the "High
		    message sent via net" pointer to be set at the lowest
		    message number in the each message area listed in the
		    message body.  The syntax of this is "-r".
		
 II.  The message body -
 	The message body is simply a list of areatags.  If the areatag is
        preceded by a minus sign (-), the system sending the message is
        removed from the list of systems getting that EchoMail base.  If
        nothing precedes the areatag, it is added (and/or rescanned, see
        previous section I-B-2-c).  The list should be terminated by a
        "tear line", which is simply three minus signs (-) in a row (---).
        Paragon AreaFix will ignore any text in a line following a semi-
	colon (;), allowing comments to be sent along with the message.
        
III.  A sample message -
	Here follows a sample message:
Header:	|
	|From: Sysop
	|To  : AreaFix
	|Dest: 268/106
	|Subj: password -q -l -r
	======================================================
Body:	|AMIGA
	|-AMIGA_PROG
	|AMY_POINT
	|PARAGON
	|---
	|
	
	This message would have the effect of:
	Requesting a query list, requesting an available areas list, and
	adding and/or re-scanning the AMIGA echo, removing the source system
	from the AMIGA_PROG echo, adding and/or rescanning the AMY_POINT
	echo, and adding and/or rescanning the PARAGON echo.

=============================
What's this forwarding stuff?
=============================

Well, you may not get all the echos in the world, because no one wants them
from you, and you don't read them.  But, if a system that you feed decides
he wants to connect to one, it would be a real pain to have to do all the
adding by yourself, so AreaFix can help out.  You just provide it with a
list of echos, where it can get them from, and what AREAFIX session password
to use when sending a command message.  If a request comes in to your system
asking for connection to one of these echos, AreaFix will reply "Forwarded
Request" and it will do just that.  It will send out an AreaFix message to
the system you have indicated, requesting connection to that echo.  When the
first message comes is imported for that conference, Paragon MailProc will
create the appropriate message base.  The next time AreaFix is run, it will
notice the echo is available, and correctly modify the AREAS.CTL file to
connect the echo to your feed, and the system that requested it.  Quite
useful.  This is still in development, but should work fine.  If you find
any problems with this, PLEASE report them immediately.

====================================
What's in store for Paragon AreaFix?
====================================

************* Note: I just added this, it SHOULD work.  See above!
Well, there are a lot of things I plan to do with it.  First and foremost
is to have it handle forwarding of requests... This way, if one of the
systems you feed requests an EchoMail area that you do not currently
recieve, and they have a sufficient access, it will scan a list and find
out which of your feeds (if any) DOES have this echo, then generate a
message to that system's AreaFix (or equivalent) requesting connection.
Once the area is connected, and messages start comming in, it will connect
the system that originally requested this echo.  As I said, this is a
future plan, I've got a lot of things to work out before this is done.
*************

Other ideas include addition of some form of automatic message/file
sending to systems, as in a "Robot" mail program.  This is even further
on the horizon.

=================================
What do I owe for this program?!?
=================================

Nothing!  You owe absolutely NOTHING.  On the other hand, I won't exactly
stop you from showering me or my BBS with Public Domain or ShareWare
software.

==============================
Can I get the source for this?
==============================

You CAN, but only by request, and I don't want it freely distributed.
Paragon AreaFix was written completely in C, and compiled with what I
think is currently the BEST compiler for the Amiga, Lattice C 5.04.  If
you are thinking of writing some utilities for Paragon, the source may
be of use to you.  Simply call up my BBS (listed below) and leave me a
message.  I will probably reply immediately, and attach the file to the
reply.  On your next call, you will (probably!) be able to download it.
I only wish to keep track of where the source is going, and what it's
being used for.  I do ask something in return, though... that you upload
to me the finished product if you write a PD, ShareWare or FreeWare utility.
I am kind of greedy, and I want all the latest and greatest Paragon BBS
utilities that I can get my hands on!

================================================
Where do I send the salutations and suggestions?
================================================
	
	All suggestions/compliments/constructive criticism can usually get
	to me by:
	
	My BBS:  (currently:)
	The Enterprise BBS
	Fido Address (1:268/106)
	Bushkill, Pa.
	(717) 588-7636
	
	or, leave a message to me on:
	
	The Inner Circle, Paragon support BBS:
	(508) 393-3875

GOOD LUCK!

