There are several file directives that can be used within the FORWARD.BBS file. Directives are special commands that can alter the normal processing of the file.

4.1 File Inclusion Directive

At any time within the forward.bbs file, you can include the contents of another file, by using the 'include' directive. This allows you to compose a file with common information, and include it easily at several places. Then you only have one place to make any changes at, and less chances of having incorrect information in a section due to forgetting to update several places in the file.

The file inclusion directive was added in TNOS 2.02pl2, and can be found in any release after that release.

Once the included file is completed, the original file will continue being processed from the place where the 'include' directive was found. You CANNOT 'include' a file WITHIN an included file, though.

An example of including a common file of area names from within a BBS's AREA attribute would look like:

        AREAS = {
         include /nos/etc/public.areas

4.2 Conditional Processing Directives

There are several directives that allow you to have conditional statements in the FORWARD.BBS file. These conditional directives allow you to have a greater deal of flexibility, in that they permit you to set different attributes based on the number of connect attempts, the time of day, and the 'forward mode' setting.

Use of Conditionals

The IF conditional directive allows you to test certain conditions, and (if they match a desired value) allow you to act differently based on this condition. You can also reverse the condition, with the use of the ELSE conditional directive. Each IF directive must end with a ENDIF directive. The ELIF directive is a shortcut for ELSE followed by a second IF, and eliminates an ENDIF in the process.

The use of 'if-else-elif-endif' to conditionally process the file is allowed anywhere in the file, except WITHIN an attribute (like AREAS or SCRIPT). You can nest conditional processing within other conditional processing up to 20 levels deep. Both of the following styles are supported:

        if xxxxxx               if aaaaaaa
         attributeA              attribute1
         if yyyyyy              elif bbbbbbb
          attributeB             attribute2
         else                   elif ccccccc
          attributeC             attribute3
         endif                  else
        else                     attribute4
         attributeD             endif

While conditions are *NOT* allowed within a SCRIPT Attribute and an AREAS Attribute, multiple SCRIPT/AREAS Attributes can be in a BBS's entry, with some being contained completely WITHIN conditional processing. Multiple SCRIPT/AREAS Attributes are appended in the order found.

Supported Conditionals

The following are the presently supported conditions that can be tested with conditional directives:

if TIME = hhmm-hhmm

checks to see if the current time is within the time range given.

if TRY = xx

checks to see if the connection attempt matches the number 'xx'. This can be used to set up multiple connection methods. The first attempt is 'TRY = 1'. When a message from a specific area is to be placed in a BBS's forwarding queue, it ALWAYS processes that BBS's entry with 'TRY = 1' and the time set to the current time.

if MODE = xx

checks to see if the forwarding mode matches the number 'xx'. This can be used to set up different forwarding profiles, such as for emergencies, etc. The MODE conditional directive was added in TNOS 2.02pl1, and can be found in any release after that release.

if DAYOFWEEK = xx (or: if DAYOFWEEK = xx-yy)

checks to see if the current day of the week is acceptable. If the first form of this conditional is used, it must be the given day of the week. If the second form is used, then the current day of the week must be within the range specified. The values are numeric. Sunday is 0, and Saturday is 6. The DAYOFWEEK conditional directive was added in TNOS 2.20, and can be found in any release after that release.