home *** CD-ROM | disk | FTP | other *** search
/ Shareware 1 2 the Maxx / sw_1.zip / sw_1 / PROGRAM / ODOORS34.ZIP / OPENDOOR.DOC < prev    next >
Text File  |  1992-05-07  |  358KB  |  6,197 lines

  1.  
  2. ┌─────────────────────────────────────────────────────────────────────────────┐
  3. │ OpenDoors Programmer's Manual ────────────────────────────────────── Page 1 │
  4. └─────────────────────────────────────────────────────────────────────────────┘
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.             ╔════════════════════════════════════════════════════╗
  18.             ║   ┌─────┐                                          ║
  19.             ║   │     │┌────┐┌───┐┌──┐                           ║
  20.             ║   │     ││    │├───┘│  │                           ║
  21.             ║   └─────┘├────┘└─── │  ├────┐                      ║
  22.             ║          │             │    │┌───┐┌───┐┌─── ┌──    ║
  23.             ║                        │    ││   ││   ││    └──┐   ║
  24.             ║                        └────┘└───┘└───┘│     ──┘   ║
  25.             ║                    ────────────                    ║
  26.             ║                    Version 3.40                    ║
  27.             ╚════════════════════════════════════════════════════╝
  28.              (C) Copyright 1992, Brian Pirie. All Rights Reserved.
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.        NOTE: Since this manual is likely something that you will want to
  53.              refer to at the same time you're actually working with
  54.              OpenDoors, looking at the sample source code, or writing
  55.              your own doors, it is highly recommended that you take a
  56.              moment to print it out. Simply type COPY OPENDOOR.DOC PRN
  57.              from your DOS prompt! If Your printer does not support the
  58.              extended ascii characters used in this document, simply type
  59.              CONVERT command, followed by COPY OPENDOOR.TXT PRN.
  60.  
  61.  
  62. ┌─────────────────────────────────────────────────────────────────────────────┐
  63. │ OpenDoors Programmer's Manual ────────────────────────────────────── Page 2 │
  64. └─────────────────────────────────────────────────────────────────────────────┘
  65.  
  66.  
  67.                               TABLE OF CONTENTS
  68.  
  69.        1.) Table of Contents ......................................... 2
  70.  
  71.        2.) Introduction to OpenDoors ................................. 5
  72.                  i.) Door-Driver Portion ............................. 5
  73.                 ii.) System File Engine .............................. 8
  74.  
  75.        3.) Demo Version and Ordering Information ..................... 9
  76.                  i.) About the Demo Version .......................... 9
  77.                 ii.) Ordering Information ........................... 10
  78.                iii.) Order Form ..................................... 11
  79.  
  80.        4.) About the Manual ......................................... 14
  81.  
  82.        5.) Compiling Programs with OpenDoors ........................ 15
  83.  
  84.        6.) Door Programming With OpenDoors .......................... 16
  85.                  i.) Basics Of Door Programming ..................... 16
  86.                 ii.) RAVote Demo Door ............................... 18
  87.                         DORINFO1.DEF File Format .................... 18
  88.                         Door Function Keys .......................... 19
  89.                iii.) "Door-Driver" related functions ................ 22
  90.                         od_clear_keybuffer() ........................ 22
  91.                         od_clr_line() ............................... 23
  92.                         od_clr_scr() ................................ 24
  93.                         od_disp() ................................... 25
  94.                         od_disp_str() ............................... 26
  95.                         od_emulate() ................................ 27
  96.                         od_exit() ................................... 28
  97.                         od_get_key() ................................ 29
  98.                         od_init() ................................... 30
  99.                         od_input_str() .............................. 31
  100.                         od_kernal() ................................. 32
  101.                         od_list_files() ............................. 33
  102.                         od_page() ................................... 34
  103.                         od_printf() ................................. 35
  104.                         od_repeat() ................................. 36
  105.                         od_send_file() .............................. 37
  106.                         od_set_attrib() ............................. 40
  107.                         od_set_cursor() ............................. 41
  108.                 iv.) OpenDoors Control Structure .................... 42
  109.                         BBS door information files table ............ 43
  110.                         Control Structure Variables table ........... 44
  111.  
  112.        7.) Accessing BBS system and configuration files ............. 56
  113.                  i.) Main Configuration file(s) ..................... 57
  114.                         Configruation structure ..................... 58
  115.                         od_read_config() ............................ 68
  116.                         od_write_config() ........................... 68
  117.                 ii.) File Areas Configuration ....................... 69
  118.                         File Areas structure ........................ 70
  119.                         od_read_files() ............................. 71
  120.                         od_write_files() ............................ 71
  121.  
  122.  
  123. ┌─────────────────────────────────────────────────────────────────────────────┐
  124. │ OpenDoors Programmer's Manual ────────────────────────────────────── Page 3 │
  125. └─────────────────────────────────────────────────────────────────────────────┘
  126.  
  127.  
  128.  
  129.  
  130.                iii.) Message Areas Configuration .................... 72
  131.                         File Areas structure ........................ 73
  132.                         od_read_msgs() .............................. 76
  133.                         od_write_msgs() ............................. 76
  134.                 iv.) System Events Configuration .................... 77
  135.                         Events file structure ....................... 77
  136.                         od_read_events() ............................ 79
  137.                         od_write_events() ........................... 79
  138.                  v.) External Protocols Configuration ............... 80
  139.                         External Protocols structure ................ 80
  140.                         od_read_protocols() ......................... 82
  141.                         od_write_protocols() ........................ 82
  142.                 vi.) Accessing the Node Activity File ............... 83
  143.                         Node activity structure ..................... 83
  144.                         od_useron_open() ............................ 85
  145.                         od_useron_read() ............................ 86
  146.                         od_useron_write() ........................... 87
  147.                         od_useron_close() ........................... 88
  148.                vii.) Accessing the BBS Call history ................. 89
  149.                         Call History structure ...................... 89
  150.                         od_calls_open() ............................. 91
  151.                         od_calls_read_next() ........................ 92
  152.                         od_calls_add() .............................. 93
  153.                         od_calls_close() ............................ 94
  154.               viii.) BBS Timelog .................................... 95
  155.                         The Timelog structure ....................... 95
  156.                         od_read_timelog() ........................... 96
  157.                 ix.) Accessing BBS menu files ....................... 97
  158.                         The Menu File structure ..................... 98
  159.                         od_read_menu() .............................. 99
  160.                         od_write_menu() ............................. 99
  161.  
  162.        8.) Accessing BBS user base file(s) ......................... 100
  163.                  i.) The user record ............................... 100
  164.                 ii.) od_open_users() ............................... 104
  165.                iii.) od_read_user() ................................ 105
  166.                 iv.) od_write_user() ............................... 106
  167.                  v.) od_add_user() ................................. 107
  168.                 vi.) od_close_users() .............................. 108
  169.  
  170.  
  171. ┌─────────────────────────────────────────────────────────────────────────────┐
  172. │ OpenDoors Programmer's Manual ────────────────────────────────────── Page 4 │
  173. └─────────────────────────────────────────────────────────────────────────────┘
  174.  
  175.  
  176.  
  177.  
  178.        9.) Using the Message Base Manipulation Routines ............ 109
  179.                  i.) The message base information structure ........ 110
  180.                 ii.) The message header structure .................. 110
  181.                iii.) od_msg_open() ................................. 114
  182.                 iv.) od_msg_post() ................................. 115
  183.                  v.) od_msg_read_hdr() ............................. 117
  184.                 vi.) od_msg_read_text() ............................ 118
  185.                vii.) od_msg_change_hdr() ........................... 119
  186.               viii.) od_msg_close() ................................ 120
  187.  
  188.       10.) Troubleshooting Common Problems ......................... 121
  189.                  i.) Steps to solving any OpenDoors Problem ........ 121
  190.                 ii.) Using the od_errno variable ................... 122
  191.                iii.) Handy troubleshooting chart ................... 123
  192.  
  193.       11.) OpenDoors History ....................................... 125
  194.  
  195.       12.) Closing words and information on future versions ........ 130
  196.  
  197.  
  198. ┌─────────────────────────────────────────────────────────────────────────────┐
  199. │ OpenDoors Programmer's Manual ────────────────────────────────────── Page 5 │
  200. └─────────────────────────────────────────────────────────────────────────────┘
  201.  
  202.  
  203.  
  204. ┌─ INTRODUCTION TO OPENDOORS ─┐
  205. └─────────────────────────────┘
  206.  
  207.               Welcome to OpenDoors, a powerful new product that allows
  208.        Turbo C programmers to easily write utilities and doors for
  209.        Bulletin Board Systems. There are two distinct, though closely
  210.        integrated portions to OpenDoors. The "door driver" section
  211.        provides a complete system to allow you to EASILY and QUICKLY
  212.        write very high-quality BBS doors that will run on all popular
  213.        BBS systems. The second portion of OpenDoors provides you with a
  214.        complete set of functions for easily accessing and manipulating
  215.        Apex and RemoteAccess system files such as configuration, system
  216.        information files, and even a complete set of routines for
  217.        accessing the message base. You can easily write programs that
  218.        take advantage of one, the other, or both portions of OpenDoors.
  219.        Here is a quick overview of both parts of the OpenDoors package,
  220.        that will give you a good idea of what you can accomplish when
  221.        using OpenDoors:
  222.  
  223.            ───────────────────────
  224.            THE DOOR DRIVER PORTION
  225.            ───────────────────────
  226.  
  227.               OpenDoors supplies you with a complete "door driver"
  228.        library that allows you to write doors that DIRECTLY support one
  229.        of the largest variety of BBS systems, including Apex,
  230.        RemoteAccess, QuickBBS, PC-Board, Maximus, Opus, WildCat, WWIV,
  231.        Spitfire, SuperBBS, RBBS-PC, TriTel and GAP. Interested in
  232.        writing your own utility doors? Perhaps on-line games? Would you
  233.        you even like to get into the market of selling your doors for
  234.        others to use? Or do you just want to make your own BBS unique by
  235.        running "custom" doors? Well, now you can, easier than ever
  236.        before! Unlike other such "door drivers", OpenDoors provides all
  237.        of the following features:
  238.  
  239.               ■ OpenDoors handles all the "dirty" work involved in
  240.                 writing door programs. Interested in writing doors for
  241.                 BBSes, either your own, or to distribute (even sell!) to
  242.                 other people? OpenDoors will allow you to easily create
  243.                 door programs in the same manner as you would any other
  244.                 program, by calling it's simple functions to input,
  245.                 output and control door operation.
  246.  
  247.               ■ As you would expect, OpenDoors flawlessly monitors
  248.                 carrier detect functions, to automatically recover when
  249.                 a user drops carrier - without you having to do anything
  250.                 extra in your program. OpenDoors also monitors how much
  251.                 time the user has left in the door, and provides a
  252.                 fully-adjustable inactivity timeout monitor.
  253.  
  254.  
  255. ┌─────────────────────────────────────────────────────────────────────────────┐
  256. │ OpenDoors Programmer's Manual ────────────────────────────────────── Page 6 │
  257. └─────────────────────────────────────────────────────────────────────────────┘
  258.  
  259.  
  260.  
  261.               ■ OpenDoors takes care of all the work involved in reading
  262.                 and writing BBS door caller information files, such as
  263.                 DORINFO1.DEF files, for full communication with the BBS
  264.                 under which the door is running. If extended information
  265.                 is available to OpenDoors, it will provide you with just
  266.                 about everything you could ever want to know about the
  267.                 user on-line, the system your door is running under, and
  268.                 so on.
  269.  
  270.               ■ OpenDoors also does all the work involved in displaying
  271.                 and automatically updating the RemoteAccess style status
  272.                 line, with information available to the sysop such as
  273.                 user name, location, baud rate, time left, function
  274.                 keys, ANSI and AVATAR settings, and so on. OpenDoors
  275.                 even keeps track of a user "wants-chat" indicator, just
  276.                 like the one in Apex, RemoteAccess, QuickBBS and other
  277.                 BBS systems.
  278.  
  279.               ■ OpenDoors automatically provides the sysop with all the
  280.                 standard function keys for adjusting user time, hanging
  281.                 up on or even locking out the user, and so on. OpenDoors
  282.                 also provides you with a chat mode, which is available
  283.                 to the sysop by pressing Alt-C. In addition, the door
  284.                 driver has full support for sysop shell to dos,
  285.                 activated by the Alt-J key.
  286.  
  287.               ■ OpenDoors has full support for locked baud-rates of up
  288.                 to 38,000 baud, using the FOSSIL driver for maximum
  289.                 compatibility with any system. To output text in your
  290.                 door, you simply call one print function. This function
  291.                 looks after all communication with the modem, and also
  292.                 echos the output to the local screen (referred to as
  293.                 twining the output). OpenDoors also automatically
  294.                 detects if the user is on in local mode, and will
  295.                 function as expected.
  296.  
  297.               ■ Other OpenDoors functions include a built in sysop-page
  298.                 function that will ask the user why he wishes to chat,
  299.                 and then proceed to page the sysop, just as any BBS
  300.                 package would. OpenDoors also provides screen clearing
  301.                 functions (which will detect whether the user has screen
  302.                 clearing turned on), and various ANSI control functions
  303.                 (which again detect if the user has ANSI mode turned
  304.                 on).
  305.  
  306.               ■ And as if that weren't enough OpenDoors is now DesqView
  307.                 aware. When OpenDoors starts up, it will automatically
  308.                 check for the presence of DesqView, and if available,
  309.                 will perform all of it's screen output through DesqView.
  310.  
  311.  
  312. ┌─────────────────────────────────────────────────────────────────────────────┐
  313. │ OpenDoors Programmer's Manual ────────────────────────────────────── Page 7 │
  314. └─────────────────────────────────────────────────────────────────────────────┘
  315.  
  316.  
  317.  
  318.               ■ What's more, OpenDoors is designed to be very easy to
  319.                 use. Even the most novice `C' programmers have been able
  320.                 to write professional-quality doors with OpenDoors. It
  321.                 takes care of just about every detail for you, yet still
  322.                 gives you the ability to fully control and customize
  323.                 every detail of your door's performance.
  324.  
  325.               ■ OpenDoors also comes with the source code for a
  326.                 user-voting door, RAVOTE, that you can modify, or simply
  327.                 use bits and pieces from for your own doors.
  328.  
  329.               ■ You may also elect to purchase the source code for
  330.                 OpenDoors, which will permit you to make modifications
  331.                 to any portion of OpenDoors, or to use any poritions of
  332.                 the OpenDoors source code in other programs you write.
  333.  
  334.  
  335. ┌─────────────────────────────────────────────────────────────────────────────┐
  336. │ OpenDoors Programmer's Manual ────────────────────────────────────── Page 8 │
  337. └─────────────────────────────────────────────────────────────────────────────┘
  338.  
  339.  
  340.  
  341.            ──────────────────────
  342.            THE SYSTEM FILE ENGINE
  343.            ──────────────────────
  344.  
  345.               This second portion of the OpenDoors gives you complete
  346.        access to BBS system, user and configuration files, along with a
  347.        complete set of routines for manipulating the message base. Below
  348.        some of the key features of this section of the OpenDoors package
  349.        are listed for you. Keep in mind that all these features are VERY
  350.        EASY to use (even though they may sound rather complicated)!
  351.  
  352.               ■ Automatic detection and conversion from various BBS
  353.                 system file formats. Although the current version of
  354.                 OpenDoors only supports Apex and RemoteAccess compatible
  355.                 system files, and the Hudson format message base, future
  356.                 versions will automatically detect and support many
  357.                 other BBS file formats as well. For example, you will be
  358.                 able to use the same "read user record" function for
  359.                 Apex/RemoteAccess/QBBS style and PC-Board style user files.
  360.  
  361.               ■ OpenDoors will automatically convert the system and
  362.                 configuration variables to and from C format for you.
  363.                 Thus, even though the configuration file may store
  364.                 filenames in Pascal format strings - they will be
  365.                 converted to C format for your use.
  366.  
  367.               ■ This portion of OpenDoors can be used to access all of
  368.                 the main configuration, file area and message area
  369.                 configuration files. It also gives you full access to
  370.                 the user base, along with other key system files.
  371.  
  372.               ■ The Hudson message base routines (which will
  373.                 TRANSPARENTLY support other message base formats in
  374.                 future versions) include functions for posting new
  375.                 messages, deleting existing messages, reading message
  376.                 text and reading message headers. (Message headers
  377.                 include information such as the subject of the message,
  378.                 who it is addressed to, and the like). The message base
  379.                 routines will optionally support the RA 1.01 Hudson
  380.                 Message Base Locking scheme. This locking method,
  381.                 which is already supported by many programs such as
  382.                 Apex, RemoteAccess, FrontDoor, Imail, allows for fast
  383.                 and efficent access to the message base by multiple
  384.                 programs concurrently.
  385.  
  386.  
  387. ┌─────────────────────────────────────────────────────────────────────────────┐
  388. │ OpenDoors Programmer's Manual ────────────────────────────────────── Page 9 │
  389. └─────────────────────────────────────────────────────────────────────────────┘
  390.  
  391.  
  392.  
  393. ┌─ ABOUT THIS DEMO VERSION & HOW TO ORDER ─┐
  394. └──────────────────────────────────────────┘
  395.  
  396.               What you have here is the demo version of OpenDoors. This
  397.        version has all the features of the registered version, but can
  398.        only be used under limited circumstances:
  399.  
  400.                    1.) The demo (unregistered) version may only be used
  401.                        for a reasonable evaluation period.
  402.  
  403.                    2.) programs written in this version may not be
  404.                        distributed.
  405.  
  406.               Also, any programs written in the demo version will display a
  407.        message to the user indicating that they are not registered. This
  408.        is, of course, removed in the registered version.
  409.  
  410.               If you decided to purchase OpenDoors, you will become the
  411.        owner of a powerful tool for creating many BBS door and utility
  412.        programs. Registered owners of OpenDoors are entitled to:
  413.  
  414.                    1.) Unlimited use of OpenDoors. You may write as many
  415.                        programs as you wish using OpenDoors, and do what
  416.                        you please with the programs. They may be freely
  417.                        distributed, or even sold. And what's more, there
  418.                        are no additional royalty fees. Your one time
  419.                        purchase of OpenDoors entitles you to use it
  420.                        (almost) as you please.
  421.  
  422.                    2.) You will be entitled to free upgrades to newer
  423.                        versions of OpenDoors. If you think this version
  424.                        of OpenDoors is great, wait for the next version!
  425.                        We are, as you read this, working on adding a
  426.                        large number of new features. (See the end of
  427.                        this document for an outline of features
  428.                        currently "in the works") Any programs you write
  429.                        in this version will automatically take on these
  430.                        new features when you get the new version as
  431.                        well.
  432.  
  433.  
  434.               The best news of all is how cheap OpenDoors is! Other
  435.        "door-drivers" sell for $50, $75, or even more! But the
  436.        door-driver features are only a small portion of what OpenDoors
  437.        can do for you! However, this version of OpenDoors will only cost
  438.        you $28! (I can also guarantee that the price will go up in later
  439.        versions, so if you order today, you'll save by getting ALL
  440.        future upgrades for free.)
  441.  
  442.  
  443. ┌─────────────────────────────────────────────────────────────────────────────┐
  444. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 10 │
  445. └─────────────────────────────────────────────────────────────────────────────┘
  446.  
  447.               Also, the source code for OpenDoors is now available to
  448.        registered users for an additional $28! Ordering a copy of the
  449.        source code will allow you to customize OpenDoors for your own
  450.        use, making any changes or additions that you wish. It also gives
  451.        you the opprotunity to see how OpenDoors works, and to use any
  452.        portions of the OpenDoors code in any other programs you wish to
  453.        write.
  454.  
  455.  
  456.               You may order OpenDoors by any of the following manners:
  457.  
  458.        1.) RECEIVING YOUR REGISTRATION KEY / SOURCE CODE BY MAIL:
  459.                    ■ Fill out the order form and mail it along with your
  460.                      payment as described below
  461.                    ■ Enclose a self-addressed, stamped envelop, to
  462.                      receive your registration key.
  463.  
  464.        2.) RECEIVING YOUR REGISTRATION / SOURCE CODE BY BBS MESSAGE:
  465.                    ■ Fill out the order form and mail it along with your
  466.                      payment as described below
  467.                    ■ Include phone #, baud rate, and my login and
  468.                      password for the BBS to which you wish me to leave
  469.                      a message containing your registration key. I will
  470.                      cover any long distance costs.
  471.  
  472.        3.) RECEIVING YOUR REGISTRATION KEY / SOURCE CODE BY FIDONET CRASHMAIL:
  473.                    ■ Fill out the order form and mail it along with your
  474.                      payment as described below
  475.                    ■ Include the FidoNet node address to which you wish
  476.                      me to send your registration key to. (via
  477.                      CrashMail) Again I will cover any long distance
  478.                      costs.
  479.                    ■ Be sure that your system is configured to allow calls
  480.                      from UNLISTED POINTS.
  481.  
  482.  
  483. -------------------------------------------------------------------------------
  484. OPENDOORS 3.40 Order Form: (If you do not have a printer, send a hand-drawn
  485.                             version of this order form.)
  486. -------------------------------------------------------------------------------
  487.  
  488.                  Your Full Name: _____________________
  489.  
  490.                    Your Address: ______________________________
  491.  
  492.      Your City & State/Province: ______________________________
  493.  
  494.  Your Postal Zip Code & Country: ____________________________________
  495.  
  496.         Your Voice Phone Number: (____) ____  -  ________
  497.  
  498. Your Data Phone Number (if any): (____) ____  -  ________
  499.  
  500.   Your FidoNet Address (if any): ________________________
  501.  
  502.  
  503.  
  504.    I would like to receive my registration key and/or source code by:
  505.                 ___
  506.                |   | - Conventional mail, I have enclosed a self addressed
  507.                |___|   stamped envolope. (Also include diskette if you are
  508.                        ordering the source code).
  509.  
  510.                 ___
  511.                |   | - Message on my BBS:
  512.                |___|           Name of BBS: ______________________
  513.  
  514.                        Phone number of BBS: (____) ____ - _______
  515.  
  516.                        Brian Pirie's logon: ______________________
  517.  
  518.                     Brian Pirie's password: ___________________
  519.  
  520.                          Best time to call: ___________________
  521.  
  522.                 ___
  523.                |   | - FidoNet Crashmail to (node address): _____________
  524.                |___|
  525.  
  526.                                                      Continued on next page...
  527. -------------------------------------------------------------------------------
  528.  
  529. -------------------------------------------------------------------------------
  530.  Where did you get your copy of OpenDoors?
  531.  
  532.              ____________________________________________________________
  533.  
  534.  
  535.  
  536.  Which compiler and version are you using?  (eg. Turbo C++ 1.00)
  537.  
  538.              ____________________________________________________________
  539.  
  540.  
  541.  
  542.  What do you like most about OpenDoors?
  543.  
  544.              ____________________________________________________________
  545.  
  546.              ____________________________________________________________
  547.  
  548.              ____________________________________________________________
  549.  
  550.              ____________________________________________________________
  551.  
  552.  
  553.  
  554.  What would you like to see in future versions of OpenDoors?
  555.  
  556.              ____________________________________________________________
  557.  
  558.              ____________________________________________________________
  559.  
  560.              ____________________________________________________________
  561.  
  562.              ____________________________________________________________
  563.  
  564.  
  565.  I WOULD LIKE TO ORDER:   ___
  566.  ^^^^^^^^^^^^^^^^^^^^^   |   | - Just my registration key, for $28
  567.                          |___|
  568.                           ___
  569.                          |   | - Just the source code (ONLY IF ALREADY
  570.                          |___|   REGISTERED), for $28
  571.                           ___
  572.                          |   | - Both registration key and source code,
  573.                          |___|   for $56
  574.  
  575.  
  576.   * I have enclosed a cheque or money order ($28 for the registration,
  577.     or $56 for both registration and source code) in Canadian or U.S.
  578.     currency, payable to Brian Pirie.
  579.  
  580.                                                    ____________________________
  581.                                                    Signature
  582. -------------------------------------------------------------------------------
  583.  
  584.  
  585. ┌─────────────────────────────────────────────────────────────────────────────┐
  586. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 13 │
  587. └─────────────────────────────────────────────────────────────────────────────┘
  588.  
  589.  
  590.  
  591.               After you have filled out this order form, enclose your
  592.        cheque or money order in Canadian or U.S. currency, PAYABLE TO
  593.        BRIAN PIRIE, and mail it (along with your self stamped,
  594.        self-addressed envolope & diskette, if you wish to receive your
  595.        copy by conventional mail), to:
  596.  
  597.                           Brian Pirie
  598.                           Apt. 1416 - 2201 Riverside Dr.
  599.                           Ottawa, Ontario
  600.                           Canada
  601.                           K1H 8K9
  602.  
  603.               If you have any questions, comments, or suggestions about
  604.        OpenDoors, please feel more than free to contact me by FidoNet
  605.        NetMail to 1:243/1.8
  606.  
  607.  
  608.  
  609. ┌─────────────────────────────────────────────────────────────────────────────┐
  610. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 14 │
  611. └─────────────────────────────────────────────────────────────────────────────┘
  612.  
  613.  
  614.  
  615. ┌─ ABOUT THIS MANUAL ─┐
  616. └─────────────────────┘
  617.  
  618.               Just as OpenDoors is divided into two main portions, the
  619.        "door-driver" and the utility file manipulation functions, this
  620.        manual also deals with these two seperate (though closely
  621.        integrated) sections one at a time. First, the manual deals with
  622.        the "door-driver" portion of OpenDoors, instructing you in the
  623.        methods of door programming with OpenDoors. Following this
  624.        portion of the manual is the reference section for the
  625.        "door-driver" portion of OpenDoors, documenting the door related
  626.        functions, and the "OpenDoors Control Structure". The manual then
  627.        deals with the various system file portions (such as
  628.        configuration, user base and message base toolkits) one at a
  629.        time, first describing the use of each portion, and then
  630.        providing references for the data and functions related to this
  631.        portion. At the end of the manual, you will find several usefull
  632.        appendicies, such as a trouble-shooting guide, a brief history of
  633.        OpenDoors, and information about new OpenDoors features currently
  634.        in the works. For a general overview of OpenDoors' features, see
  635.        pages 4-7 of the manual, and for registration information, see
  636.        pages 8-12. To locate other items in this manual, simply refer to
  637.        the table of contents on pages 2 and 3.
  638.  
  639.               It is suggested that if you wish to get the most out of
  640.        OpenDoors, that you carefully read the sections of the manual
  641.        that describe the use of the features you are using, and at least
  642.        skim other portions of the manual to find out what additional
  643.        features are available. Also, you will likely want to print this
  644.        manual, to make reading and reference while programming easier.
  645.        To print this manual, simply set your printer to a mode that
  646.        supports IBM-graphics characters, and type the following line
  647.        from your DOS prompt:
  648.  
  649.                             COPY OPENDOOR.DOC PRN:
  650.  
  651.  
  652. ┌─────────────────────────────────────────────────────────────────────────────┐
  653. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 15 │
  654. └─────────────────────────────────────────────────────────────────────────────┘
  655.  
  656.  
  657.  
  658. ┌─ COMPILING A PROGRAM WITH OPENDOORS ─┐
  659. └──────────────────────────────────────┘
  660.  
  661.               The process for compiling programs written with OpenDoors
  662.        is very similar to the process for compiling any other program.
  663.        However, there are two additional steps you must remember: to
  664.        include the opendoor.h header file, and to link your program with
  665.        the appropriate OpenDoors library.
  666.  
  667.               All programs written in OpenDoors, must "include" the
  668.        opendoor.h header file. This is easily accomplished by placing
  669.        the line #include "opendoor.h" at the beginning of your Turbo C
  670.        program. You must also link the opendoor library file into
  671.        your program. This can be accomplished by specifically including
  672.        the appropriate library in your project file. If you are
  673.        unfamiliar with the process of using project files, please refer
  674.        to your Turbo C manuals. The library files included with this
  675.        version of OpenDoors are listed in the following chart. Please be
  676.        sure to use the library file that corrosponds to the memory model
  677.        you are using. (Refer to your Turbo C manuals for more
  678.        information on memory models)
  679.  
  680.                 ┌─────────────┬──────────────────────────────────┐
  681.                 │ Library     │ Memory                           │
  682.                 │ Filename    │ Model                            │
  683.                 ├─────────────┼──────────────────────────────────┤
  684.                 │ ODOORT.LIB  │ The Tiny memory model library    │
  685.                 │             │                                  │
  686.                 │ ODOORS.LIB  │ The Small memory model library   │
  687.                 │             │                                  │
  688.                 │ ODOORM.LIB  │ The Medium memory model library  │
  689.                 │             │                                  │
  690.                 │ ODOORC.LIB  │ The Compact memory model library │
  691.                 │             │                                  │
  692.                 │ ODOORL.LIB  │ The Large memory model library   │
  693.                 │             │                                  │
  694.                 │ ODOORH.LIB  │ The Huge memory model library    │
  695.                 └─────────────┴──────────────────────────────────┘
  696.  
  697.        For more information on including thrid-party libraries in your
  698.        programs, please also see your Turbo C manuals.
  699.  
  700.  
  701. ┌─────────────────────────────────────────────────────────────────────────────┐
  702. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 16 │
  703. └─────────────────────────────────────────────────────────────────────────────┘
  704.  
  705.  
  706.  
  707. ┌─ BASICS OF DOOR PROGRAMMING WITH OPENDOORS ─┐
  708. └─────────────────────────────────────────────┘
  709.  
  710.               While OpenDoors allows you to write door programs in
  711.        almost the same manner as you would any normal program, there are
  712.        a few things you should keep in mind, when writing a door
  713.        program in OpenDoors. This section will give you an overview of
  714.        how OpenDoors does it's thing, and what you should know to get
  715.        things to work correctly.
  716.  
  717.               When a Door starts up, one of the first things it must do
  718.        is to read the control files passed to it by the BBS. When a user
  719.        is on-line, and wishes to run a door, they will most likely
  720.        select a command from a menu. At this point, the BBS system (such
  721.        as Apex, RemoteAccess, Maximus, or what have you), will create a
  722.        file of information about the system, who is on-line, and so on.
  723.        Several different BBS packages produce their own style of file.
  724.        OpenDoors currently recognizes many door information files, and
  725.        future versions will recognize others. Thus, your Door will be
  726.        able to run on any system such as Apex and RemoteAccess that
  727.        outputs both of these files, any system such as RBBS-PC, which
  728.        just outputs the DORINFO1.DEF, as well as any system such as
  729.        PC-Board, if a conversion program is used.
  730.  
  731.               The Door itself will actually be loaded in one of two
  732.        manners. Either the BBS will perform a "shell" and run the Door
  733.        while the BBS system resides in memory (often called a type 7
  734.        exit), or will exit to a batch file, which will trap an
  735.        errorlevel and load the appropriate door. (often called a type 15
  736.        exit). In either case, when the door gains control, it will first
  737.        read these files, and then begin to communicate with the modem.
  738.        OpenDoors, as with almost all other door systems, does all it's
  739.        modem communication with the fossil driver. The fossil driver is
  740.        loaded either as a .SYS device driver from Config.Sys at boot-up,
  741.        or from an .EXE file as a TSR program, and provides the BBS
  742.        software with a standard interface layer for communicating with
  743.        just about any type of modem. Hence, whenever your door is not
  744.        running in local mode, it will require a fossil driver, such as
  745.        X00 or BNU to be loaded.
  746.  
  747.               In order to read these door information files into it's
  748.        internal storage structures, to initialize communications with
  749.        the fossil driver, to setup the status line, etc., OpenDoors
  750.        provides a function, od_init();. If you do not explicitly call
  751.        this function, the first call to any other OpenDoors function
  752.        (such as the first time your door program outputs anything) will
  753.        automatically cause the od_init function to be called. However,
  754.        there are times when you will want to know information about the
  755.        user who is on-line, or what-have-you, before you call any other
  756.        OpenDoors functions. In this case, you will have to call
  757.        od_init(); yourself before you do any of these things.
  758.  
  759.  
  760. ┌─────────────────────────────────────────────────────────────────────────────┐
  761. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 17 │
  762. └─────────────────────────────────────────────────────────────────────────────┘
  763.  
  764.  
  765.  
  766.               OpenDoors will provide you with a structure, by the name
  767.        of od_control, which allows you to access all the information
  768.        about the user who is on-line, the system your door is running
  769.        on, and to allow you to adjust various OpenDoors parameters.
  770.        Depending on what BBS system your door is running under, the
  771.        actual information available from the od_control structure will
  772.        vary. For more information on the od_control structure, see the
  773.        section of this manual entitled "The OpenDoors Control
  774.        Structure".
  775.  
  776.               Once the door has initialized itself, it will then begin
  777.        communications with the user who is online. OpenDoors takes care
  778.        of all this communications, with it's various input and display
  779.        functions. When the Door has finished, it will then write any
  780.        information that has changed back into the door information file
  781.        (if applicatble), finish communicating with the modem, and return
  782.        to the BBS. In OpenDoors, this is accomplished with the od_exit()
  783.        function. This function will terminate the doors activity,
  784.        OPTIONALLY hang up on the user (allowing you to provide either
  785.        return to BBS or logoff options for exiting), and then exit with
  786.        the specified errorlevel. You *MUST* exit your door by calling
  787.        the od_exit() function. Exiting without doing this will cause
  788.        strange results, and your door will not function correctly.
  789.  
  790.  
  791.               Thus, the one of the most simple door programs written in
  792.        OpenDoors could look as follows:
  793.  
  794.                       #include "opendoors.h"
  795.  
  796.                       main()
  797.                          {
  798.                          od_disp_str("Welcome to my first Door!\n\r");
  799.                          od_disp_str("Press any key to return to the BBS!\n\r");
  800.                          od_get_key(TRUE);
  801.                          od_exit(10,FALSE);
  802.                          }
  803.  
  804.               Again, notice the inclusion of the opendoors.h file. All
  805.        doors written with OpenDoors must include the OPENDOORS header
  806.        file in order to compile correctly. The first two lines in the
  807.        main function simply call the OpenDoors display string function
  808.        (which sends the output to both the modem and the local screen).
  809.        The next line is the OpenDoors single-key input function. The
  810.        TRUE value causes the system to wait for a keypress (again,
  811.        either from remote or local keyboard). The last line of the main
  812.        function then ends the door, returning an errorlevel of 10. The
  813.        FALSE indicates that you do not wish to have OpenDoors terminate
  814.        the call (hang up on the user). If you placed a TRUE in its
  815.        place, then a remote user would be logged off when the door
  816.        exits. Try compiling this program as described in the section
  817.        "COMPILING A PROGRAM WITH OPENDOORS", then try running it from
  818.        your BBS. Congratulations, you have written your first door!
  819.  
  820.  
  821. ┌─────────────────────────────────────────────────────────────────────────────┐
  822. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 18 │
  823. └─────────────────────────────────────────────────────────────────────────────┘
  824.  
  825.  
  826.  
  827.               For more information on the functions available from
  828.        OpenDoors, or the control structure, see the corresponding
  829.        sections in this manual. It would also be a very good idea if you
  830.        had a look at the sample door included with OpenDoors, RAVote.
  831.  
  832.  
  833.  
  834.  
  835.  
  836. ┌─ THE SAMPLE DOOR: RAVOTE ─┐
  837. └───────────────────────────┘
  838.  
  839.               One of the best ways to really see how OpenDoors works,
  840.        and how much potential it has, is to look at the source code for
  841.        the sample door included, RAVote. While this is by no means a
  842.        complex door, it should certainly give you a good idea of how
  843.        things work with OpenDoors, and will likely give you many ideas
  844.        for your own doors. You can run the door as included in the
  845.        archive by typing RAVOTE (the archive also contains a sample
  846.        DORINFO1.DEF file, which will allow you to test any doors in
  847.        local mode.) If you wish to manually create your own DORINFO1.DEF
  848.        file, you can do so very easily. This is a simple text file with
  849.        a different piece of information on each line, in the following
  850.        format:
  851.  
  852.        ┌──────────────┬────────────────────────┬───────────────────┐
  853.        │ LINE NUMBER  │ DESCRIPTION            │ EXAMPLE           │
  854.        ├──────────────┼────────────────────────┼───────────────────┤
  855.        │     1        │ Name of the BBS        │ MY OWN BBS        │
  856.        │     2        │ Sysop's first name     │ BRIAN             │
  857.        │     3        │ Sysop's last name      │ PIRIE             │
  858.        │     4        │ Com Port modem is on   │ COM0              │
  859.        │     5        │ Baud rate, etc.        │ 0 BAUD,N,8,1      │
  860.        │     6        │ Unused                 │ 0                 │
  861.        │     7        │ User's first name      │ JOHN              │
  862.        │     8        │ User's last name       │ PUBLIC            │
  863.        │     9        │ Caller's location      │ PETEBOROUGH, ON   │
  864.        │     10       │ ANSI mode (0=off, 1=on)│ 1                 │
  865.        │     11       │ User's security level  │ 32000             │
  866.        │     12       │ User's time left       │ 60                │
  867.        └──────────────┴────────────────────────┴───────────────────┘
  868.  
  869.  
  870.               Also, feel free to make any changes you wish to the door,
  871.        and recompile it! One of the best and most enjoyable ways to
  872.        learn OpenDoors is by experimenting. If you are a registered
  873.        owner of OpenDoors, you may even distribute your own versions of
  874.        this door. Contrary to its name, it will run with any BBS system,
  875.        not just RemoteAccess.
  876.  
  877.  
  878. ┌─────────────────────────────────────────────────────────────────────────────┐
  879. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 19 │
  880. └─────────────────────────────────────────────────────────────────────────────┘
  881.  
  882.  
  883.  
  884.               The RAVote door behaves similarly to most other door
  885.        programs, and will have a fair bit in common with any other door
  886.        you write in OpenDoors. What you see in the output window is
  887.        identical to what the user on remote will be seeing. If the user
  888.        has ANSI mode turned on, you will see the same colours as they
  889.        do, and if they have screen clearing turned on, your screen will
  890.        clear when their's does. The status line at the bottom of the
  891.        screen will list the name of the user currently on-line (if
  892.        you're using the sample DORINFO1.DEF file, the user's name will
  893.        be "The Sysop"), the user's location, and the user's baud rate (0
  894.        if the door is operating in local mode). You will also be told
  895.        how much time the user has left, and there will be indicators as
  896.        to whether the user has ANSI mode on, etc. If the user wishes to
  897.        Chat with the sysop (ie, they have paged the sysop, but haven't
  898.        had a response yet), a [Want-Chat] indicator will be flashing on
  899.        the status line. Try Paging the sysop, using OpenDoors built in
  900.        sysop page feature! The following function keys will also be
  901.        available to the sysop only in any OpenDoors door:
  902.  
  903.               []/[] - Use the arrow keys to increase or decrease how
  904.                         much time the user has left in the door.
  905.  
  906.             [Alt]-[C] - Allows the sysop to break into chat with the
  907.                         user at any time. [Alt]-[C] again, or [ESC] will
  908.                         end chat mode. (notice that the Want-Chat
  909.                         indicator will be turned off if it was flashing
  910.                         too. If your door is running under Apex,
  911.                         RemoteAccess or QuickBBS, paging from within the
  912.                         door will even cause the Want-Chat indicator to
  913.                         stay lit when the user returns to the BBS)
  914.  
  915.             [Alt]-[J] - Allows the sysop to shell to DOS, if enough
  916.                         memory is available. Simply type EXIT to return
  917.                         to the door again.
  918.  
  919.             [Alt]-[H] - Hangup on the user. When the sysop does this,
  920.                         OpenDoors will optionally call a function you
  921.                         have indicated in the OpenDoors control
  922.                         structure, to allow you to close files, etc.
  923.                         OpenDoors will then exit to a batch file with
  924.                         the appropriate errorlevel:
  925.  
  926.                               0 - A critical error has occurred
  927.                               1 - Carrier lost, user off-line
  928.                               2 - Sysop terminated call, user off-line
  929.                               3 - User time used up, user STILL ON-LINE
  930.                               4 - Keyboard inactivity timeout, user
  931.                                   off-line
  932.                           5-255 - Defined by your door
  933.  
  934.                         These errorlevel will allow users of your door
  935.                         to optionally log the user back on-line, place
  936.                         the BBS in "wait for call" mode, or whatever
  937.                         they wish, depending on how the door exited
  938.  
  939.  
  940. ┌─────────────────────────────────────────────────────────────────────────────┐
  941. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 20 │
  942. └─────────────────────────────────────────────────────────────────────────────┘
  943.  
  944.  
  945.  
  946.             [Alt]-[L] - This nasty key locks the user out of the BBS. It
  947.                         first hangs up on the user, and then sets their
  948.                         security level to 0, to prevent them from ever
  949.                         logging on again. This feature may require use
  950.                         of the EXITINFO.BBS file, depending on what
  951.                         system the door is running under.
  952.  
  953.             [Alt]-[K] - The "User Keyboard-Off" key, will allow the
  954.                         sysop to temporarily prevent the user from
  955.                         typing anything on his keyboard. This has no
  956.                         effect on the local keyboard, but causes
  957.                         OpenDoors to ignore any keystrokes from remote.
  958.  
  959.             [Alt]-[N] - The "Sysop Next" key, this function reserves the
  960.                         system for use by the sysop after the user logs
  961.                         off, if the door is running under an Apex or RA
  962.                         1.00 or later system.
  963.  
  964.             [Alt]-[D] - "Drop to BBS" key. This function allows the sysop
  965.                         to exit the door and return the user to the BBS,
  966.                         without hanging up.
  967.  
  968.               Now, let's take a closer look at the actual source code
  969.        for the RAVote door. If you haven't already printed out a copy of
  970.        this manual, and possibly the RAVOTE.C file as well, it would
  971.        probably be a good idea to do so now.
  972.  
  973.               Notice that near the top of the program, along with all
  974.        the standard header files, the OPENDOOR.H file is included. This
  975.        file must be included in all programs written under OpenDoors. If
  976.        you are placing the OPENDOOR.H file in the same directory as the
  977.        door you are compiling, simply include the line:
  978.  
  979.                              #include "opendoor.h"
  980.  
  981.        in your program. If you are placing the OPENDOOR.H in your
  982.        include directory, along with the rest of your header files, use
  983.        the line:
  984.  
  985.                              #include <opendoor.h>
  986.  
  987.               You may notice the file structure just before the main
  988.         function in the RAVote door. RAVote stores it's data file of
  989.         questions, results, and who has voted on what in a single fixed
  990.         length file called RAVOTE.BBS. This file is simply a direct
  991.         image of the file structure. The elements in this structure
  992.         includes the total number of questions, the total number of
  993.         users that the door knows about, the questions they have and
  994.         have not voted on, the actual questions and answers themselves,
  995.         and so on.
  996.  
  997.  
  998. ┌─────────────────────────────────────────────────────────────────────────────┐
  999. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 21 │
  1000. └─────────────────────────────────────────────────────────────────────────────┘
  1001.  
  1002.  
  1003.  
  1004.               Next, the RAVote door checks for any command line
  1005.         parameters. If there are any, the first one is taken as the path
  1006.         to the DORINFO1.DEF and EXITINFO.BBS files. If no command line
  1007.         parameter is specified, then RAVote will not change the value of
  1008.         the od_control.info_path variable, which will cause OpenDoors to
  1009.         look for these files in the current directory. This is a good
  1010.         feature to implement in your doors, either by accepting command
  1011.         line parameters, or in a configuration file, as it will allow
  1012.         people to run your door from its own directory.
  1013.  
  1014.               Next, the RAVote program calls the od_disp_str() function
  1015.         to display its name, etc. to the screen. At this time, the
  1016.         OpenDoors subsystem will also initialize itself, setting up
  1017.         several internal structures, reading the user information files
  1018.         (DORINFO1.DEF & EXITINFO.BBS), and will begin communicating with
  1019.         the modem (if it is not running in local mode). The next line in
  1020.         the main() function of the RAVote door looks as follows:
  1021.  
  1022.                 od_control.od_before_exit=save_file;
  1023.  
  1024.               This line simply tells OpenDoors to call the save_file()
  1025.         function (to save the RAVOTE.BBS data file) before it exits. If
  1026.         you do not wish OpenDoors to call any function before exiting,
  1027.         simply leave this variable set to NULL (as it is set in the
  1028.         od_init() function). Since whenever OpenDoors detects a loss of
  1029.         carrier, that the user has used up his/her time, etc., it will
  1030.         exit right away, without returning to your program. Setting up a
  1031.         function to have OpenDoors to call before exiting will allow you
  1032.         to finish any uncompleted business, such as closing data files,
  1033.         or what have you.
  1034.  
  1035.               After RAVote has done all of these door related setup, it
  1036.         moves on to it's own business. If the RAVOTE.BBS file exists in
  1037.         the current directory, it is opened and read. If the file does
  1038.         not exist, then RAVote creates a new one. Next, RAVote searches
  1039.         through the data file for the name of the user who is currently
  1040.         on-line. This allows RAVote to keep track of all the people who
  1041.         have used it, with its own statistics about them. RAVote also
  1042.         compares the name of the user currently on-line to the name of
  1043.         the system's sysop. If they match, the RAVote will also enable
  1044.         it's sysop-only functions, such as deleting questions from the
  1045.         door.
  1046.  
  1047.               Once RAVote has done all of this housekeeping, it is ready
  1048.         to go to work. Before the main menu is displayed each time, you
  1049.         will notice that the screen is cleared (the od_clr_scr()
  1050.         function only clears the screen if the user has screen clearing
  1051.         mode turned on), as well as the keyboard input buffer. The
  1052.         keyboard buffer is cleared by the od_clear_keybuffer() function,
  1053.         to prevent strange things from happening if the user has been
  1054.         pounding on his keyboard while the door is loading, etc. While
  1055.         all the internal OpenDoors functions check for ANSI mode, RAVote
  1056.         also checks itself, so that it does not display extended
  1057.         characters (such as the line and box drawing characters) to
  1058.         users without ANSI capabilities.
  1059.  
  1060.  
  1061. ┌─────────────────────────────────────────────────────────────────────────────┐
  1062. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 22 │
  1063. └─────────────────────────────────────────────────────────────────────────────┘
  1064.  
  1065.  
  1066.  
  1067. ┌─ THE OPENDOORS DOORDRIVER FUNCTIONS ─┐
  1068. └──────────────────────────────────────┘
  1069.  
  1070. ┌─────────────────────────────────────────────────────────────────────────┐
  1071. │OD_CLEAR_KEYBUFFER()   Function to clear the input keyboard buffer       │
  1072. └─────────────────────────────────────────────────────────────────────────┘
  1073.   PROTOTYPE: void od_clear_keybuffer(void)
  1074.  
  1075.      FORMAT: od_clear_keybuffer();
  1076.  
  1077.     RETURNS: N/A
  1078.  
  1079. DESCRIPTION: OpenDoors maintains its own keyboard input buffer, to allow
  1080.              the user to "type ahead". This keyboard input buffer will
  1081.              include both the keys hit by the user on-line, and the
  1082.              non-function keys (ie, Alt-C won't appear in here), hit by
  1083.              the sysop. This allows both the user on-line and the sysop
  1084.              to control the door at any time. If the sysop wishes to
  1085.              temorarily prevent the user from having any control over
  1086.              the door, he may use the Alt-K key. The key strokes placed
  1087.              in the OpenDoors type-ahead buffer will be retrieved by the
  1088.              od_get_key() and od_input_str() functions. Thus, if the
  1089.              user chose the key from a menu while it was being
  1090.              displayed, as soon as your program calls the od_get_key()
  1091.              function, this keystroke will already be waiting.
  1092.  
  1093.              There are times, however, when you will want to erase any
  1094.              keys that have been hit by the user, to prevent them from
  1095.              typing ahead. For example, if your door has been busy
  1096.              doing some processing for a few moments, they user may have
  1097.              been pressing keys on their keyboard (perhaps hoping it
  1098.              will speed things up). These keys will be waiting in the
  1099.              type-ahead buffer, and if one of the keys the user entered
  1100.              was a valid response to the next prompt in your door, the
  1101.              user may find that they have accidentially made a choice
  1102.              they did not wish to. A well designed door will simply
  1103.              erase the contents of the type-ahead buffer after any long
  1104.              period of internal processing, etc. To erase the contents
  1105.              of the type-ahead buffer, you simply call the
  1106.              od_clear_keybuffer() function.
  1107.  
  1108.  
  1109. ┌─────────────────────────────────────────────────────────────────────────────┐
  1110. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 23 │
  1111. └─────────────────────────────────────────────────────────────────────────────┘
  1112.  
  1113.  
  1114.  
  1115. ┌─────────────────────────────────────────────────────────────────────────┐
  1116. │OD_CLR_LINE()      Clears the rest of the current display line           │
  1117. └─────────────────────────────────────────────────────────────────────────┘
  1118.   PROTOTYPE: void od_clr_line(void)
  1119.  
  1120.      FORMAT: od_clr_line();
  1121.  
  1122.     RETURNS: N/A
  1123.  
  1124. DESCRIPTION: This function clears the line that the cursor is on, from
  1125.              the cursor position to the end of the line. After the rest
  1126.              of the line is cleared, the cursor is automatically
  1127.              returned to the position it was at prior to issuing the
  1128.              command. Hence, if the display line the cursor was located
  1129.              on looked as follows:
  1130.  
  1131.                       This is a_line of text!
  1132.  
  1133.              With the cursor between the words "a" and "line", after the
  1134.              od_clr_line command is issued, the line would appear as
  1135.              follows:
  1136.  
  1137.                       This is a_
  1138.  
  1139.              With the cursor directly following the word "a". When the
  1140.              door is running in plain ASCII mode, this command will
  1141.              simply clear the rest of the line by manually sending a
  1142.              series of space and backspace characters. When ANSI or
  1143.              AVATAR modes are active, the corresponding ANSI/AVATAR
  1144.              control sequence will be sent in order to accomplish the
  1145.              line clear. Since the graphics mode sequences are much
  1146.              shorter than the sequence that would be required to clear
  1147.              teh line manually, the use of this function will cause your
  1148.              door's graphics to display much more quickly when ANSI or
  1149.              AVATAR modes are active.
  1150.  
  1151.  
  1152. ┌─────────────────────────────────────────────────────────────────────────────┐
  1153. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 24 │
  1154. └─────────────────────────────────────────────────────────────────────────────┘
  1155.  
  1156.  
  1157.  
  1158. ┌─────────────────────────────────────────────────────────────────────────┐
  1159. │OD_CLR_SCR()       The OpenDoors clear screen function                   │
  1160. └─────────────────────────────────────────────────────────────────────────┘
  1161.   PROTOTYPE: void od_clr_scr(void)
  1162.  
  1163.      FORMAT: od_clr_scr();
  1164.  
  1165.     RETURNS: N/A
  1166.  
  1167. DESCRIPTION: The od_clr_scr() function can be used to clear the door
  1168.              screen. (ie, the user's screen and local screen with the
  1169.              exception of the status line are cleared.) This function
  1170.              will detect the user's screen clearing setting, and only
  1171.              clear the screen if screen clearing is turned on. For more
  1172.              information on the user's screen clearing setting, please
  1173.              refer to the user_attrib variable in the OpenDoors Control
  1174.              Structure section of this manual. If you wish to force a
  1175.              screen clear, even if the user does not have screen
  1176.              clearing turned on (this is not recommended), simply use
  1177.              the function call:
  1178.  
  1179.                        od_emulate(12);
  1180.  
  1181.              The od_clr_scr() function acomplishes screen clearing by
  1182.              sending an ASCII 12 character to the remote terminal.
  1183.  
  1184.  
  1185. ┌─────────────────────────────────────────────────────────────────────────────┐
  1186. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 25 │
  1187. └─────────────────────────────────────────────────────────────────────────────┘
  1188.  
  1189.  
  1190.  
  1191. ┌─────────────────────────────────────────────────────────────────────────┐
  1192. │OD_DISP()          Sends a buffer of text with optional local echo       │
  1193. └─────────────────────────────────────────────────────────────────────────┘
  1194.   PROTOTYPE: void od_disp(char *buffer,int size,char local_echo)
  1195.  
  1196.      FORMAT: od_clr_line(buffer,size,local_echo);
  1197.  
  1198.     RETURNS: N/A
  1199.  
  1200. DESCRIPTION: In the past, this function has only been for internal use
  1201.              by the other OpenDoors routines. You will probably have
  1202.              little use for this function in the majority of cases.
  1203.              However, this function can be useful if you wish to have
  1204.              more control over OpenDoor's functioning. The od_disp()
  1205.              function is called with three parameters. The first
  1206.              parameter, *buffer, is a pointer to a buffer of characters
  1207.              you wish to have displayed. The second parameter, size, is
  1208.              simply the number of characters in the buffer. If the third
  1209.              parameter, local_echo, is set to TRUE, then all characters
  1210.              sent to the modem will also be displayed on the local
  1211.              screen. If set to FALSE, then the buffer will be sent to
  1212.              the modem without being echoed to the sysop's screen. For
  1213.              example:
  1214.  
  1215.                      To display a single character:
  1216.  
  1217.                          od_disp(*character,1,TRUE);
  1218.  
  1219.                      To send an ANSI sequence without echoing it to the
  1220.                      local screen:
  1221.  
  1222.                          od_disp(string,strlen(string),FALSE);
  1223.  
  1224.  
  1225. ┌─────────────────────────────────────────────────────────────────────────────┐
  1226. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 26 │
  1227. └─────────────────────────────────────────────────────────────────────────────┘
  1228.  
  1229.  
  1230.  
  1231. ┌─────────────────────────────────────────────────────────────────────────┐
  1232. │OD_DISP_STR()      Displays a string to the screen (remote & local)      │
  1233. └─────────────────────────────────────────────────────────────────────────┘
  1234.   PROTOTYPE: void od_disp_str(char *string)
  1235.  
  1236.      FORMAT: od_disp_str(string);
  1237.  
  1238.     RETURNS: N/A
  1239.  
  1240. DESCRIPTION: This function displays the contents of the null-terminated
  1241.              string pointed to by *string. Display is, of course, sent
  1242.              to the local screen and modem (presuming the door is not
  1243.              running in local mode). All modem output is accomplished
  1244.              through the Fossil driver. If directvideo=1, then the
  1245.              screen display is accomplished by direct writes, either to
  1246.              video memory, or to the DesqView screen buffer, if DesqView
  1247.              is active If directvideo is set to 0, then BIOS function
  1248.              calls are used for video output. While using direct video
  1249.              writes results in much greater screen updates speeds, it
  1250.              will also cause difficulties for people running in
  1251.              multitaskers, such as DesqView. Ideally, you could design
  1252.              your door to either accept a command-line parameter or a
  1253.              setting in it's configuration file to allow the sysop using
  1254.              your door to select either direct or BIOS writes. The only
  1255.              thing to keep in mind when using the od_disp_str()
  1256.              function, is that you should use /n/r instead of just /n
  1257.              for a new line. Since many terminal programs require a
  1258.              carriage-return line-feed sequence (/n/r), instead of just
  1259.              a line-feed (/n), for proper results, your door will have
  1260.              to send both characters to the modem. For example, instead
  1261.              of using:
  1262.  
  1263.                             od_disp_str("Hello world!\n");
  1264.  
  1265.              You should use:
  1266.  
  1267.                             od_disp_str("Hello world!\n\r");
  1268.  
  1269.              If you wish to do fancy output formatting, (ie, use of
  1270.              printf style %d, %s, etc. commands), the best thing to do
  1271.              is use the od_printf() function instead.
  1272.  
  1273.              To change the cursor colour or location of output with the
  1274.              od_disp_str() function, please refer to the od_set_cursor()
  1275.              and the od_set_attrib() functions.
  1276.  
  1277.  
  1278. ┌─────────────────────────────────────────────────────────────────────────────┐
  1279. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 27 │
  1280. └─────────────────────────────────────────────────────────────────────────────┘
  1281.  
  1282.  
  1283.  
  1284. ┌─────────────────────────────────────────────────────────────────────────┐
  1285. │OD_EMULATE()       Displays a character with ANSI/AVATAR emulation       │
  1286. └─────────────────────────────────────────────────────────────────────────┘
  1287.   PROTOTYPE: void od_emulate(register char in_char)
  1288.  
  1289.      FORMAT: od_emulate(in_char);
  1290.  
  1291.     RETURNS: N/A
  1292.  
  1293. DESCRIPTION: This function allows you to send sequences to the internal
  1294.              OpenDoors terminal emulator one character at a time. The
  1295.              OpenDoors terminal emulator is fully documented in the
  1296.              description of the od_send_file() function, below. As with
  1297.              the od_disp() function, the od_emulate() function is
  1298.              primarily intended for internal use by OpenDoors, and in
  1299.              most cases you will probably have no need for this
  1300.              function. The characters passed to the od_emulate function
  1301.              will both be sent directly to the modem, and sent to the
  1302.              local screen, after being translated by the terminal
  1303.              emulator. Thus, you could send the characters
  1304.              ESCape,[,2,;,4,H to the emulator to use the ANSI position
  1305.              cursor function.
  1306.  
  1307.  
  1308. ┌─────────────────────────────────────────────────────────────────────────────┐
  1309. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 28 │
  1310. └─────────────────────────────────────────────────────────────────────────────┘
  1311.  
  1312.  
  1313.  
  1314. ┌─────────────────────────────────────────────────────────────────────────┐
  1315. │OD_EXIT()          The OpenDoors Program Termination function            │
  1316. └─────────────────────────────────────────────────────────────────────────┘
  1317.   PROTOTYPE: void od_exit(int errorlevel,char term_call)
  1318.  
  1319.      FORMAT: od_exit(errorlevel,term_call);
  1320.  
  1321.     RETURNS: N/A
  1322.  
  1323. DESCRIPTION: You MUST USE THIS FUNCTION when you want your Door to exit.
  1324.              It will deinitialize the fossil driver, re-write changed
  1325.              information to the EXITINFO.BBS file, call your
  1326.              end-of-program function (if any), and then exit with the
  1327.              specified errorlevel. Also, if term_call is set to TRUE, it
  1328.              will also log the user off (for options such as logging off
  1329.              within the door)
  1330.  
  1331.  
  1332. ┌─────────────────────────────────────────────────────────────────────────────┐
  1333. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 29 │
  1334. └─────────────────────────────────────────────────────────────────────────────┘
  1335.  
  1336.  
  1337.  
  1338. ┌─────────────────────────────────────────────────────────────────────────┐
  1339. │OD_GET_KEY()       Function to input a key from the keyboard             │
  1340. └─────────────────────────────────────────────────────────────────────────┘
  1341.   PROTOTYPE: int od_get_key(int wait)
  1342.  
  1343.      FORMAT: od_get_key(FALSE);   or    od_get_key(TRUE);
  1344.  
  1345.     RETURNS: The next key waiting from the keyboard, or 0 if none.
  1346.  
  1347. DESCRIPTION: This function gets the next key waiting in the keyboard
  1348.              buffer (see OD_CLEAR_KEYBUFFER for more information on this
  1349.              buffer). If you pass a FALSE value to od_get_key(), then
  1350.              the function will not wait for a key to be pressed at the
  1351.              keyboard, but instead return a 0 if there are no keys
  1352.              waiting in the buffer. If you pass a TRUE value to
  1353.              od_get_key(), then this function will sit and wait for a
  1354.              key to be pressed, and then return the value of the key
  1355.              pressed. The ascii character of the key is returned. For
  1356.              example, if you called:
  1357.  
  1358.                     key=od_get_key(TRUE);
  1359.  
  1360.              and the user hit the enter key, key would be equal to 13.
  1361.  
  1362.                          ┌───────────────────────────┐
  1363.                          │  Some Common ASCII codes  │
  1364.                          ├───────────────────────────┤
  1365.                          │    8 - BackSpace          │
  1366.                          │    9 - Tab                │
  1367.                          │   13 - Enter              │
  1368.                          │   27 - Escape             │
  1369.                          │   32 - Space              │
  1370.                          └───────────────────────────┘
  1371.  
  1372.              You can, of course, also test for any character keys by
  1373.              placing the character in single quotes, for example:
  1374.  
  1375.                     key=od_get_key(TRUE);
  1376.                     if(key=='?') help();
  1377.  
  1378.  
  1379. ┌─────────────────────────────────────────────────────────────────────────────┐
  1380. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 30 │
  1381. └─────────────────────────────────────────────────────────────────────────────┘
  1382.  
  1383.  
  1384.  
  1385. ┌─────────────────────────────────────────────────────────────────────────┐
  1386. │OD_INIT()          The OpenDoors Initialization function                 │
  1387. └─────────────────────────────────────────────────────────────────────────┘
  1388.   PROTOTYPE: void od_init(void)
  1389.  
  1390.      FORMAT: od_init();
  1391.  
  1392.     RETURNS: N/A
  1393.  
  1394. DESCRIPTION: This function initializes any door running under OpenDoors.
  1395.              This function must be called manually if you wish to access
  1396.              data about the user, etc., before you call any other
  1397.              OpenDoors functions. If you do not call the od_init
  1398.              function, it will be called automatically on the first call
  1399.              to any other OpenDoors function. The od_init function will
  1400.              read the DORINFO1.DEF and optionally EXITINFO.BBS (if it
  1401.              exists) in the directory specified by the variable
  1402.              od_control.info_path. It also begins communication with the
  1403.              modem, puts up the status line, and sets OpenDoors'
  1404.              internal data structures. For more information on what data
  1405.              is and is not available before od_init() has been called,
  1406.              please refer to the section of this manual entitled "The
  1407.              OpenDoors control structure".
  1408.  
  1409.  
  1410. ┌─────────────────────────────────────────────────────────────────────────────┐
  1411. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 31 │
  1412. └─────────────────────────────────────────────────────────────────────────────┘
  1413.  
  1414.  
  1415.  
  1416. ┌─────────────────────────────────────────────────────────────────────────┐
  1417. │OD_INPUT_STR()     Input a string from the user.                         │
  1418. └─────────────────────────────────────────────────────────────────────────┘
  1419.   PROTOTYPE: void od_input_str(char *string,int max_len,char minchar,
  1420.                                char maxchar)
  1421.  
  1422.      FORMAT: od_input_str(string,max_len,minchar,maxchar);
  1423.  
  1424.     RETURNS: N/A
  1425.  
  1426. DESCRIPTION: This function allows you to input up to the specified
  1427.              number of characters from the user, with all characters
  1428.              being between the value of minchar and the value of
  1429.              maxchar. Some examples of the od_input_str() function are
  1430.              as follows:
  1431.  
  1432.                ■ To input a two character number (only digits from 0-9):
  1433.  
  1434.                       od_input_str(string,2,'0','9');
  1435.  
  1436.                ■ To input a 35 character name (characters from Space to
  1437.                   ascii 127):
  1438.  
  1439.                       od_input_str(string,35,32,127);
  1440.  
  1441.  
  1442. ┌─────────────────────────────────────────────────────────────────────────────┐
  1443. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 32 │
  1444. └─────────────────────────────────────────────────────────────────────────────┘
  1445.  
  1446.  
  1447.  
  1448. ┌─────────────────────────────────────────────────────────────────────────┐
  1449. │OD_KERNAL()        The OpenDoors Central Control function                │
  1450. └─────────────────────────────────────────────────────────────────────────┘
  1451.   PROTOTYPE: void od_kernal(void)
  1452.  
  1453.      FORMAT: od_kernal();
  1454.  
  1455.     RETURNS: N/A
  1456.  
  1457. DESCRIPTION: This is the function that keeps track of carrier detection,
  1458.              user time left and inactivity timeouts, sysop hotkeys,
  1459.              reading from the modem and updating the status line. It is
  1460.              important that your program calls this or some other
  1461.              OpenDoors function at least every second, if you wish your
  1462.              door to have a quick response.
  1463.  
  1464.  
  1465. ┌─────────────────────────────────────────────────────────────────────────────┐
  1466. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 33 │
  1467. └─────────────────────────────────────────────────────────────────────────────┘
  1468.  
  1469.  
  1470.  
  1471. ┌─────────────────────────────────────────────────────────────────────────┐
  1472. │OD_LIST_FILES()    List files in a particular file area (using FILES.BBS)│
  1473. └─────────────────────────────────────────────────────────────────────────┘
  1474.   PROTOTYPE: int od_list_files(char *directory)
  1475.  
  1476.      FORMAT: od_list_files(directory);
  1477.  
  1478.     RETURNS: TRUE if successful, FALSE if unsuccessful
  1479.  
  1480. DESCRIPTION: This function allows you to display a list of files
  1481.              available for download from a particular file area, as is
  1482.              available from many BBS systems. The file names and
  1483.              descriptions are taken from the FILES.BBS located in the
  1484.              directory pointed to by *directory. Thus, to list the files
  1485.              available for download in C:\APEX\FILES\UPLOADS, simply:
  1486.  
  1487.                     od_list_files("C:\\APEX\\FILES\\UPLOADS");
  1488.  
  1489.              OpenDoors uses a third-generation FILES.BBS format, that is
  1490.              compatible with other FILES.BBS formats, but adds some
  1491.              additional features. Each line in the FILES.BBS file lists
  1492.              a filename, along with it's description. Thus, a typical
  1493.              FILES.BBS file might look as follows:
  1494.  
  1495.                       PKZ110.EXE    PKZip file compressor, version 1.10
  1496.                       ODOORS30.LZH  The newest version of OpenDoors!
  1497.                       RAVOTE30.ZIP  RAVote user voting door.
  1498.                       BID10.ZIP     BBS info. door for new BBS users
  1499.  
  1500.              When displayed, OpenDoors will list the size of each file
  1501.              found in the FILES.BBS file beside it's name, if the file
  1502.              is found. If the file does not exist, then a "[OFFLINE]"
  1503.              string is displayed in the file size column. Title lines
  1504.              may also be added to the FILES.BBS, by indenting them one
  1505.              or more columns. Thus, you could have something like:
  1506.  
  1507.                          NEWEST UPLOADS
  1508.                          ~~~~~~~~~~~~~~
  1509.                       PKZ110.EXE    PKZip file compressor, version 1.10
  1510.                       ODOORS30.LZH  The newest version of OpenDoors!
  1511.                       RAVOTE30.ZIP  RAVote user voting door.
  1512.                       BID10.ZIP     BBS info. door for new BBS users
  1513.  
  1514.              In addition to this standard FILES.BBS format, OpenDoors
  1515.              will also permit wildcards to be used in FILES.BBS
  1516.              filenames (ie FNEWS???.*), or full directory paths to allow
  1517.              files from several different directories to be included in
  1518.              the same files area.
  1519.  
  1520.              You may alter the colours used to display the various
  1521.              portions of the files list using the od_control variables
  1522.  
  1523.                        od_control.od_list_title_col
  1524.                        od_control.od_list_name_col
  1525.                        od_control.od_list_size_col
  1526.                        od_control.od_list_comment_col
  1527.                        od_control.od_list_offline_col
  1528.  
  1529.  
  1530. ┌─────────────────────────────────────────────────────────────────────────────┐
  1531. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 34 │
  1532. └─────────────────────────────────────────────────────────────────────────────┘
  1533.  
  1534.  
  1535.  
  1536. ┌─────────────────────────────────────────────────────────────────────────┐
  1537. │OD_PAGE()          "Page The Sysop" function                             │
  1538. └─────────────────────────────────────────────────────────────────────────┘
  1539.   PROTOTYPE: void od_page(void)
  1540.  
  1541.      FORMAT: od_page();
  1542.  
  1543.     RETURNS: N/A
  1544.  
  1545. DESCRIPTION: This function can be called to allow the user to page the
  1546.              sysop. It will check for valid paging hours, ask the user
  1547.              why he wishes to chat with the sysop, and page the sysop.
  1548.              The sysop will then be free to break into chat at any time.
  1549.              Sysop paging will also be aborted if the user does not
  1550.              enter a reason for chat.
  1551.  
  1552.  
  1553. ┌─────────────────────────────────────────────────────────────────────────────┐
  1554. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 35 │
  1555. └─────────────────────────────────────────────────────────────────────────────┘
  1556.  
  1557.  
  1558.  
  1559. ┌─────────────────────────────────────────────────────────────────────────┐
  1560. │OD_PRINTF()        Performs formatted output (remote & local)            │
  1561. └─────────────────────────────────────────────────────────────────────────┘
  1562.   PROTOTYPE: void od_printf(char *format,...)
  1563.  
  1564.      FORMAT: od_printf(format,arg1,arg2,...,argx);
  1565.  
  1566.     RETURNS: N/A
  1567.  
  1568. DESCRIPTION: This functions allows you to perform formatted output, in
  1569.              the same manner as you can do normal output with the
  1570.              od_disp_str() function. od_printf() is used in the same
  1571.              manner as any other printf function. For example, to
  1572.              display the time left on-line, you could do:
  1573.  
  1574.                    od_printf("Time Left: %d\n\r",od_control.caller_timelimit);
  1575.  
  1576.              For more information on using printf(), please see your
  1577.              Turbo C manuals. For more information on output with the
  1578.              od_printf() function, please see also the od_disp_str()
  1579.              function.
  1580.  
  1581.  
  1582. ┌─────────────────────────────────────────────────────────────────────────────┐
  1583. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 36 │
  1584. └─────────────────────────────────────────────────────────────────────────────┘
  1585.  
  1586.  
  1587.  
  1588. ┌─────────────────────────────────────────────────────────────────────────┐
  1589. │OD_REPEAT()        Repeat the specified character n times                │
  1590. └─────────────────────────────────────────────────────────────────────────┘
  1591.   PROTOTYPE: void od_repeat(char value,unsigned char times)
  1592.  
  1593.      FORMAT: od_repeat(value,times);
  1594.  
  1595.     RETURNS: N/A
  1596.  
  1597. DESCRIPTION: This function will repeat character (value), (times) times.
  1598.              In AVATAR mode, this is accomplished by sending a single
  1599.              control sequence (which can make many updates VERY fast).
  1600.              If AVATAR is not enabled, this function simply sends the
  1601.              specified character over and over the appropriate number of
  1602.              times.
  1603.  
  1604.  
  1605. ┌─────────────────────────────────────────────────────────────────────────────┐
  1606. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 37 │
  1607. └─────────────────────────────────────────────────────────────────────────────┘
  1608.  
  1609.  
  1610.  
  1611. ┌─────────────────────────────────────────────────────────────────────────┐
  1612. │OD_SEND_FILE()     Sends a file from the disk, using terminal emulation  │
  1613. └─────────────────────────────────────────────────────────────────────────┘
  1614.   PROTOTYPE: int od_send_file(char *filename)
  1615.  
  1616.      FORMAT: od_send_file(filename);
  1617.  
  1618.     RETURNS: TRUE if the file was successfully sent
  1619.              FALSE if OpenDoors was unable to send the file
  1620.  
  1621. DESCRIPTION: This powerful function will display any ASCII, ANSI or
  1622.              AVATAR text file. The od_send_file() function can be used
  1623.              to display exising BBS text files, such as GOODBYE.A??
  1624.              before your door hangs up on the user. You can also make
  1625.              use of the od_send_file() function to build many of your
  1626.              door screens as external files. This will allow you to
  1627.              easily create these screens in an ANSI editor program, and
  1628.              could also optionally allow sysops to customize your door
  1629.              for use on their system.
  1630.  
  1631.              The od_send_file() function is called with the full path
  1632.              and filename of the file you wish to have displayed. Thus,
  1633.              if you wished to send the ANSI file MAINMENU.SCR, you would
  1634.              simply call:
  1635.  
  1636.                           od_send_file("MAINMENU.SCR");
  1637.  
  1638.              In many cases, instead of having just one file that you
  1639.              want displayed at a particular, you will have several
  1640.              different files, and will want a different one displayed
  1641.              according to the user's graphics mode. For example, you
  1642.              might have the three files MAINMENU.ASC, MAINMENU.ANS and
  1643.              MAINMENU.AVT; the .ASC file containing no graphics control
  1644.              codes, the .ANS file containing ANSI graphics control
  1645.              codes, and the .AVT file containing AVATAR graphics control
  1646.              codes. In this case, you can have the od_send_file()
  1647.              function automatically select the appropriate file
  1648.              according to the user's current display mode, by omitting
  1649.              the extention altogether. Thus, a call to:
  1650.  
  1651.                           od_send_file("MAINMENU");
  1652.  
  1653.              would cause OpenDoors to automatically send the approprate
  1654.              file, according to the user's graphics mode settings. When
  1655.              the od_send_file() function is used in this "automatic
  1656.              mode" (where you do not specify a filename extention), the
  1657.              three filename extentions it will look for are listed on the
  1658.              following page:
  1659.  
  1660.  
  1661. ┌─────────────────────────────────────────────────────────────────────────────┐
  1662. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 38 │
  1663. └─────────────────────────────────────────────────────────────────────────────┘
  1664.  
  1665.  
  1666.  
  1667.              ┌───────────┬───────────────────────────────────────────────┐
  1668.              │ Extention │ File type                                     │
  1669.              ├───────────┼───────────────────────────────────────────────┤
  1670.              │   .ASC    │ Does not require any graphics mode to display │
  1671.              │   .ANS    │ Requires ANSI graphics mode to display        │
  1672.              │   .AVT    │ Requires AVATAR graphics mode to display      │
  1673.              └───────────┴───────────────────────────────────────────────┘
  1674.  
  1675.              Thus, if the user has AVATAR graphics enabled
  1676.              od_send_file() will first search for the .AVT file. If no
  1677.              file exists with the specified filename and a .AVT
  1678.              extention, od_send_file() will then search for a .ANS, and
  1679.              if not found .ASC. If the user has only ANSI graphics
  1680.              enabled, od_send_file() will attempt first to display the
  1681.              .ANS file, and if not found will search for .ASC. In the
  1682.              case that the user is using plain-ASCII mode, this function
  1683.              will attempt only to disply the .ASC file.
  1684.  
  1685.              The od_send_file() will send any ANSI or AVATAR codes in
  1686.              the file directly to the remote terminal, and interpret
  1687.              them to display on the sysop's local screen (regardless of
  1688.              the actual filename extention). This interpretation is
  1689.              accomplished by OpenDoor's built in terminal emulator. The
  1690.              terminal emulator fully supports all ANSI and AVATAR level
  1691.              0 and level 0+ control codes. The terminal emulator will
  1692.              also translate Apex/Remote Access/QuickBBS style control
  1693.              codes. The control codes supported by OpenDoors are listed
  1694.              in the chart below. When these control codes are inserted
  1695.              into the file, OpenDoors will replace them with various
  1696.              pieces of user or system information.
  1697.  
  1698.  
  1699.  
  1700.                ┌─────────┬───────┬───────────────────────────────────┐
  1701.                │ CONTROL │ ASCII │                                   │
  1702.                │  CODE   │ VALUE │ DESCRIPTION                       │
  1703.                ├─────────┼───────┼───────────────────────────────────┤
  1704.                │   ^FA   │ 06,65 │ Displays the user's full name     │
  1705.                │   ^FB   │ 06,66 │ Location the user is calling from │
  1706.                │   ^FC   │ 06,67 │ Displays the user's password      │
  1707.                │   ^FD   │ 06,68 │ Business/data phone number        │
  1708.                │   ^FE   │ 06,69 │ Home/voice phone number           │
  1709.                │   ^FF   │ 06,70 │ Date of the user's last call      │
  1710.                │   ^FG   │ 06,71 │ Time of day of the last call      │
  1711.                │   ^FH   │ 06,72 │ The user's `A' flags settings     │
  1712.                │   ^FI   │ 06,73 │ The user's `B' flags settings     │
  1713.                │   ^FJ   │ 06,74 │ The user's `C' flags settings     │
  1714.                │   ^FK   │ 06,75 │ The user's `D' flags settings     │
  1715.                │   ^FL   │ 06,76 │ User's remaining netmail credit   │
  1716.                │   ^FM   │ 06,77 │ Number of messages posted by user │
  1717.                │   ^FN   │ 06,78 │ Last read message number by user  │
  1718.                │   ^FO   │ 06,79 │ Displays security level of user   │
  1719.                └─────────┴───────┴───────────────────────────────────┘
  1720.  
  1721.  
  1722. ┌─────────────────────────────────────────────────────────────────────────────┐
  1723. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 39 │
  1724. └─────────────────────────────────────────────────────────────────────────────┘
  1725.  
  1726.  
  1727.  
  1728.                ┌─────────┬───────┬───────────────────────────────────┐
  1729.                │ CONTROL │ ASCII │                                   │
  1730.                │  CODE   │ VALUE │ DESCRIPTION                       │
  1731.                ├─────────┼───────┼───────────────────────────────────┤
  1732.                │   ^FP   │ 06,80 │ Number of times user has called   │
  1733.                │   ^FQ   │ 06,81 │ Total # of uploads by user        │
  1734.                │   ^FR   │ 06,82 │ Total KBytes uploaded by user     │
  1735.                │   ^FS   │ 06,83 │ Total # of downloads by user      │
  1736.                │   ^FT   │ 06,84 │ Total Kbytes downloaded by user   │
  1737.                │   ^FU   │ 06,85 │ # of minute user has used today   │
  1738.                │   ^FV   │ 06,86 │ User's screen length setting      │
  1739.                │   ^FW   │ 06,87 │ User's first name only            │
  1740.                │   ^FX   │ 06,88 │ User's ANSI setting               │
  1741.                │   ^FY   │ 06,89 │ User's "continue?" prompt setting │
  1742.                │   ^FZ   │ 06,90 │ Does user have screen clearing on │
  1743.                │   ^F0   │ 06,48 │ User's Full-screen editor setting │
  1744.                │   ^F1   │ 06,49 │ User's Quiet mode setting         │
  1745.                │   ^F2   │ 06,50 │ User's hot-keys setting           │
  1746.                │   ^F3   │ 06,51 │ Displays the user's alias         │
  1747.                │   ^F4   │ 06,52 │ The date of the User's first call │
  1748.                │   ^F5   │ 06,53 │ The user's date of birth          │
  1749.                │   ^F6   │ 06,54 │ User's subscription expiry date   │
  1750.                │   ^F7   │ 06,55 │ Number of days until expiry       │
  1751.                │   ^F8   │ 06,56 │ User's AVATAR setting             │
  1752.                │   ^F9   │ 06,57 │ The user's upload:download ratio  │
  1753.                │   ^F:   │ 06,58 │ User's Upload K:download K ratio  │
  1754.                │   ^F;   │ 06,59 │ Full-screen message reader        │
  1755.                │   ^KA   │ 11,65 │ Total # of calls BBS has received │
  1756.                │   ^KB   │ 11,66 │ Name of the last caller to BBS    │
  1757.                │   ^KC   │ 11,67 │ Total # of active messages on BBS │
  1758.                │   ^KD   │ 11,68 │ Displays # of the first message   │
  1759.                │   ^KE   │ 11,69 │ Displays # of the last message    │
  1760.                │   ^KF   │ 11,70 │ # of times user has paged sysop   │
  1761.                │   ^KG   │ 11,71 │ Full name of the current weekday  │
  1762.                │   ^KH   │ 11,72 │ Displays total number of users    │
  1763.                │   ^KI   │ 11,73 │ Displays the current time         │
  1764.                │   ^KJ   │ 11,74 │ Displays the current date         │
  1765.                │   ^KK   │ 11,75 │ Minutes the user has been online  │
  1766.                │   ^KL   │ 11,76 │ Seconds the user has been online  │
  1767.                │   ^KM   │ 11,77 │ Minutes the user has used today   │
  1768.                │   ^KN   │ 11,78 │ Seconds the user has used today   │
  1769.                │   ^KO   │ 11,79 │ Minutes remaining for user today  │
  1770.                │   ^KP   │ 11,80 │ Seconds remaining for user today  │
  1771.                │   ^KQ   │ 11,81 │ The user's daily time limit       │
  1772.                │   ^KR   │ 11,82 │ Displays the current baud rate    │
  1773.                │   ^KS   │ 11,83 │ The current weekday in short-form │
  1774.                │   ^KT   │ 11,84 │ The user's daily download limit   │
  1775.                │   ^KU   │ 11,85 │ # of minutes until the next event │
  1776.                │   ^KV   │ 11,86 │ Time of the next system event     │
  1777.                │   ^KW   │ 11,87 │ # of node user is currently on    │
  1778.                │   ^KX   │ 11,88 │ Disconnects the user              │
  1779.                └─────────┴───────┴───────────────────────────────────┘
  1780.  
  1781.  
  1782. ┌─────────────────────────────────────────────────────────────────────────────┐
  1783. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 40 │
  1784. └─────────────────────────────────────────────────────────────────────────────┘
  1785.  
  1786.  
  1787.  
  1788. ┌─────────────────────────────────────────────────────────────────────────┐
  1789. │OD_SET_ATTRIB()    Function to change the text colour in ANSI mode       │
  1790. └─────────────────────────────────────────────────────────────────────────┘
  1791.   PROTOTYPE: void od_set_attrib(int color)
  1792.  
  1793.      FORMAT: od_set_attrib(color);
  1794.  
  1795.     RETURNS: N/A
  1796.  
  1797. DESCRIPTION: This function will only have an effect if the user has ANSI
  1798.              mode turned on. In ANSI mode, this function can be used to
  1799.              change the current colour of the text being displayed. The
  1800.              color is passed as an IBM-style screen attribute, not as
  1801.              the actuall ANSI color codes. The color codes are as
  1802.              follows:
  1803.  
  1804.                                ┌──── Forground colour
  1805.                              ┌─┴┐
  1806.                   Bit:   76543210
  1807.                          └─┬┘
  1808.                            └──────── Background colour
  1809.  
  1810.  
  1811.              ┌───────────────────────┐  ┌───────────────┬──────────┐
  1812.              │   Forground colours   │  │   Background  │ Flashing │
  1813.              ├─────┬─────────────────┤  ├─────┬─────────┼──────────┤
  1814.              │   0 │ Black           │  │   0 │ Black   │   Off    │
  1815.              │   1 │ Blue            │  │  16 │ Blue    │   Off    │
  1816.              │   2 │ Green           │  │  32 │ Green   │   Off    │
  1817.              │   3 │ Cyan            │  │  48 │ Cyan    │   Off    │
  1818.              │   4 │ Red             │  │  64 │ Red     │   Off    │
  1819.              │   5 │ Magenta         │  │  80 │ Magenta │   Off    │
  1820.              │   6 │ Brown           │  │  96 │ Brown   │   Off    │
  1821.              │   7 │ White (grey)    │  │ 112 │ White   │   Off    │
  1822.              │   8 │ Bright Black    │  │ 128 │ Black   │    On    │
  1823.              │   9 │ Bright Blue     │  │ 144 │ Blue    │    On    │
  1824.              │  10 │ Bright Green    │  │ 160 │ Green   │    On    │
  1825.              │  11 │ Bright Cyan     │  │ 176 │ Cyan    │    On    │
  1826.              │  12 │ Bright Red      │  │ 192 │ Red     │    On    │
  1827.              │  13 │ Bright Magenta  │  │ 208 │ Magenta │    On    │
  1828.              │  14 │ Yellow          │  │ 224 │ Brown   │    On    │
  1829.              │  15 │ White (bright)  │  │ 240 │ White   │    On    │
  1830.              └─────┴─────────────────┘  └─────┴─────────┴──────────┘
  1831.  
  1832.              To calculate the desired colour index, simply add the number
  1833.              for your forground colour to the number for your background
  1834.              colour.
  1835.  
  1836.              ***NOTE*** If you prefer to set the colours using forground
  1837.              and background colours separately, you can use od_set_color.
  1838.              For example:
  1839.  
  1840.                              od_set_color(L_WHITE,D_BLACK);
  1841.  
  1842.              Would set the current colour to Light White on Dark Black.
  1843.  
  1844.  
  1845. ┌─────────────────────────────────────────────────────────────────────────────┐
  1846. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 41 │
  1847. └─────────────────────────────────────────────────────────────────────────────┘
  1848.  
  1849.  
  1850.  
  1851. ┌─────────────────────────────────────────────────────────────────────────┐
  1852. │OD_SET_CURSOR()    Function to locate the cursor in ANSI mode            │
  1853. └─────────────────────────────────────────────────────────────────────────┘
  1854.   PROTOTYPE: void od_set_cursor(int row, int col)
  1855.  
  1856.      FORMAT: od_set_cursor(row,col);
  1857.  
  1858.     RETURNS: N/A
  1859.  
  1860. DESCRIPTION: This function will only have an effect if the user has ANSI
  1861.              mode turned on. In ANSI mode, this function can be used to
  1862.              position the cursor anywhere on the screen (cursor is moved
  1863.              both locally and on the remote terminal). Row can have a
  1864.              value of 1 to 23, and col can have a value of 1 to 80.
  1865.  
  1866.  
  1867. ┌─────────────────────────────────────────────────────────────────────────────┐
  1868. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 42 │
  1869. └─────────────────────────────────────────────────────────────────────────────┘
  1870.  
  1871.  
  1872.  
  1873. ┌─ THE OPENDOORS CONTROL STRUCTURE ─┐
  1874. └───────────────────────────────────┘
  1875.  
  1876.               The OpenDoors "Control Structure" is used by the
  1877.        door-driver portion of OpenDoors to provide you with a large
  1878.        range of information, and to allow you to control OpenDoor's
  1879.        behaviour. While OpenDoors takes care of just about every detail
  1880.        of your door's operation, there will still be times when you want
  1881.        to take complete control yourself. The OpenDoors control
  1882.        structure is your gateway to all types of information about the
  1883.        user who is on-line, as well as allowing your to customize
  1884.        OpenDoor's performance.
  1885.  
  1886.               The OpenDoors control structure is simply a normal C
  1887.        struct, named od_control, and defined in the file OPENDOOR.H.
  1888.        Listed below are simply the names of the structure elements. So,
  1889.        if you wish to access something such as system_name, you will
  1890.        have to refer to it as:
  1891.  
  1892.                           od_control.system_name
  1893.  
  1894.               There are two types of variables in the OpenDoors control
  1895.        structure. Some of the variables are simply used to allow you to
  1896.        customize OpenDoor's various features, such as altering colours,
  1897.        prompts, timeouts, etc. Other variables in the OpenDoors control
  1898.        structure serve to provide you with information about the user
  1899.        who is online and the BBS system your door is running under. The
  1900.        information in this second type of variable is read from the door
  1901.        information file, a small file created by the BBS specifically
  1902.        for the purpose of communicating with doors. Depending on what
  1903.        BBS system your door is running under, the type of door
  1904.        information file will vary. Since different door information
  1905.        files provide different amounts of information, some variables in
  1906.        the control structure will only be available when your door is
  1907.        running under particular BBS systems, while other variables will
  1908.        be available with many or all BBS systems. The chart below lists
  1909.        the door information file formats that OpenDoors recognizes,
  1910.        along with example BBS systems that produce these files and a
  1911.        reference letter for each type. Thus, an OpenDoor door can run
  1912.        DIRECTLY under ANY BBS SYSTEM that produces one of these files
  1913.        formats, and under ANY OTHER BBS system when used in conjuction
  1914.        with a door information file conversion utility.
  1915.  
  1916.  
  1917. ┌─────────────────────────────────────────────────────────────────────────────┐
  1918. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 43 │
  1919. └─────────────────────────────────────────────────────────────────────────────┘
  1920.  
  1921.  
  1922.  
  1923. ╔═════╦══════════════════════════╦════════════════════════════════════════════╗
  1924. ║ Ref ║ File Format              ║ Example BBS Systems                        ║
  1925. ╠═════╬══════════════════════════╬════════════════════════════════════════════╣
  1926. ║  C  ║ CHAIN.TXT                ║ Apex, WWIV                                 ║
  1927. ╟─────╫──────────────────────────╫────────────────────────────────────────────╢
  1928. ║  D  ║ DORINFO1.DEF             ║ RBBS-PC                                    ║
  1929. ╟─────╫──────────────────────────╫────────────────────────────────────────────╢
  1930. ║  E  ║ DORINFO1.DEF             ║ QuickBBS                                   ║
  1931. ║     ║      &                   ║ Remote Access (versions 0.01-0.04)         ║
  1932. ║     ║ EXITINFO.BBS (Std. Ver.) ║                                            ║
  1933. ╟─────╫──────────────────────────╫────────────────────────────────────────────╢
  1934. ║  O  ║ DOOR.SYS (DoorWay Style) ║ Apex, Remote Access                        ║
  1935. ╟─────╫──────────────────────────╫────────────────────────────────────────────╢
  1936. ║  P  ║ DOOR.SYS (PCB/GAP Style) ║ Apex                                       ║
  1937. ║     ║                          ║ PC-Board                                   ║
  1938. ╟─────╫──────────────────────────╫────────────────────────────────────────────╢
  1939. ║  S  ║ SFDOORS.DAT              ║ Apex                                       ║
  1940. ║     ║                          ║ Spitfire                                   ║
  1941. ║     ║                          ║ TriTel                                     ║
  1942. ╟─────╫──────────────────────────╫────────────────────────────────────────────╢
  1943. ║  W  ║ CALLINFO.BBS             ║ Apex, WildCat                              ║
  1944. ╟─────╫──────────────────────────╫────────────────────────────────────────────╢
  1945. ║  X  ║ DORINFO1.DEF             ║ Apex                                       ║
  1946. ║     ║      &                   ║ Remote Access (versions 1.00 and later)    ║
  1947. ║     ║ EXITINFO.BBS (Ext. Ver.) ║                                            ║
  1948. ╚═════╩══════════════════════════╩════════════════════════════════════════════╝
  1949.  
  1950.  
  1951.               The following chart lists all elements (variables) in the
  1952.        OpenDoors control strucutre, along with a description of each
  1953.        variable's usage. The "ref." column of this chart corresponds
  1954.        to the reference letters for the various door information file
  1955.        types, listed above. For those variables in the control structure
  1956.        with letters in their "ref." column, the information contained
  1957.        within them is only valid when your door is running under the
  1958.        corresponding door information file. For example, the
  1959.        user_lastdate variable is only available for door types E, X, C
  1960.        and P (and thus will only contain valid information if your door
  1961.        is running under BBS systems such as Apex, QuickBBS, Remote
  1962.        Access, WWIV, PC-Board and GAP). The type of Door Information
  1963.        file being used is stored in the variable
  1964.        od_control.od_info_type, as described below. Often, you will wish
  1965.        to check the value of this variable to determine whether certain
  1966.        neccessary information is avialable to your door. If the
  1967.        information is not available, you may want to simply use some
  1968.        sort of default value for the variable, or alternatively, not
  1969.        allow your door to run under certain BBS systems. Those variables
  1970.        in the OpenDoors control structure that do not have ANYTHING
  1971.        listed in the "ref." column are always available, regardless of
  1972.        what BBS system your door is running under.
  1973.  
  1974.  
  1975. ┌─────────────────────────────────────────────────────────────────────────────┐
  1976. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 44 │
  1977. └─────────────────────────────────────────────────────────────────────────────┘
  1978.  
  1979.  
  1980.  
  1981. ┌────────┬────┬────────────────────┬──────────────────────────────────────────┐
  1982. │  REF.  │    │                    │                                          │
  1983. │CDEOPSWX│TYPE│ VARIABLE NAME      │ VARIABLE DESCRIPTION                     │
  1984. ├────────┼────┼────────────────────┼──────────────────────────────────────────┤
  1985. │        │char│ info_path[60]      │ This variable contains the path to the   │
  1986. │        │    │                    │ DORINFO1.DEF, and optionally EXITINFO.BBS│
  1987. │        │    │                    │ files. If this variable is not set, then │
  1988. │        │    │                    │ OpenDoors will default to the current    │
  1989. │        │    │                    │ directory. Keep in mind that C requires  │
  1990. │        │    │                    │ you to place two backslashes in your     │
  1991. │        │    │                    │ string to get one (ie. "C:\\QUICKBBS\\") │
  1992. │        │    │                    │ Note also that this should only be set   │
  1993. │        │    │                    │ *BEFORE* calling any OpenDoors functions │
  1994. │        │    │                    │                                          │
  1995. │CDEOPSWX│char│ port               │ The port number of the modem being used  │
  1996. │        │    │                    │ by the door. This is the number used by  │
  1997. │        │    │                    │ the Fossil driver, thus 0=COM1, 1=COM2,  │
  1998. │        │    │                    │ and so on. This could be useful to know  │
  1999. │        │    │                    │ if you are shelling to DSZ, etc. to do   │
  2000. │        │    │                    │ a file transfer.                         │
  2001. │        │    │                    │                                          │
  2002. │CDEOPSWX│int │ baud               │ This variable contains the baud rate at  │
  2003. │        │    │                    │ which the user is online. This could be  │
  2004. │        │    │                    │ useful to know if you are shelling to    │
  2005. │        │    │                    │ DSZ, etc. to do a file transfer.         │
  2006. │        │    │                    │                                          │
  2007. │ DE    X│char│ system_name[40]    │ This variable contains the name of the   │
  2008. │        │    │                    │ BBS, as read from the DORINFO1.DEF file  │
  2009. │        │    │                    │                                          │
  2010. │ DE    X│char│ sysop_name[40]     │ This variable contains the name of the   │
  2011. │        │    │                    │ BBS's sysop                              │
  2012. │        │    │                    │                                          │
  2013. │  E    X│long│ system_calls       │ Total number of calls the BBS has        │
  2014. │        │    │                    │ received.                                │
  2015. │        │    │                    │                                          │
  2016. │  E    X│char│ system_last_caller │ String containing the name of the        │
  2017. │        │    │                    │ previous caller to the BBS.              │
  2018. │        │    │                    │                                          │
  2019. │  E    X│char│ timelog_start_date │ String containing the first day of the   │
  2020. │        │    │                    │ system time usage graph                  │
  2021. │        │    │                    │                                          │
  2022. │  E    X│int │ timelog_busyperhour│ An array of 24 elements indicating how   │
  2023. │        │    │                    │ busy the BBS has been in each hour of    │
  2024. │        │    │                    │ the day.                                 │
  2025. │        │    │                    │                                          │
  2026. │  E    X│int │ timelog_busyperday │ An array of 7 elements indicating how    │
  2027. │        │    │                    │ much the BBS has been busy each day. Note│
  2028. │        │    │                    │ that this is not set by several BBS      │
  2029. │        │    │                    │ systems, such as RemoteAccess            │
  2030. └────────┴────┴────────────────────┴──────────────────────────────────────────┘
  2031.  
  2032.  
  2033. ┌─────────────────────────────────────────────────────────────────────────────┐
  2034. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 45 │
  2035. └─────────────────────────────────────────────────────────────────────────────┘
  2036.  
  2037.  
  2038.  
  2039. ┌────────┬────┬────────────────────┬──────────────────────────────────────────┐
  2040. │  REF.  │    │                    │                                          │
  2041. │CDEOPSWX│TYPE│ VARIABLE NAME      │ VARIABLE DESCRIPTION                     │
  2042. ├────────┼────┼────────────────────┼──────────────────────────────────────────┤
  2043. │CDEOPSWX│char│ user_name[36]      │ Name of the user currently on-line       │
  2044. │        │    │                    │                                          │
  2045. │ DE PSWX│char│ user_location[26]  │ The city from which the user is calling  │
  2046. │        │    │                    │                                          │
  2047. │  E PSWX│char│ user_password[16]  │ The user's password for the BBS          │
  2048. │        │    │                    │                                          │
  2049. │  E P  X│char│ user_dataphone[13] │ The user's business/data phone number    │
  2050. │        │    │                    │                                          │
  2051. │  E PS X│char│ user_homephone[13] │ The user's home/voice phone number       │
  2052. │        │    │                    │                                          │
  2053. │  E    X│char│ user_lasttime[6]   │ String containing the time of the user's │
  2054. │        │    │                    │ last call, in the format:                │
  2055. │        │    │                    │                                          │
  2056. │        │    │                    │               HH:MM                      │
  2057. │        │    │                    │                                          │
  2058. │C E P  X│char│ user_lastdate[9]   │ String containing the date of the user's │
  2059. │        │    │                    │ last call, in the format:                │
  2060. │        │    │                    │                                          │
  2061. │        │    │                    │               MM-DD-YY                   │
  2062. │        │    │                    │                                          │
  2063. │  E    X│char│ user_attribute     │ The user's attribute flags. Each bit of  │
  2064. │        │    │                    │ this flag stores a seperate piece of     │
  2065. │        │    │                    │ information the user or a seperate user  │
  2066. │        │    │                    │ setting, as follows:                     │
  2067. │        │    │                    │                                          │
  2068. │        │    │                    │  ┌─────┬──────┬───────────────────────┐  │
  2069. │        │    │                    │  │ BIT │ MASK │ DESCRIPTION           │  │
  2070. │        │    │                    │  ├─────┼──────┼───────────────────────┤  │
  2071. │        │    │                    │  │  0  │ 0x01 │ Is the user deleted   │  │
  2072. │        │    │                    │  │  1  │ 0x02 │ Is screen clearing on │  │
  2073. │        │    │                    │  │  2  │ 0x04 │ Is "more" prompt on   │  │
  2074. │        │    │                    │  │  3  │ 0x08 │ Is ANSI mode on       │  │
  2075. │        │    │                    │  │  4  │ 0x10 │ User no-kill setting  │  │
  2076. │        │    │                    │  │  5  │ 0x20 │ Transfer-priority     │  │
  2077. │        │    │                    │  │  6  │ 0x40 │ Full screen editor    │  │
  2078. │        │    │                    │  │  7  │ 0x80 │ Quiet mode            │  │
  2079. │        │    │                    │  └─────┴──────┴───────────────────────┘  │
  2080. │        │    │                    │                                          │
  2081. │  E    X│char│ user_flags[4]      │ Sysop defined user access flags (A-D)    │
  2082. │        │    │                    │                                          │
  2083. │  E    X│int │ user_credit        │ The user's netmail credit (in cents)     │
  2084. │        │    │                    │                                          │
  2085. │  E    X│int │ user_pending       │ Amound of pending netmail credit         │
  2086. │        │    │                    │                                          │
  2087. │  E    X│int │ user_messages      │ Number of messages written by user       │
  2088. └────────┴────┴────────────────────┴──────────────────────────────────────────┘
  2089.  
  2090.  
  2091. ┌─────────────────────────────────────────────────────────────────────────────┐
  2092. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 46 │
  2093. └─────────────────────────────────────────────────────────────────────────────┘
  2094.  
  2095.  
  2096.  
  2097. ┌────────┬────┬────────────────────┬──────────────────────────────────────────┐
  2098. │  REF.  │    │                    │                                          │
  2099. │CDEOPSWX│TYPE│ VARIABLE NAME      │ VARIABLE DESCRIPTION                     │
  2100. ├────────┼────┼────────────────────┼──────────────────────────────────────────┤
  2101. │  E    X│int │ user_lastread      │ Number of last message read              │
  2102. │        │    │                    │                                          │
  2103. │C E PSWX│int │ user_security      │ The user's security level                │
  2104. │        │    │                    │                                          │
  2105. │  E P  X│int │ user_numcalls      │ Number of times the user has called      │
  2106. │        │    │                    │                                          │
  2107. │  E PS X│int │ user_uploads       │ Number of files the user has uploaded    │
  2108. │        │    │                    │                                          │
  2109. │  E PS X│int │ user_downloads     │ Number of files the user has d/led       │
  2110. │        │    │                    │                                          │
  2111. │  E  S X│int │ user_upk           │ Number of Kbytes uploaded                │
  2112. │        │    │                    │                                          │
  2113. │  E  S X│int │ user_downk         │ Number of Kbytes downloaded              │
  2114. │        │    │                    │                                          │
  2115. │  E PS X│int │ user_todayk        │ Number of Kbytes downloaded today        │
  2116. │        │    │                    │                                          │
  2117. │  E    X│int │ user_time_used     │ Amount of time user has used today       │
  2118. │        │    │                    │                                          │
  2119. │C E P WX│int │ user_screen_length │ Length of the user's screen              │
  2120. │        │    │                    │                                          │
  2121. │  E    X│char│ user_last_pwdchange│ When the user last changed password      │
  2122. │        │    │                    │                                          │
  2123. │  E    X│char│ user_attrib2       │ Additional user attribute flags. As with │
  2124. │        │    │                    │ the user_attrib variable, each bit of    │
  2125. │        │    │                    │ this flag stores a seperate piece of     │
  2126. │        │    │                    │ information the user or a seperate user  │
  2127. │        │    │                    │ setting, as follows:                     │
  2128. │        │    │                    │                                          │
  2129. │        │    │                    │  ┌─────┬──────┬───────────────────────┐  │
  2130. │        │    │                    │  │ BIT │ MASK │ DESCRIPTION           │  │
  2131. │        │    │                    │  ├─────┼──────┼───────────────────────┤  │
  2132. │        │    │                    │  │  0  │ 0x01 │ User hot-keys setting │  │
  2133. │        │    │                    │  │  1  │ 0x02 │ Is AVATAR graphics on │  │
  2134. │        │    │                    │  │  2  │ 0x04 │ Full screen reader    │  │
  2135. │        │    │                    │  │  3  │ 0x08 │ Hidden from userlist  │  │
  2136. │        │    │                    │  └─────┴──────┴───────────────────────┘  │
  2137. │        │    │                    │                                          │
  2138. │  E    X│char│ event_status       │ The status of the next system event      │
  2139. │        │    │                    │                                          │
  2140. │  E    X│char│ event_starttime[6] │ When the next event is scheduled to run  │
  2141. │        │    │                    │                                          │
  2142. │  E    X│char│ event_errorlevel   │ ErrorLevel for the next event            │
  2143. │        │    │                    │                                          │
  2144. │  E    X│char│ event_days         │ Which days the event is active           │
  2145. └────────┴────┴────────────────────┴──────────────────────────────────────────┘
  2146.  
  2147.  
  2148. ┌─────────────────────────────────────────────────────────────────────────────┐
  2149. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 47 │
  2150. └─────────────────────────────────────────────────────────────────────────────┘
  2151.  
  2152.  
  2153.  
  2154. ┌────────┬────┬────────────────────┬──────────────────────────────────────────┐
  2155. │  REF.  │    │                    │                                          │
  2156. │CDEOPSWX│TYPE│ VARIABLE NAME      │ VARIABLE DESCRIPTION                     │
  2157. ├────────┼────┼────────────────────┼──────────────────────────────────────────┤
  2158. │  E    X│char│ event_force        │ TRUE if the user should be forced off-   │
  2159. │        │    │                    │ line in order to accomodate this event   │
  2160. │        │    │                    │                                          │
  2161. │  E    X│char│ event_last_run[9]  │ Date the event was last run              │
  2162. │        │    │                    │                                          │
  2163. │  E    X│char│ caller_netmail     │ Has NetMail been entered this call       │
  2164. │        │    │            entered │ (caller_netmailentered)                  │
  2165. │        │    │                    │                                          │
  2166. │  E    X│char│ caller_echomail    │ Has EchoMail been entered this call      │
  2167. │        │    │            entered │ (caller_echomailentered)                 │
  2168. │        │    │                    │                                          │
  2169. │  E    X│char│ caller_logintime[6]│ Time at which the user logged on         │
  2170. │        │    │                    │                                          │
  2171. │  E    X│char│ caller_logindate[9]│ Date on which the user logged on         │
  2172. │        │    │                    │                                          │
  2173. │CDEOPSWX│int │ caller_timelimit   │ Amount of time user has left online, in  │
  2174. │        │    │                    │ minutes                                  │
  2175. │        │    │                    │                                          │
  2176. │  E    X│long│ caller_loginsec    │ Security level user had upon login       │
  2177. │        │    │                    │                                          │
  2178. │  E    X│long│ caller_credit      │ How much credit the user has             │
  2179. │        │    │                    │                                          │
  2180. │  E    X│int │ caller_userrecord  │ Number of record in USERS.BBS file       │
  2181. │        │    │                    │                                          │
  2182. │  E    X│int │ caller_readthru    │ User's readthru status                   │
  2183. │        │    │                    │                                          │
  2184. │  E    X│int │ caller_numpages    │ Number of times users has paged sysop    │
  2185. │        │    │                    │                                          │
  2186. │  E    X│int │ caller_downlimit   │ User's daily download limit              │
  2187. │        │    │                    │                                          │
  2188. │  E    X│char│ caller_            │ Time at which the door information file  │
  2189. │        │    │  timeofcreation[6] │ was created.                             │
  2190. │        │    │                    │                                          │
  2191. │  E    X│char│ caller_            │ User's password at logon                 │
  2192. │        │    │  logonpassword[16] │                                          │
  2193. │        │    │                    │                                          │
  2194. │  E    X│char│ caller_wantchat    │ Does the user want to chat?              │
  2195. │        │    │                    │                                          │
  2196. │CDEOPSWX│char│ caller_ansi        │ Does the user have ANSI mode on          │
  2197. │        │    │                    │                                          │
  2198. │C   PS  │int │ caller_usernum     │ The user's user record number within the │
  2199. │        │    │                    │ user file.                               │
  2200. │        │    │                    │                                          │
  2201. │C       │char│ caller_callsign[12]│ User's amature radio call-sign, if any   │
  2202. └────────┴────┴────────────────────┴──────────────────────────────────────────┘
  2203.  
  2204.  
  2205. ┌─────────────────────────────────────────────────────────────────────────────┐
  2206. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 48 │
  2207. └─────────────────────────────────────────────────────────────────────────────┘
  2208.  
  2209.  
  2210.  
  2211. ┌────────┬────┬────────────────────┬──────────────────────────────────────────┐
  2212. │  REF.  │    │                    │                                          │
  2213. │CDEOPSWX│TYPE│ VARIABLE NAME      │ VARIABLE DESCRIPTION                     │
  2214. ├────────┼────┼────────────────────┼──────────────────────────────────────────┤
  2215. │C       │char│ caller_sex         │ Lists the gender of the user, contains:  │
  2216. │        │    │                    │      `F' for female                      │
  2217. │        │    │                    │            or                            │
  2218. │        │    │                    │      `M' for male                        │
  2219. │        │    │                    │                                          │
  2220. │       X│int │ ra_deducted_time   │ Time that has been deducted from user    │
  2221. │        │    │                    │                                          │
  2222. │       X│char│ ra_menustack[50][9]│ The current Apex/RA menu stack           │
  2223. │        │    │                    │                                          │
  2224. │       X│char│ ra_menustackpointer│ Pointer to position in menu stack        │
  2225. │        │    │                    │                                          │
  2226. │C      X│char│ ra_userhandle[36]  │ The user's handle (alias), if any        │
  2227. │        │    │                    │                                          │
  2228. │       X│char│ ra_comment[81]     │ Sysop's comment about the user           │
  2229. │        │    │                    │                                          │
  2230. │       X│char│ ra_firstcall[9]    │ Date of the user's fist call             │
  2231. │        │    │                    │                                          │
  2232. │       X│char│ ra_combinedrecord  │ The user's combined message areas        │
  2233. │        │    │                    │                                          │
  2234. │       X│char│ ra_birthday[9]     │ Date of the user's birth                 │
  2235. │        │    │                    │                                          │
  2236. │    P  X│char│ ra_subdate[9]      │ Date user's subscription expires         │
  2237. │        │    │                    │                                          │
  2238. │C      X│char│ ra_screenwidth     │ # characters on user's screen            │
  2239. │        │    │                    │                                          │
  2240. │     S X│char│ ra_error_free      │ Is it an error free connection           │
  2241. │        │    │                    │                                          │
  2242. │     S X│char│ ra_sysop_next      │ "Sysop Next" toggle                      │
  2243. │        │    │                    │                                          │
  2244. │       X│char│ ra_emsi_session    │ Has an IEMSI session been established    │
  2245. │        │    │                    │                                          │
  2246. │       X│char│ ra_emsi_crtdef[41] │ EMSI display mode string                 │
  2247. │        │    │                    │                                          │
  2248. │       X│char│ ra_emsi_protocols  │ EMSI protocols supported string          │
  2249. │        │    │                    │                                          │
  2250. │       X│char│ ra_emsi_capabilitie│ EMSI capabilities string                 │
  2251. │        │    │                    │                                          │
  2252. │       X│char│ ra_emsi_requests[41│ EMSI requests string                     │
  2253. │        │    │                    │                                          │
  2254. │       X│char│ ra_emsi_software[41│ EMSI software string                     │
  2255. │        │    │                    │                                          │
  2256. │       X│char│ ra_hold_attr1      │ EMSI hold attribute settings             │
  2257. │        │    │                    │                                          │
  2258. │       X│char│ ra_hold_attr2      │ second EMSI hold attribute               │
  2259. │        │    │                    │                                          │
  2260. │       X│char│ ra_hold_len        │ EMSI hold length                         │
  2261. └────────┴────┴────────────────────┴──────────────────────────────────────────┘
  2262.  
  2263.  
  2264. ┌─────────────────────────────────────────────────────────────────────────────┐
  2265. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 49 │
  2266. └─────────────────────────────────────────────────────────────────────────────┘
  2267.  
  2268.  
  2269.  
  2270. ┌────────┬────┬────────────────────┬──────────────────────────────────────────┐
  2271. │  REF.  │    │                    │                                          │
  2272. │CDEOPSWX│TYPE│ VARIABLE NAME      │ VARIABLE DESCRIPTION                     │
  2273. ├────────┼────┼────────────────────┼──────────────────────────────────────────┤
  2274. │        │char│ od_status_on       │ If TRUE, then the status line is on, if  │
  2275. │        │    │                    │ FALSE, then the status bar is off.       │
  2276. │        │    │                    │                                          │
  2277. │        │char│ od_okaytopage      │ This allows you to enable and disable the│
  2278. │        │    │                    │ sysop paging at any time. Or, if this    │
  2279. │        │    │                    │ variable is set to MAYBE, then OpenDoors │
  2280. │        │    │                    │ will refer to the od_pagestartmin and    │
  2281. │        │    │                    │ od_pageendmin variables to decide whether│
  2282. │        │    │                    │ sysop paging is available at the current │
  2283. │        │    │                    │ time.                                    │
  2284. │        │    │                    │                                          │
  2285. │        │int │ od_pagestartmin    │ When sysop paging can begin              │
  2286. │        │    │                    │                                          │
  2287. │        │int │ od_pageendmin      │ When sysop paging must end               │
  2288. │        │    │                    │                                          │
  2289. │        │void│ (*od_before_exit)  │ OpenDoors will always call the function  │
  2290. │        │    │                    │ pointed to by this element whenever it   │
  2291. │        │    │                    │ exits. (regardless as to whether the door│
  2292. │        │    │                    │ requested an exit by calling od_exit, or │
  2293. │        │    │                    │ OpenDoors exits because of loss of       │
  2294. │        │    │                    │ carrier, etc. See the RAVote Demo Door   │
  2295. │        │    │                    │ for an example of using this feature.    │
  2296. │        │    │                    │                                          │
  2297. │        │    │                    │                                          │
  2298. │        │void│ (*od_cbefore_chat) │ The function pointed to by this pointer  │
  2299. │        │    │                    │ will be called prior to entering sysop   │
  2300. │        │    │                    │ chat mode. This may be useful for        │
  2301. │        │    │                    │ allowing you to save the screen contents │
  2302. │        │    │                    │ prior to chat, and restoring them        │
  2303. │        │    │                    │ afterwards.                              │
  2304. │        │    │                    │                                          │
  2305. │        │void│ (*od_cafter_chat)  │ The function pointed to by od_cafter_chat│
  2306. │        │    │                    │ will be called after chat mode has ended.│
  2307. │        │    │                    │                                          │
  2308. │        │void│ (*od_cbefore_shell)│ As with od_cbefore_chat, od_cbefore_shell│
  2309. │        │    │                    │ will be called prior to any sysop shell  │
  2310. │        │    │                    │ to DOS.                                  │
  2311. │        │    │                    │                                          │
  2312. │        │void│ (*od_cafter_shell) │ The function pointed to by this pointer  │
  2313. │        │    │                    │ will be called after any sysop shell     │
  2314. │        │    │                    │ to DOS.                                  │
  2315. └────────┴────┴────────────────────┴──────────────────────────────────────────┘
  2316.  
  2317.  
  2318. ┌─────────────────────────────────────────────────────────────────────────────┐
  2319. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 50 │
  2320. └─────────────────────────────────────────────────────────────────────────────┘
  2321.  
  2322.  
  2323.  
  2324. ┌────────┬────┬────────────────────┬──────────────────────────────────────────┐
  2325. │  REF.  │    │                    │                                          │
  2326. │CDEOPSWX│TYPE│ VARIABLE NAME      │ VARIABLE DESCRIPTION                     │
  2327. ├────────┼────┼────────────────────┼──────────────────────────────────────────┤
  2328. │        │int │ od_inactivity      │ The number of seconds of inactivity      │
  2329. │        │    │                    │ permitted before the user is automaticall│
  2330. │        │    │                    │ logged off. This value defaults to 200   │
  2331. │        │    │                    │ seconds, and the user will be warned 5   │
  2332. │        │    │                    │ seconds before an inactivity timeout.    │
  2333. │        │    │                    │ If you do not wish to have inactivity    │
  2334. │        │    │                    │ timeouts, merely set this variable to a  │
  2335. │        │    │                    │ ridiculously high value, such as 30,000  │
  2336. │        │    │                    │                                          │
  2337. │        │char│ od_clear_on_exit   │ This variable defaults to TRUE. It will  │
  2338. │        │    │                    │ indicate whether you wish OpenDoors to   │
  2339. │        │    │                    │ clear the screen before it exits. While  │
  2340. │        │    │                    │ this does not make a major difference,   │
  2341. │        │    │                    │ if you do not clear the screen, it can   │
  2342. │        │    │                    │ make for smoother looking transitions    │
  2343. │        │    │                    │ from the door back to the BBS, as the    │
  2344. │        │    │                    │ sysop does not have to stare at a blank  │
  2345. │        │    │                    │ screen for a few seconds.                │
  2346. │        │    │                    │                                          │
  2347. │        │char│ od_user_keyboard_on│ Is the user's keyboard enabled (toggled  │
  2348. │        │    │                    │ by the Alt-K hotkey)                     │
  2349. │        │    │                    │                                          │
  2350. │        │char│ od_chat_color1     │ Colour of the sysop's text in chat mode. │
  2351. │        │    │                    │ For information on colour attributes, see│
  2352. │        │    │                    │ the od_set_attrib() function.            │
  2353. │        │    │                    │                                          │
  2354. │        │char│od_chat_color2      │ Colour of the user's text in chat mode.  │
  2355. │        │    │                    │                                          │
  2356. │        │char│*od_before_shell    │ Pointer to the string you wish OpenDoors │
  2357. │        │    │                    │ to display before it does a DOS shell.   │
  2358. │        │    │                    │ This defaults to "Please wait a moment", │
  2359. │        │    │                    │ but you can set it to anything you want. │
  2360. │        │    │                    │ If you set the value of this pointer to  │
  2361. │        │    │                    │ NULL, then nothing will be displayed     │
  2362. │        │    │                    │ when the sysop shells to DOS (useful     │
  2363. │        │    │                    │ for ANSI doors where you don't want to   │
  2364. │        │    │                    │ have your screen screwed up when the     │
  2365. │        │    │                    │ sysop shells to DOS.                     │
  2366. │        │    │                    │                                          │
  2367. │        │char│*od_after_shell     │ The same as od_before_shell, displayed   │
  2368. │        │    │                    │ after the sysop returns from a DOS shell │
  2369. │        │    │                    │                                          │
  2370. │        │char│*od_before_chat     │ The same as od_before_shell, displayed   │
  2371. │        │    │                    │ whenever the sysop chooses to enter chat │
  2372. │        │    │                    │ mode.                                    │
  2373. └────────┴────┴────────────────────┴──────────────────────────────────────────┘
  2374.  
  2375.  
  2376. ┌─────────────────────────────────────────────────────────────────────────────┐
  2377. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 51 │
  2378. └─────────────────────────────────────────────────────────────────────────────┘
  2379.  
  2380.  
  2381.  
  2382. ┌────────┬────┬────────────────────┬──────────────────────────────────────────┐
  2383. │  REF.  │    │                    │                                          │
  2384. │CDEOPSWX│TYPE│ VARIABLE NAME      │ VARIABLE DESCRIPTION                     │
  2385. ├────────┼────┼────────────────────┼──────────────────────────────────────────┤
  2386. │        │char│*od_after_chat      │ The same as od_before_shell, displayed   │
  2387. │        │    │                    │ when chat mode is terminated.            │
  2388. │        │    │                    │                                          │
  2389. │        │char│*od_help_text       │ Pointer to a string that is displayed    │
  2390. │        │    │                    │ on the 24th line of the screen when the  │
  2391. │        │    │                    │ sysop presses the F9 (help) key. This    │
  2392. │        │    │                    │ defaults to simply listing all the       │
  2393. │        │    │                    │ OpenDoors hotkeys. Note that this string │
  2394. │        │    │                    │ MUST be 79 characters in length!         │
  2395. │        │    │                    │                                          │
  2396. │        │char│od_num_keys         │ These three variables allow you to add   │
  2397. │        │int │od_hot_key[16]      │ your own Sysop Hotkeys to any door.      │
  2398. │        │int │od_last_hot         │ Simply find the ascii code & scan code   │
  2399. │        │    │                    │ of the function key you wish to trap.    │
  2400. │        │    │                    │ (as returned by bioskey()), and place    │
  2401. │        │    │                    │ each of them in the 0th, 1st, 2nd, etc.  │
  2402. │        │    │                    │ positions of the od_hot_key array. Then  │
  2403. │        │    │                    │ set od_num_keys to the number of hotkeys │
  2404. │        │    │                    │ you have defined. Whenever OpenDoors     │
  2405. │        │    │                    │ receives one of these hotkeys, it will   │
  2406. │        │    │                    │ be placed in the od_last_hot variable.   │
  2407. │        │    │                    │ Thus, in each iteration of this loop you │
  2408. │        │    │                    │ can check for a non-zero value in the    │
  2409. │        │    │                    │ od_control.od_last_hot variable. If one  │
  2410. │        │    │                    │ is found, you can process your hotkey,   │
  2411. │        │    │                    │ and then reset this value back to 0.     │
  2412. │        │    │                    │                                          │
  2413. │        │char│od_avatar           │ Is either TRUE or FALSE, depending on    │
  2414. │        │    │                    │ whether AVATAR graphics mode is active.  │
  2415. │        │    │                    │ If you door is running under Apex or RA  │
  2416. │        │    │                    │ 1.00-, this is detected automatically.   │
  2417. │        │    │                    │ Otherwise, you may wish to set this      │
  2418. │        │    │                    │ variable manually.                       │
  2419. └────────┴────┴────────────────────┴──────────────────────────────────────────┘
  2420.  
  2421.  
  2422. ┌─────────────────────────────────────────────────────────────────────────────┐
  2423. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 52 │
  2424. └─────────────────────────────────────────────────────────────────────────────┘
  2425.  
  2426.  
  2427.  
  2428. ┌────────┬────┬────────────────────┬──────────────────────────────────────────┐
  2429. │  REF.  │    │                    │                                          │
  2430. │CDEOPSWX│TYPE│ VARIABLE NAME      │ VARIABLE DESCRIPTION                     │
  2431. ├────────┼────┼────────────────────┼──────────────────────────────────────────┤
  2432. │        │char│od_info_type        │ This variable lists the type of BBS door │
  2433. │        │    │                    │ information file that OpenDoors was able │
  2434. │        │    │                    │ to get user information from. This       │
  2435. │        │    │                    │ variable will allow you to identify what │
  2436. │        │    │                    │ elements of the control structure are    │
  2437. │        │    │                    │ available, as described prior to this    │
  2438. │        │    │                    │ chart. This variable will contain one of │
  2439. │        │    │                    │ these values:                            │
  2440. │        │    │                    │                                          │
  2441. │        │    │                    │  ┌──────────────┬──────────────┬─────┐   │
  2442. │        │    │                    │  │ VALUE        │ FILENAME     │ REF │   │
  2443. │        │    │                    │  ├──────────────┼──────────────┼─────┤   │
  2444. │        │    │                    │  │ DORINFO1     │ DORINFO1.DEF │  D  │   │
  2445. │        │    │                    │  │ EXITINFO     │ EXITINFO.BBS │  E  │   │
  2446. │        │    │                    │  │ RA1EXITINFO  │ EXITINFO.BBS │  X  │   │
  2447. │        │    │                    │  │ CHAINTXT     │ CHAIN.TXT    │  C  │   │
  2448. │        │    │                    │  │ SFDOORSDAT   │ SFDOORS.DAT  │  S  │   │
  2449. │        │    │                    │  │ CALLINFO     │ CALLINFO.BBS │  W  │   │
  2450. │        │    │                    │  │ DOORSYS_GAP  │ DOOR.SYS     │  P  │   │
  2451. │        │    │                    │  │ DOORSYS_DRWY │ DOOR.SYS     │  O  │   │
  2452. │        │    │                    │  └──────────────┴──────────────┴─────┘   │
  2453. │        │    │                    │     (For more complete information       │
  2454. │        │    │                    │      on each reference letter, please    │
  2455. │        │    │                    │      refer to the door information       │
  2456. │        │    │                    │      file types chart.)                  │
  2457. │        │    │                    │                                          │
  2458. │        │char│od_page_len         │ This allows you to customize how many    │
  2459. │        │    │                    │ beeps a sysop page will consist of.      │
  2460. └────────┴────┴────────────────────┴──────────────────────────────────────────┘
  2461.  
  2462.  
  2463. ┌─────────────────────────────────────────────────────────────────────────────┐
  2464. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 53 │
  2465. └─────────────────────────────────────────────────────────────────────────────┘
  2466.  
  2467.  
  2468.  
  2469. ┌────────┬────┬────────────────────┬──────────────────────────────────────────┐
  2470. │  REF.  │    │                    │                                          │
  2471. │CDEOPSWX│TYPE│ VARIABLE NAME      │ VARIABLE DESCRIPTION                     │
  2472. ├────────┼────┼────────────────────┼──────────────────────────────────────────┤
  2473. │        │char│od_disable          │This variable can be used to disable      │
  2474. │        │    │                    │certain OpenDoors features that are       │
  2475. │        │    │                    │normally active, to allow for maximum     │
  2476. │        │    │                    │customization. Each bit of this variable  │
  2477. │        │    │                    │represents a different feature that can   │
  2478. │        │    │                    │be disabled. To DISABLE the feature, you  │
  2479. │        │    │                    │set the bit that corrosponds to that      │
  2480. │        │    │                    │feature, and to ENABLE the feature, the   │
  2481. │        │    │                    │bit is reset. Each bit is represented by  │
  2482. │        │    │                    │a keyword, as follows:                    │
  2483. │        │    │                    │                                          │
  2484. │        │    │                    │   DIS_INFOFILE - This allows you to      │
  2485. │        │    │                    │      prevent OpenDoors from attempting   │
  2486. │        │    │                    │      to read a door information file.    │
  2487. │        │    │                    │      If you wish to disable reading      │
  2488. │        │    │                    │      of the info file, you must do so    │
  2489. │        │    │                    │      prior to calling any OpenDoors      │
  2490. │        │    │                    │      functions. You must also set        │
  2491. │        │    │                    │      any variables, such as comm port,   │
  2492. │        │    │                    │      baud rate, user name, etc.          │
  2493. │        │    │                    │      yourself.                           │
  2494. │        │    │                    │                                          │
  2495. │        │    │                    │   DIS_CARRIERDETECT - This allows you    │
  2496. │        │    │                    │      to prevent OpenDoors from exiting   │
  2497. │        │    │                    │      when it looses carrier detection.   │
  2498. │        │    │                    │      You may set or reset this bit at    │
  2499. │        │    │                    │      any time. Use of this flag might    │
  2500. │        │    │                    │      be useful, for example, when        │
  2501. │        │    │                    │      writing a call-back-verification    │
  2502. │        │    │                    │      door, where the system actually     │
  2503. │        │    │                    │      hangs up on the user and then       │
  2504. │        │    │                    │      calls back.                         │
  2505. │        │    │                    │                                          │
  2506. │        │    │                    │   DIS_TIMEOUT - This flag allows you to  │
  2507. │        │    │                    │      prevent OpenDoors from exiting      │
  2508. │        │    │                    │      when the user runs out of time. As  │
  2509. │        │    │                    │      with the DIS_CARRIERDETECT flag,    │
  2510. │        │    │                    │      you may set or reset this bit at    │
  2511. │        │    │                    │      any time.                           │
  2512. │        │    │                    │                                          │
  2513. │        │    │                    │For example, to disable carrier detection,│
  2514. │        │    │                    │you could use this line:                  │
  2515. │        │    │                    │                                          │
  2516. │        │    │                    │ od_control.od_disable|=DIS_CARRIERDETECT;│
  2517. │        │    │                    │                                          │
  2518. │        │    │                    │and to re-enable carrier detection, you   │
  2519. │        │    │                    │could:                                    │
  2520. │        │    │                    │                                          │
  2521. │        │    │                    │ od_control.od_disable&=~DIS_CARRIERDETECT│
  2522. └────────┴────┴────────────────────┴──────────────────────────────────────────┘
  2523.  
  2524.  
  2525. ┌─────────────────────────────────────────────────────────────────────────────┐
  2526. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 54 │
  2527. └─────────────────────────────────────────────────────────────────────────────┘
  2528.  
  2529.  
  2530.  
  2531. ┌────────┬────┬────────────────────┬──────────────────────────────────────────┐
  2532. │  REF.  │    │                    │                                          │
  2533. │CDEOPSWX│TYPE│ VARIABLE NAME      │ VARIABLE DESCRIPTION                     │
  2534. ├────────┼────┼────────────────────┼──────────────────────────────────────────┤
  2535. │        │int │key_hangup          │The `key_' variables allow you to redefine│
  2536. │        │    │                    │the sysop function keys. (Such as hangup, │
  2537. │        │    │                    │shell to dos, etc.) The function keys can │
  2538. │        │    │                    │be customized by setting these values to  │
  2539. │        │    │                    │the ascii value and scan-code of the      │
  2540. │        │    │                    │desired key (as returned by the bioskey() │
  2541. │        │    │                    │function). The key_hangup variable allows │
  2542. │        │    │                    │you to redefine the sysop key-combination │
  2543. │        │    │                    │used to hangup on the user.               │
  2544. │        │    │                    │                                          │
  2545. │        │int │key_drop2bbs        │This variable allows you to redfine the   │
  2546. │        │    │                    │sysop key-combination used to drop the    │
  2547. │        │    │                    │user back to the BBS system, without      │
  2548. │        │    │                    │logging them off. This key is set in the  │
  2549. │        │    │                    │same manner as the key_hangup variable    │
  2550. │        │    │                    │                                          │
  2551. │        │int │key_dosshell        │As above, allows you to redefine the      │
  2552. │        │    │                    │sysop Shell to DOS key.                   │
  2553. │        │    │                    │                                          │
  2554. │        │int │key_chat            │Used to redefine the sysop Chat key.      │
  2555. │        │    │                    │                                          │
  2556. │        │int │key_sysopnext       │Used to redefine the "sysop next" key.    │
  2557. │        │    │                    │                                          │
  2558. │        │int │key_lockout         │Used to redfine the "lockout-user" key.   │
  2559. │        │    │                    │                                          │
  2560. │        │int │key_help            │Sets the key that displays the help-      │
  2561. │        │    │                    │status line for the sysop.                │
  2562. │        │    │                    │                                          │
  2563. │        │int │key_nohelp          │Sets the key that returns the sysop's     │
  2564. │        │    │                    │status line to normal.                    │
  2565. │        │    │                    │                                          │
  2566. │        │int │key_keyboardoff     │Alters the key that allows the sysop to   │
  2567. │        │    │                    │temporarily disable the user's keyboard.  │
  2568. │        │    │                    │                                          │
  2569. │        │int │key_moretime        │The key that increases the user's time    │
  2570. │        │    │                    │                                          │
  2571. │        │int │key_lesstime        │The key that decreases the user's time    │
  2572. └────────┴────┴────────────────────┴──────────────────────────────────────────┘
  2573.  
  2574.  
  2575. ┌─────────────────────────────────────────────────────────────────────────────┐
  2576. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 55 │
  2577. └─────────────────────────────────────────────────────────────────────────────┘
  2578.  
  2579.  
  2580.  
  2581. ┌────────┬────┬────────────────────┬──────────────────────────────────────────┐
  2582. │  REF.  │    │                    │                                          │
  2583. │CDEOPSWX│TYPE│ VARIABLE NAME      │ VARIABLE DESCRIPTION                     │
  2584. ├────────┼────┼────────────────────┼──────────────────────────────────────────┤
  2585. │        │char│od_rbbs_node        │If your door is running under RBBS-PC,    │
  2586. │        │    │                    │you may wish it to force OpenDoors to     │
  2587. │        │    │                    │read the DORINFO?.DEF file for a node     │
  2588. │        │    │                    │other than node 1 (ie, DORINFO3.DEF, etc.)│
  2589. │        │    │                    │To do this, simply set the od_rbbs_node   │
  2590. │        │    │                    │variable to the node your door is running │
  2591. │        │    │                    │under. If this variable is not set,       │
  2592. │        │    │                    │OpenDoors will automatically look for the │
  2593. │        │    │                    │node 1 file (DORINFO1.DEF)                │
  2594. │        │    │                    │                                          │
  2595. │        │char│od_list_title_col   │These five variables set the colour used  │
  2596. │        │char│od_list_name_col    │by the od_list_files() function when      │
  2597. │        │char│od_list_size_col    │listing the files in a particular file    │
  2598. │        │char│od_list_comment_col │area. The od_list_title_col variable      │
  2599. │        │char│od_list_offline_col │allows you to set the colour of title     │
  2600. │        │    │                    │lines in the FILES.BBS file, the          │
  2601. │        │    │                    │od_list_name_col allows you to set the    │
  2602. │        │    │                    │filename colour, od_list_size_col allows  │
  2603. │        │    │                    │you to set the colour of the file size    │
  2604. │        │    │                    │column, od_list_comment_col allows you    │
  2605. │        │    │                    │to set the comment colour, and            │
  2606. │        │    │                    │od_list_offline_col allows you to set the │
  2607. │        │    │                    │colour of the missing files indicator.    │
  2608. │        │    │                    │All of these variables are set to their   │
  2609. │        │    │                    │default values by the od_init() function. │
  2610. └────────┴────┴────────────────────┴──────────────────────────────────────────┘
  2611.  
  2612.  
  2613. ┌─────────────────────────────────────────────────────────────────────────────┐
  2614. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 56 │
  2615. └─────────────────────────────────────────────────────────────────────────────┘
  2616.  
  2617.  
  2618.  
  2619. ┌─ BBS SYSTEM AND CONFIGURATION FILES ─┐
  2620. └──────────────────────────────────────┘
  2621.  
  2622.               OpenDoors provides a full set of routines for reading and
  2623.        writing various BBS system and configuration files. This portion
  2624.        of the "System File Engine" will automatically detect the type of
  2625.        configuration and system files present on the system. When you
  2626.        are reading or writing a configuration file, OpenDoors will
  2627.        automatically read this information into structures for you,
  2628.        performing any necessary variable converstions for you. Thus, you
  2629.        need not worry yourself with any of the internal file formats
  2630.        used by various BBS systems, as OpenDoors will automatically read
  2631.        the specific data; and in fact you do not even have to know what
  2632.        BBS system your door or utility is running under in most cases.
  2633.        (note that the current version of the OpenDoors "System File
  2634.        Engine" only supports Apex, RemoteAccess and RA backwards
  2635.        compatible BBS systems.)
  2636.  
  2637.               The configuration/system file portion of the File Engine
  2638.        are divided into these portions:
  2639.  
  2640.          General Configuration (CONFIG.RA): This is where the general
  2641.                     BBS configuration information such as system
  2642.                     directories, colours, modem control codes, and much
  2643.                     more.
  2644.  
  2645.           File Area Configuration (FILES.RA): This gives you access to a
  2646.                     list of the various file areas on the BBS, with
  2647.                     information on each area such as it's name,
  2648.                     directory, and so on.
  2649.  
  2650.           Message Area Configuration (MESSAGES.RA): This gives you
  2651.                     access to a list of the message areas on the BBS,
  2652.                     with information on each area such as it's name,
  2653.                     type and other information.
  2654.  
  2655.           BBS Timelog (TIMELOG.BBS): This structure stores a record of
  2656.                     how busy the BBS has been on average at different
  2657.                     times of day. This is the same information that is
  2658.                     used to construct a system activity graph.
  2659.  
  2660.  
  2661. ┌─────────────────────────────────────────────────────────────────────────────┐
  2662. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 57 │
  2663. └─────────────────────────────────────────────────────────────────────────────┘
  2664.  
  2665.  
  2666.  
  2667. ┌─ MAIN CONFIGURATION FILE(S) ─┐
  2668. └──────────────────────────────┘
  2669.  
  2670.               Among the BBS system files that OpenDoors gives you access
  2671.        to is the main BBS configuration. These file(s) give you access
  2672.        to a wide variety of general BBS configuration information, that
  2673.        can be useful in almost any BBS door, utility program, etc. This
  2674.        information is stored in a dynamically allocated structure,
  2675.        pointed to by cfg. Below each variable in this structure is
  2676.        listed, along with a brief description of the information stored
  2677.        within it. Since the cfg variable is actually a pointer to the
  2678.        structure, and not the structure itself, remember that you must
  2679.        access elements within it by using the -> operator in C. For
  2680.        example, to print the name of the BBS system your utility is
  2681.        running under, you could do:
  2682.  
  2683.                          puts(cfg->system_name);
  2684.  
  2685.        Or to set the maximum baud rate of the BBS to 9600, you could:
  2686.  
  2687.                          cfg->baud=9600;
  2688.  
  2689.        Beginning on the next page are the individual elements of the cfg
  2690.        structure, along with a brief description of their use. Note that
  2691.        before this information can be accessed, you must read it using
  2692.        the od_read_config() function, and to save your changes to the
  2693.        configuration you must use the od_write_config() function. The
  2694.        use of both of these functions is described after the chart.
  2695.  
  2696.  
  2697. ┌─────────────────────────────────────────────────────────────────────────────┐
  2698. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 58 │
  2699. └─────────────────────────────────────────────────────────────────────────────┘
  2700.  
  2701.  
  2702.  
  2703. ┌──────┬────────────────── CONFIGURATION STRUCTURE ───────────────────────────┐
  2704. │ TYPE │ VARIABLE NAME          │ DESCRIPTION                                 │
  2705. ├──────┼────────────────────────┼─────────────────────────────────────────────┤
  2706. │ int  │ version_id             │ This entry indicates the BBS software       │
  2707. │      │                        │ version that the configuration file was     │
  2708. │      │                        │ created by. Thus, for version 0.04, this    │
  2709. │      │                        │ variable would have a value of 0x0004. For  │
  2710. │      │                        │ version 1.00, it would contain a value of   │
  2711. │      │                        │ 0x010                                       │
  2712. │      │                        │                                             │
  2713. │ char │ commport               │ Comm port that the modem is on. (NOT        │
  2714. │      │                        │ FOSSIL port - ie, COM1==1, COM2==2, etc.)   │
  2715. │      │                        │                                             │
  2716. │ int  │ baud                   │ This unigned int stores the maximum baud    │
  2717. │      │                        │ rate supported by the BBS                   │
  2718. │      │                        │                                             │
  2719. │ char │ init_tries             │ Number of times to attempt to initialize    │
  2720. │      │                        │ the modem before exiting with an error      │
  2721. │      │                        │                                             │
  2722. │ char │ init_str[71]           │ Modem command string used to re-initialize  │
  2723. │      │                        │ the modem when the BBS is first brought     │
  2724. │      │                        │ on-line                                     │
  2725. │      │                        │                                             │
  2726. │ char │ busy_str[71]           │ Modem command string sent to the modem when │
  2727. │      │                        │ the BBS is unavailable. (ie, ATH1)          │
  2728. │      │                        │                                             │
  2729. │ char │ init_resp[41]          │ The modem response string that indicates    │
  2730. │      │                        │ modem initialization was successful         │
  2731. │      │                        │                                             │
  2732. │ char │ busy_resp[41]          │ The modem response string that indicates    │
  2733. │      │                        │ the busy command was successful             │
  2734. │      │                        │                                             │
  2735. │ char │ connect_300[41]        │ String sent by modem when a 300 baud        │
  2736. │      │                        │ connection has been established             │
  2737. │      │                        │                                             │
  2738. │ char │ connect_1200[41]       │ 1200 baud connect string                    │
  2739. │      │                        │                                             │
  2740. │ char │ connect_2400[41]       │ 2400 baud connect string                    │
  2741. │      │                        │                                             │
  2742. │ char │ connect_4800[41]       │ 4800 baud connect string                    │
  2743. │      │                        │                                             │
  2744. │ char │ connect_9600[41]       │ 9600 baud connect string                    │
  2745. │      │                        │                                             │
  2746. │ char │ connect_19k[41]        │ 19K baud connect string                     │
  2747. │      │                        │                                             │
  2748. │ char │ connect_38k[41]        │ 38K baud connect string                     │
  2749. │      │                        │                                             │
  2750. │ char │ answer_phone           │ TRUE/FALSE value, indicating whether the    │
  2751. │      │                        │ BBS should manually answer inbound calls    │
  2752. └──────┴────────────────────────┴─────────────────────────────────────────────┘
  2753.  
  2754.  
  2755. ┌─────────────────────────────────────────────────────────────────────────────┐
  2756. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 59 │
  2757. └─────────────────────────────────────────────────────────────────────────────┘
  2758.  
  2759.  
  2760.  
  2761. ┌──────┬────────────────── CONFIGURATION STRUCTURE ───────────────────────────┐
  2762. │ TYPE │ VARIABLE NAME          │ DESCRIPTION                                 │
  2763. ├──────┼────────────────────────┼─────────────────────────────────────────────┤
  2764. │ char │ ring_str[21]           │ String sent by the modem when an inbound    │
  2765. │      │                        │ call (ring) is detected                     │
  2766. │      │                        │                                             │
  2767. │ char │ answer_str[21]         │ Command string to be sent to the modem to   │
  2768. │      │                        │ force a manual answer                       │
  2769. │      │                        │                                             │
  2770. │ char │ flush_buffer           │ Should the modem buffer be flushed prior    │
  2771. │      │                        │ to sending strings.                         │
  2772. │      │                        │                                             │
  2773. │ int  │ modem_delay            │ Delay to be used when sending command       │
  2774. │      │                        │ strings to the modem                        │
  2775. │      │                        │                                             │
  2776. │ int  │ minimum_baud           │ Unsigned integer indicating the lowest      │
  2777. │      │                        │ baud rate at which inbound calls should     │
  2778. │      │                        │ be permitted                                │
  2779. │      │                        │                                             │
  2780. │ int  │ graphics_baud          │ Unsigned integer indicating the lowest baud │
  2781. │      │                        │ rate at which ANSI/AVATAR graphics modes    │
  2782. │      │                        │ should be permitted                         │
  2783. │      │                        │                                             │
  2784. │ int  │ transfer_baud          │ Unsigned integer indicating the lowest baud │
  2785. │      │                        │ rate at which file transfers should be      │
  2786. │      │                        │ permitted                                   │
  2787. │      │                        │                                             │
  2788. │ char │ slow_baud_time_start[6]│ String containing 24-hour time at which     │
  2789. │      │                        │ slow baud rate calls may begin              │
  2790. │      │                        │                                             │
  2791. │ char │ slow_baud_time_end[6]  │ String containing 24-hour time at which     │
  2792. │      │                        │ slow baud rate calls must end               │
  2793. │      │                        │                                             │
  2794. │ char │ download_time_start[6] │ String containing 24-hour time at which     │
  2795. │      │                        │ file downloads may begin                    │
  2796. │      │                        │                                             │
  2797. │ char │ download_time_end[6]   │ String containing 24-hour time at which     │
  2798. │      │                        │ file downloads must end                     │
  2799. │      │                        │                                             │
  2800. │ char │ paging_time_start[6]   │ String containing 24-hour time when sysop   │
  2801. │      │                        │ paging may begin                            │
  2802. │      │                        │                                             │
  2803. │ char │ paging_time_end[6]     │ String containing 24-hour time when sysop   │
  2804. │      │                        │ paging must end                             │
  2805. │      │                        │                                             │
  2806. │ char │ loading_msg[71]        │ Text displayed to user when a door or       │
  2807. │      │                        │ external program is being loaded.           │
  2808. │      │                        │                                             │
  2809. │ char │ list_prompt[71]        │ Text displayed to user as a list prompt     │
  2810. └──────┴────────────────────────┴─────────────────────────────────────────────┘
  2811.  
  2812.  
  2813. ┌─────────────────────────────────────────────────────────────────────────────┐
  2814. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 60 │
  2815. └─────────────────────────────────────────────────────────────────────────────┘
  2816.  
  2817.  
  2818.  
  2819. ┌──────┬────────────────── CONFIGURATION STRUCTURE ───────────────────────────┐
  2820. │ TYPE │ VARIABLE NAME          │ DESCRIPTION                                 │
  2821. ├──────┼────────────────────────┼─────────────────────────────────────────────┤
  2822. │ int  │ pwd_expiry             │ After how many calls should the user be     │
  2823. │      │                        │ forced to change their password             │
  2824. │      │                        │                                             │
  2825. │ char │ menu_path[61]          │ Path to the directory where the BBS menu    │
  2826. │      │                        │ files are stored                            │
  2827. │      │                        │                                             │
  2828. │ int  │ text_path[61]          │ Path to the directory where the BBS text    │
  2829. │      │                        │ files (.ASC/.ANS/.AVT files) are stored     │
  2830. │      │                        │                                             │
  2831. │ int  │ net_path[61]           │ Path to the netmail directory               │
  2832. │      │                        │                                             │
  2833. │ int  │ nodelist_path[61]      │ Path to the nodelist files                  │
  2834. │      │                        │                                             │
  2835. │ int  │ msg_base_path[61]      │ Path to hudson message base and user base   │
  2836. │      │                        │ files                                       │
  2837. │      │                        │                                             │
  2838. │ int  │ sys_path[61]           │ Path to the main system directory           │
  2839. │      │                        │                                             │
  2840. │ int  │ external_ed_cmd[61]    │ Command string used to invoke the external  │
  2841. │      │                        │ full-screen editor                          │
  2842. │      │                        │                                             │
  2843. │ struc│ _net_address address[10│ Array of 10 structures storing the node     │
  2844. │      │                        │ address(es) of the system. The members of   │
  2845. │      │                        │ this structure are zone, net, node and      │
  2846. │      │                        │ point. Thus, to set the zone of the second  │
  2847. │      │                        │ AKA, you would use:                         │
  2848. │      │                        │                                             │
  2849. │      │                        │         cfg->address[2].zone=89;            │
  2850. │      │                        │                                             │
  2851. │ charr│ system_name[31]        │ String containing the name of the BBS       │
  2852. │      │                        │                                             │
  2853. │ int  │ new_security           │ Unsigned integer indicating the security    │
  2854. │      │                        │ level that should be given to new users     │
  2855. │      │                        │                                             │
  2856. │ int  │ new_credit             │ The netmail credit that should initially    │
  2857. │      │                        │ be assigned to new users                    │
  2858. │      │                        │                                             │
  2859. │ char │ new_flags[4]           │ A, B, C and D flags that should be assigned │
  2860. │      │                        │ to new users.                               │
  2861. │      │                        │                                             │
  2862. │ char │ origin_line[61]        │ Default origin line to be used in EchoMail  │
  2863. │      │                        │ messages                                    │
  2864. │      │                        │                                             │
  2865. │ char │ quote_string[16]       │ String indicating what text should be placed│
  2866. │      │                        │ prior to each line of quoted text when the  │
  2867. │      │                        │ message quoting features is being used      │
  2868. └──────┴────────────────────────┴─────────────────────────────────────────────┘
  2869.  
  2870.  
  2871. ┌─────────────────────────────────────────────────────────────────────────────┐
  2872. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 61 │
  2873. └─────────────────────────────────────────────────────────────────────────────┘
  2874.  
  2875.  
  2876.  
  2877. ┌──────┬────────────────── CONFIGURATION STRUCTURE ───────────────────────────┐
  2878. │ TYPE │ VARIABLE NAME          │ DESCRIPTION                                 │
  2879. ├──────┼────────────────────────┼─────────────────────────────────────────────┤
  2880. │ char │ sysop[36]              │ Full name of the sysop of the BBS           │
  2881. │      │                        │                                             │
  2882. │ char │ log_file_name[61]      │ Name of the logfile that the BBS writes to  │
  2883. │      │                        │                                             │
  2884. │ char │ fast_logon             │ TRUE/FALSE value indicating whether "fast"  │
  2885. │      │                        │ local logons should be permitted for the    │
  2886. │      │                        │ sysop                                       │
  2887. │      │                        │                                             │
  2888. │ char │ allow_sys_rem          │ TRUE/FALSE value indicating whether the     │
  2889. │      │                        │ sysop should be permitted to log on from    │
  2890. │      │                        │ remote                                      │
  2891. │      │                        │                                             │
  2892. │ char │ mono_mode              │ TRUE/FALSE value indicating whether the     │
  2893. │      │                        │ system is running on a colour or monochrome │
  2894. │      │                        │ monitor                                     │
  2895. │      │                        │                                             │
  2896. │ char │ strict_pwd_checking    │ Should "strict" password checking be used   │
  2897. │      │                        │ by the BBS system? TRUE/FALSE value         │
  2898. │      │                        │                                             │
  2899. │ char │ direct_write           │ Should the BBS system perform it's display  │
  2900. │      │                        │ updates by direct writing. TRUE=yes, FALSE= │
  2901. │      │                        │ BIOS                                        │
  2902. │      │                        │                                             │
  2903. │ char │ show_check             │ TRUE/FALSE value indicating whether the BBS │
  2904. │      │                        │ should perform display syncronizing when    │
  2905. │      │                        │ performing direct screen writes to eliminate│
  2906. │      │                        │ "snow" on old CGA graphics cards            │
  2907. │      │                        │                                             │
  2908. │ int  │ credit_factor          │ Time credit factor that should be awarded to│
  2909. │      │                        │ users after uploads                         │
  2910. │      │                        │                                             │
  2911. │ int  │ user_time_out          │ The number of seconds prior to a user       │
  2912. │      │                        │ inactivity timeout                          │
  2913. │      │                        │                                             │
  2914. │ int  │ logon_time             │ The maximum amount of time that the user    │
  2915. │      │                        │ should be granted to complete the logon     │
  2916. │      │                        │ procedure                                   │
  2917. │      │                        │                                             │
  2918. │ int  │ password_tried         │ Number of password tries that should be     │
  2919. │      │                        │ permitted before a caller is denied         │
  2920. │      │                        │ access and hung up on                       │
  2921. │      │                        │                                             │
  2922. │ int  │ max_page               │ The maximum number of times which a user is │
  2923. │      │                        │ permitted to page the sysop per day         │
  2924. │      │                        │                                             │
  2925. │ int  │ page_length            │ The number of seconds a sysop page should   │
  2926. │      │                        │ last                                        │
  2927. └──────┴────────────────────────┴─────────────────────────────────────────────┘
  2928.  
  2929.  
  2930. ┌─────────────────────────────────────────────────────────────────────────────┐
  2931. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 62 │
  2932. └─────────────────────────────────────────────────────────────────────────────┘
  2933.  
  2934.  
  2935.  
  2936. ┌──────┬────────────────── CONFIGURATION STRUCTURE ───────────────────────────┐
  2937. │ TYPE │ VARIABLE NAME          │ DESCRIPTION                                 │
  2938. ├──────┼────────────────────────┼─────────────────────────────────────────────┤
  2939. │ char │ check_for_multi_logon  │ TRUE/FALSE value indicating whether the BBS │
  2940. │      │                        │ system should prevent the user from logging │
  2941. │      │                        │ on to more than one node at a time          │
  2942. │      │                        │                                             │
  2943. │ char │ exclude_sysop_from_list│ TRUE/FALSE value indicating whether or not  │
  2944. │      │                        │ the sysop should be excluded from the user  │
  2945. │      │                        │ list, "today's callers" list, etc.          │
  2946. │      │                        │                                             │
  2947. │ char │ one_word_names         │ TRUE/FALSE value indicating whether or not  │
  2948. │      │                        │ one word names should be permitted on the   │
  2949. │      │                        │ BBS                                         │
  2950. │      │                        │                                             │
  2951. │ char │ check_mail             │ YES/NO/ASK value indicating whether the     │
  2952. │      │                        │ user's "mailbox" should be checked for new  │
  2953. │      │                        │ mail since their last call, at time of      │
  2954. │      │                        │ logon                                       │
  2955. │      │                        │                                             │
  2956. │ char │ ask_voice_phone        │ Should the system ask new users for their   │
  2957. │      │                        │ home/voice phone number (TRUE/FALSE value)  │
  2958. │      │                        │                                             │
  2959. │ char │ ask_data_phone         │ Should the system ask new users for their   │
  2960. │      │                        │ business/data phone number (TRUE/FALSE)     │
  2961. │      │                        │                                             │
  2962. │ char │ do_full_mail_check     │ Should the system perform a "full" mail     │
  2963. │      │                        │ check when searching for new messages to    │
  2964. │      │                        │ user (TRUE/FALSE value)                     │
  2965. │      │                        │                                             │
  2966. │ char │ allow_file_shells      │ TRUE/FALSE value indicating whether or not  │
  2967. │      │                        │ shells to programs should be permitted from │
  2968. │      │                        │ within text files                           │
  2969. │      │                        │                                             │
  2970. │ char │ fix_upload_dates       │ TRUE/FALSE value indicating whether or not  │
  2971. │      │                        │ file dates should be reset after uploads    │
  2972. │      │                        │                                             │
  2973. │ char │ show_file_dates        │ TRUE/FALSE value indicating whether or not  │
  2974. │      │                        │ file dates should be listed along with      │
  2975. │      │                        │ filenames in file-lists                     │
  2976. │      │                        │                                             │
  2977. │ char │ ansi                   │ YES/NO/ASK value for new user ANSI setting  │
  2978. │      │                        │                                             │
  2979. │ char │ clear_screen           │ YES/NO/ASK value for new user's screen      │
  2980. │      │                        │ clearing setting                            │
  2981. │      │                        │                                             │
  2982. │ char │ more_prompt            │ YES/NO/ASK value for the "continue Y/N"     │
  2983. │      │                        │ prompt setting for new users                │
  2984. │      │                        │                                             │
  2985. │ char │ upload_msgs            │ TRUE/FALSE value indicating whether message │
  2986. │      │                        │ uploads should be permitted                 │
  2987. └──────┴────────────────────────┴─────────────────────────────────────────────┘
  2988.  
  2989.  
  2990. ┌─────────────────────────────────────────────────────────────────────────────┐
  2991. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 63 │
  2992. └─────────────────────────────────────────────────────────────────────────────┘
  2993.  
  2994.  
  2995.  
  2996. ┌──────┬────────────────── CONFIGURATION STRUCTURE ───────────────────────────┐
  2997. │ TYPE │ VARIABLE NAME          │ DESCRIPTION                                 │
  2998. ├──────┼────────────────────────┼─────────────────────────────────────────────┤
  2999. │ char │ kill_sent              │ TRUE/FALSE value indicating whether netmail │
  3000. │      │                        │ messages should be deleted after they have  │
  3001. │      │                        │ been sent                                   │
  3002. │      │                        │                                             │
  3003. │ int  │ crash_ask_sec          │ Unsigned int indicating the minimum security│
  3004. │      │                        │ level at which netmail "CRASH" mode is      │
  3005. │      │                        │ permitted                                   │
  3006. │      │                        │                                             │
  3007. │ char │ crash_ask_flags[4]     │ A, B, C, and D flag settings required to    │
  3008. │      │                        │ send CrashMail.                             │
  3009. │      │                        │                                             │
  3010. │ int  │ crash_sec              │ Unsigned int indicating the minimum security│
  3011. │      │                        │ level at which netmail "CRASH" mode is      │
  3012. │      │                        │ always used                                 │
  3013. │      │                        │                                             │
  3014. │ char │ crash_flags[4]         │ A, B, C and D flag settings required for    │
  3015. │      │                        │ netmail "CRASH" mode to always be used      │
  3016. │      │                        │                                             │
  3017. │ int  │ f_attach_sec           │ Unsigned int inidcating the minimum secuirty│
  3018. │      │                        │ level at which netmail file attaches should │
  3019. │      │                        │ be permitted                                │
  3020. │      │                        │                                             │
  3021. │ char │ f_attach_flags[4]      │ A, B, C and D flag settings required to use │
  3022. │      │                        │ netmail file-attaching                      │
  3023. │      │                        │                                             │
  3024. │ char │ norm_fore              │ Normal forground colour                     │
  3025. │      │                        │                                             │
  3026. │ char │ norm_back              │ Normal background colour                    │
  3027. │      │                        │                                             │
  3028. │ char │ stat_fore              │ Status line forground colour                │
  3029. │      │                        │                                             │
  3030. │ char │ stat_back              │ Status line background colour               │
  3031. │      │                        │                                             │
  3032. │ char │ hi_fore                │ Highlight forground colour                  │
  3033. │      │                        │                                             │
  3034. │ char │ hi_back                │ Highlight background colour                 │
  3035. │      │                        │                                             │
  3036. │ char │ wind_fore              │ Window forground colour                     │
  3037. │      │                        │                                             │
  3038. │ char │ wind_back              │ Window background colour                    │
  3039. │      │                        │                                             │
  3040. │ char │ exit_local             │ Errorlevel at which to exit after a         │
  3041. │      │                        │ local-mode call                             │
  3042. │      │                        │                                             │
  3043. │ char │ exit_300               │ Errorlevel at which to exit after a 300     │
  3044. │      │                        │ baud call                                   │
  3045. └──────┴────────────────────────┴─────────────────────────────────────────────┘
  3046.  
  3047.  
  3048. ┌─────────────────────────────────────────────────────────────────────────────┐
  3049. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 64 │
  3050. └─────────────────────────────────────────────────────────────────────────────┘
  3051.  
  3052.  
  3053.  
  3054. ┌──────┬────────────────── CONFIGURATION STRUCTURE ───────────────────────────┐
  3055. │ TYPE │ VARIABLE NAME          │ DESCRIPTION                                 │
  3056. ├──────┼────────────────────────┼─────────────────────────────────────────────┤
  3057. │ char │ exit_1200              │ Errorlevel to use after 1200 baud call      │
  3058. │      │                        │                                             │
  3059. │ char │ exit_2400              │ Errorlevel to use after 2400 baud call      │
  3060. │      │                        │                                             │
  3061. │ char │ exit_4800              │ Errorlevel to use after 4800 baud call      │
  3062. │      │                        │                                             │
  3063. │ char │ exit_9600              │ Errorlevel to use after 9600 baud call      │
  3064. │      │                        │                                             │
  3065. │ char │ exit_19k               │ Errorlevel to use after 19K baud call       │
  3066. │      │                        │                                             │
  3067. │ char │ exit_38k               │ Errorlevel to use after 38K baud call       │
  3068. │      │                        │                                             │
  3069. │ char │ multi_line             │ TRUE/FALSE value indicating wether multi-   │
  3070. │      │                        │ line mode should be activated               │
  3071. │      │                        │                                             │
  3072. │ char │ min_pwd_len            │ Minimum number of characters permitted      │
  3073. │      │                        │ for passwords                               │
  3074. │      │                        │                                             │
  3075. │ int  │ min_up_space           │ Minimum number of Kbytes that must be free  │
  3076. │      │                        │ on drive to permit uploads                  │
  3077. │      │                        │                                             │
  3078. │ char │ hot_keys               │ New user hot-keys setting (YES/NO/ASK value)│
  3079. │      │                        │                                             │
  3080. │ char │ border_fore            │ Forground colour of border                  │
  3081. │      │                        │                                             │
  3082. │ char │ border_back            │ Background colour of boarder                │
  3083. │      │                        │                                             │
  3084. │ char │ bar_fore               │ Screen status bar (not sysop's status line!)│
  3085. │      │                        │ forground colour                            │
  3086. │      │                        │                                             │
  3087. │ char │ bar_back               │ Screen status bar background colour         │
  3088. │      │                        │                                             │
  3089. │ char │ log_style              │ Type of log-file format to be used.         │
  3090. │      │                        │                                             │
  3091. │ char │ multi_tasker           │ Type of multi-tasker under which the BBS is │
  3092. │      │                        │ running                                     │
  3093. │      │                        │                                             │
  3094. │ char │ pwd_board              │ Message board where password failure        │
  3095. │      │                        │ messages should be created.                 │
  3096. │      │                        │                                             │
  3097. │ int  │ buffer_size            │ Size of the BBSes internal communications   │
  3098. │      │                        │ buffer                                      │
  3099. │      │                        │                                             │
  3100. │ char │ f_keys[10][61]         │ Macro-key string for each of the function   │
  3101. │      │                        │ keys                                        │
  3102. │      │                        │                                             │
  3103. │ char │ why_page               │ TRUE/FALSE value indicating whether the BBS │
  3104. │      │                        │ should ask users their reason for wanting to│
  3105. │      │                        │ chat with the Sysop                         │
  3106. └──────┴────────────────────────┴─────────────────────────────────────────────┘
  3107.  
  3108.  
  3109. ┌─────────────────────────────────────────────────────────────────────────────┐
  3110. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 65 │
  3111. └─────────────────────────────────────────────────────────────────────────────┘
  3112.  
  3113.  
  3114.  
  3115. ┌──────┬────────────────── CONFIGURATION STRUCTURE ───────────────────────────┐
  3116. │ TYPE │ VARIABLE NAME          │ DESCRIPTION                                 │
  3117. ├──────┼────────────────────────┼─────────────────────────────────────────────┤
  3118. │ char │ leave_msg              │ TRUE/FALSE value indicating whether the BBS │
  3119. │      │                        │ should give the user the option of posting  │
  3120. │      │                        │ a message to the sysop if he does not answer│
  3121. │      │                        │ the page                                    │
  3122. │      │                        │                                             │
  3123. │ char │ show_missing_files     │ TRUE/FALSE value indicating whether files   │
  3124. │      │                        │ listed in the FILES.BBS file, that do not   │
  3125. │      │                        │ actually exist should be displayed to the   │
  3126. │      │                        │ user                                        │
  3127. │      │                        │                                             │
  3128. │ char │ missing_string[11]     │ String that should be used to flag these    │
  3129. │      │                        │ "missing" files                             │
  3130. │      │                        │                                             │
  3131. │ char │ allow_netmail_replies  │ TRUE/FALSE value indicating whether users   │
  3132. │      │                        │ should be able to perform NetMail replies   │
  3133. │      │                        │ to messages in EchoMail areas               │
  3134. │      │                        │                                             │
  3135. │ char │ logon_prompt[41]       │ String that should be displayed to the user │
  3136. │      │                        │ to prompt for their name, etc.              │
  3137. │      │                        │                                             │
  3138. │ char │ check_new_files        │ YES/NO/ASK value indicating whether a new-  │
  3139. │      │                        │ files scan should be performed at logon time│
  3140. │      │                        │                                             │
  3141. │ char │ reply_header[61]       │ String containing the header to be placed in│
  3142. │      │                        │ replies to messages addressed to other users│
  3143. │      │                        │                                             │
  3144. │ char │ blank_secs             │ Number of seconds that should be allowed to │
  3145. │      │                        │ pass prior to screen blanking               │
  3146. │      │                        │                                             │
  3147. │ char │ protocol_attrib[6]     │ File transfer attributes for each of the    │
  3148. │      │                        │ built-in file transfer protocols            │
  3149. │      │                        │                                             │
  3150. │ char │ error_free_string[16]  │ Modem connect string that indicates an      │
  3151. │      │                        │ error-free connection has been established  │
  3152. │      │                        │                                             │
  3153. │ char │ default_combined[25]   │ 200 bits indicating which of the 200 message│
  3154. │      │                        │ areas should be enabled by default, for     │
  3155. │      │                        │ combined message reading                    │
  3156. │      │                        │                                             │
  3157. │ int  │ renum_threshold        │ Unsigned integer indicating the message     │
  3158. │      │                        │ number threshold after which messages should│
  3159. │      │                        │ be automatically re-numbered by the message │
  3160. │      │                        │ base packer                                 │
  3161. │      │                        │                                             │
  3162. │ char │ left_bracket           │ The character to be used for the left       │
  3163. │      │                        │ bracket (such as '(', '[', '{', etc.) in    │
  3164. │      │                        │ various BBS system prompts.                 │
  3165. └──────┴────────────────────────┴─────────────────────────────────────────────┘
  3166.  
  3167.  
  3168. ┌─────────────────────────────────────────────────────────────────────────────┐
  3169. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 66 │
  3170. └─────────────────────────────────────────────────────────────────────────────┘
  3171.  
  3172.  
  3173.  
  3174. ┌──────┬────────────────── CONFIGURATION STRUCTURE ───────────────────────────┐
  3175. │ TYPE │ VARIABLE NAME          │ DESCRIPTION                                 │
  3176. ├──────┼────────────────────────┼─────────────────────────────────────────────┤
  3177. │ char │ right_bracket          │ Character to be used for the right bracket  │
  3178. │      │                        │                                             │
  3179. │ char │ ask_for_handle         │ TRUE/FALSE value indicating whether new     │
  3180. │      │                        │ users should be prompted for a pseudonym/   │
  3181. │      │                        │ handle                                      │
  3182. │      │                        │                                             │
  3183. │ char │ ask_for_birthdate      │ TRUE/FALSE value indicating whether new     │
  3184. │      │                        │ users should be prompted for their date     │
  3185. │      │                        │ of birth                                    │
  3186. │      │                        │                                             │
  3187. │ char │ confirm_msg_deletes    │ TRUE/FALSE value indicating whether or not  │
  3188. │      │                        │ the BBS system should confirm all requests  │
  3189. │      │                        │ to delete messages                          │
  3190. │      │                        │                                             │
  3191. │ char │ location_prompt[61]    │ String of text that should be displayed as  │
  3192. │      │                        │ a prompt for a new user's location          │
  3193. │      │                        │                                             │
  3194. │ char │ page_prompt[61]        │ Prompt that should be displayed when asking │
  3195. │      │                        │ for user's "reason for chat"                │
  3196. │      │                        │                                             │
  3197. │ char │ user_file_prompt[41]   │ Text that should be displayed while the BBS │
  3198. │      │                        │ system is searching for a user's name in    │
  3199. │      │                        │ the user file                               │
  3200. │      │                        │                                             │
  3201. │ char │ new_user_group         │ Group number that new users should be       │
  3202. │      │                        │ automatically placed in                     │
  3203. │      │                        │                                             │
  3204. │ char │ avatar                 │ YES/NO/ASK value indicating whether new     │
  3205. │      │                        │ users AVATAR graphics setting should be     │
  3206. │      │                        │ enabled                                     │
  3207. │      │                        │                                             │
  3208. │ char │ bad_pwd_area           │ Message area number in which users may      │
  3209. │      │                        │ leave a message to the sysop after having   │
  3210. │      │                        │ forgotten their password                    │
  3211. │      │                        │                                             │
  3212. │ char │ location[41]           │ String containing the name of the city/etc  │
  3213. │      │                        │ where the BBS system is located             │
  3214. │      │                        │                                             │
  3215. │ char │ do_after_action        │ What the BBS system should do after         │
  3216. │      │                        │ performing some action, such as checking    │
  3217. │      │                        │ for new mail, etc. (ie, pause for a few     │
  3218. │      │                        │ seconds to allow user to read screen)       │
  3219. │      │                        │                                             │
  3220. │ char │ cr_prompt[41]          │ String containing prompt that should be     │
  3221. │      │                        │ displayed when waiting for the user to hit  │
  3222. │      │                        │ their Enter key                             │
  3223. └──────┴────────────────────────┴─────────────────────────────────────────────┘
  3224.  
  3225.  
  3226. ┌─────────────────────────────────────────────────────────────────────────────┐
  3227. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 67 │
  3228. └─────────────────────────────────────────────────────────────────────────────┘
  3229.  
  3230.  
  3231.  
  3232. ┌──────┬────────────────── CONFIGURATION STRUCTURE ───────────────────────────┐
  3233. │ TYPE │ VARIABLE NAME          │ DESCRIPTION                                 │
  3234. ├──────┼────────────────────────┼─────────────────────────────────────────────┤
  3235. │ char │ cr_fore                │ CR prompt's forground colour                │
  3236. │      │                        │                                             │
  3237. │ char │ cr_back                │ CR prompt's background colour               │
  3238. │      │                        │                                             │
  3239. │ char │ continue_prompt[41]    │ String that should be displayed for the     │
  3240. │      │                        │ "Continue [Y]/[N]/[=]".                     │
  3241. │      │                        │                                             │
  3242. │ char │ list_path[61]          │ String containing path to directory         │
  3243. │      │                        │ containing files lists                      │
  3244. │      │                        │                                             │
  3245. │ char │ full_msg_view          │ YES/NO/ASK value indicating what a new      │
  3246. │      │                        │ user's full-screen-message-viewer setting   │
  3247. │      │                        │ should be                                   │
  3248. │      │                        │                                             │
  3249. │ char │ emsi_enable            │ TRUE/FALSE value indicating whether the     │
  3250. │      │                        │ IEMSI features should be activated          │
  3251. │      │                        │                                             │
  3252. │ char │ emsi_new_user          │ TRUE/FALSE value indicating whether first-  │
  3253. │      │                        │ time callers should be permitted to use the │
  3254. │      │                        │ IEMSI features                              │
  3255. │      │                        │                                             │
  3256. │ char │ config_path[80]        │ Path where the BBS configuration file is    │
  3257. │      │                        │ found                                       │
  3258. │      │                        │                                             │
  3259. │ char │ config_type            │ Type of BBS configuration that was found by │
  3260. │      │                        │ OpenDoors. At this time, this value will    │
  3261. │      │                        │ always be Remote Access                     │
  3262. └──────┴────────────────────────┴─────────────────────────────────────────────┘
  3263.  
  3264.  
  3265. ┌─────────────────────────────────────────────────────────────────────────────┐
  3266. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 68 │
  3267. └─────────────────────────────────────────────────────────────────────────────┘
  3268.  
  3269.  
  3270.  
  3271. ┌─────────────────────────────────────────────────────────────────────────┐
  3272. │OD_READ_CONFIG()   Reads the BBS configuration into the cfg structure    │
  3273. └─────────────────────────────────────────────────────────────────────────┘
  3274.   PROTOTYPE: int od_read_config(void)
  3275.  
  3276.      FORMAT: od_read_config();
  3277.  
  3278.     RETURNS: TRUE  if successful
  3279.              FALSE if unable to read configuration
  3280.  
  3281. DESCRIPTION: This function reads the BBS configuration that is located
  3282.              in the directory pointed to by the global variable
  3283.              default_path. od_read_config() will automatically detect
  3284.              the type of BBS configuration present in this directory,
  3285.              and read it into the configuration structure pointed to by
  3286.              cfg. (see above). This structure is dynamically allocated
  3287.              by the od_read_config() function. If not enough memory is
  3288.              present to read this configuration, or if no OpenDoors
  3289.              compatible configuration files are found in the directory,
  3290.              this function will return FALSE. If successful, then this
  3291.              function will return TRUE. All variables and data stored in
  3292.              the configuration files are automatically converted to C
  3293.              format for your use. If you wish to save any changes made
  3294.              to this configuration, simply call the od_write_config()
  3295.              function.
  3296.  
  3297.  
  3298.  
  3299.  
  3300.  
  3301.  
  3302. ┌─────────────────────────────────────────────────────────────────────────┐
  3303. │OD_WRITE_CONFIG()  Saves changes to the previously read BBS configuration│
  3304. └─────────────────────────────────────────────────────────────────────────┘
  3305.   PROTOTYPE: int od_write_config(void)
  3306.  
  3307.      FORMAT: od_write_config();
  3308.  
  3309.     RETURNS: TRUE  if successful
  3310.              FALSE if unable to write configuration, or if not enough
  3311.                    memory is available to write configuration.
  3312.  
  3313. DESCRIPTION: This function will write any changes to the BBS
  3314.              configuration that was previously read by the
  3315.              od_read_config() function. All variables are automatically
  3316.              converted from C format back to their original formats.
  3317.              Note that this function can only be called if the
  3318.              od_read_config() function has already been successfully
  3319.              used to read the BBS configuration.
  3320.  
  3321.  
  3322. ┌─────────────────────────────────────────────────────────────────────────────┐
  3323. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 69 │
  3324. └─────────────────────────────────────────────────────────────────────────────┘
  3325.  
  3326.  
  3327.  
  3328. ┌─ FILE AREAS CONFIGURATION ─┐
  3329. └────────────────────────────┘
  3330.  
  3331.               Among the BBS system files that OpenDoors gives you access
  3332.        to is the BBS file areas configuration. This configuration file
  3333.        gives you access to a list of the various file areas on the BBS,
  3334.        with information on each area such as it's name, directory, and
  3335.        so on. This information is stored in a dynamically allocated
  3336.        structure, pointed to by file_info. Below each variable in this
  3337.        structure is listed, along with a brief description of the
  3338.        information stored within it. Since the file_info variable is actually
  3339.        a pointer to the structure, and not the structure itself,
  3340.        remember that you must access elements within it by using the ->
  3341.        operator in C. For example, to print the name of the first file
  3342.        area:
  3343.  
  3344.                          puts(file_info->area[0].name);
  3345.  
  3346.        Or to set the minimum security level for access to the 2nd file
  3347.        area, you would:
  3348.  
  3349.                          file_info->area[1].security=100;
  3350.  
  3351.        On the next page are the individual elements of the file_info
  3352.        structure, along with a brief description of their use. Note that
  3353.        before this information can be accessed, you must read it using
  3354.        the od_read_files() function, and to save your changes to the
  3355.        configuration you must use the od_write_files() function. The use
  3356.        of both of these functions is described after the chart.
  3357.  
  3358.  
  3359. ┌─────────────────────────────────────────────────────────────────────────────┐
  3360. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 70 │
  3361. └─────────────────────────────────────────────────────────────────────────────┘
  3362.  
  3363.  
  3364.  
  3365. ┌──────┬──────────────────── FILE AREAS STRUCTURE ────────────────────────────┐
  3366. │ TYPE │ VARIABLE NAME           │ DESCRIPTION                                │
  3367. ├──────┼─────────────────────────┼────────────────────────────────────────────┤
  3368. │      │                         │                                            │
  3369. │ char │ area[x].name[31]        │ String containing the name of file area `x'│
  3370. │      │                         │                                            │
  3371. │ char │ area[x].attrib          │ Attribute settings of file area `x'        │
  3372. │      │                         │                                            │
  3373. │ char │ area[x].path[41]        │ Full path to the files available for       │
  3374. │      │                         │ download from file area `x'                │
  3375. │      │                         │                                            │
  3376. │ int  │ area[x].security        │ Unsigned int containing the minimum        │
  3377. │      │                         │ security level required to access files    │
  3378. │      │                         │ from file area `x'                         │
  3379. │      │                         │                                            │
  3380. │ char │ area[x].flags_a         │ User's A, B, C and D flag settings         │
  3381. │ char │ area[x].flags_b         │ required to access files from file area    │
  3382. │ char │ area[x].flags_c         │ `x'                                        │
  3383. │ char │ area[x].flags_d         │                                            │
  3384. │      │                         │                                            │
  3385. │ int  │ area[x].private_security│ Security level to access private files in  │
  3386. │      │                         │ file area `x'                              │
  3387. │      │                         │                                            │
  3388. │ char │ area[x].priv_flags_a    │ User's A, B, C and D flag settings         │
  3389. │ char │ area[x].priv_flags_b    │ required to access private files in file   │
  3390. │ char │ area[x].priv_flags_c    │ area `x'                                   │
  3391. │ char │ area[x].priv_flags_d    │                                            │
  3392. │      │                         │                                            │
  3393. │ char │ files_path[80]          │ Path to the file areas configuration file  │
  3394. │      │                         │                                            │
  3395. │ char │ files_type              │ Type of file areas configuration found.    │
  3396. │      │                         │ At this time, will always be RA            │
  3397. └──────┴─────────────────────────┴────────────────────────────────────────────┘
  3398.  
  3399.  
  3400. ┌─────────────────────────────────────────────────────────────────────────────┐
  3401. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 71 │
  3402. └─────────────────────────────────────────────────────────────────────────────┘
  3403.  
  3404.  
  3405.  
  3406. ┌─────────────────────────────────────────────────────────────────────────┐
  3407. │OD_READ_FILES()    Reads the file area configuration                     │
  3408. └─────────────────────────────────────────────────────────────────────────┘
  3409.   PROTOTYPE: int od_read_files(void)
  3410.  
  3411.      FORMAT: od_read_files();
  3412.  
  3413.     RETURNS: TRUE  if successful
  3414.              FALSE if unable to read configuration
  3415.  
  3416. DESCRIPTION: This function reads the BBS file area configuration that is
  3417.              located in the directory pointed to by the global variable
  3418.              default_path. od_read_files() will automatically detect the
  3419.              type of file areas configuration present in this directory,
  3420.              and read it into the configuration structure pointed to by
  3421.              file_info. (see above). This structure is dynamically
  3422.              allocated by the od_read_files() function. If not enough
  3423.              memory is present to read this configuration, or if no
  3424.              OpenDoors compatible configuration files are found in the
  3425.              directory, this function will return FALSE. If successful,
  3426.              then this function will return TRUE. All variables and data
  3427.              stored in the configuration files are automatically
  3428.              converted to C format for your use. If you wish to save any
  3429.              changes made to this configuration, simply call the
  3430.              od_write_files() function.
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.  
  3437. ┌─────────────────────────────────────────────────────────────────────────┐
  3438. │OD_WRITE_FILES()   Saves changes to the previously read file areas config│
  3439. └─────────────────────────────────────────────────────────────────────────┘
  3440.   PROTOTYPE: int od_write_files(void)
  3441.  
  3442.      FORMAT: od_write_files();
  3443.  
  3444.     RETURNS: TRUE  if successful
  3445.              FALSE if unable to write configuration, or if not enough
  3446.                    memory is available to write configuration.
  3447.  
  3448. DESCRIPTION: This function will write any changes to the file areas
  3449.              configuration that was previously read by the
  3450.              od_read_files() function. All variables are automatically
  3451.              converted from C format back to their original formats.
  3452.              Note that this function can only be called if the
  3453.              od_read_files() function has already been successfully used
  3454.              to read the file areas configuration.
  3455.  
  3456.  
  3457. ┌─────────────────────────────────────────────────────────────────────────────┐
  3458. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 72 │
  3459. └─────────────────────────────────────────────────────────────────────────────┘
  3460.  
  3461.  
  3462.  
  3463. ┌─ MESSAGE AREAS CONFIGURATION ─┐
  3464. └───────────────────────────────┘
  3465.  
  3466.               Among the BBS system files that OpenDoors gives you access
  3467.        to is the BBS message areas configuration. This configuration
  3468.        file gives you access to a list of the message areas on the BBS,
  3469.        with information on each area such as it's name, type and other
  3470.        information. This information is stored in a dynamically
  3471.        allocated structure, pointed to by message_info. Below each variable
  3472.        in this structure is listed, along with a brief description of
  3473.        the information stored within it. Since the message_info variable is
  3474.        actually a pointer to the structure, and not the structure
  3475.        itself, remember that you must access elements within it by using
  3476.        the -> operator in C. For example, to print the name of the first
  3477.        message area:
  3478.  
  3479.                          puts(message_info->area[0].name);
  3480.  
  3481.        Or to set the 2nd message area to be an EchoMail area, you would:
  3482.  
  3483.                          message_info->area[1].area_type=TYPE_ECHOMAIL;
  3484.  
  3485.        Beginning on the next page are the individual elements of the
  3486.        message_info  structure, along with a brief description of their
  3487.        use. Note that before this information can be accessed, you must
  3488.        read it using the od_read_msgs() function, and to save your
  3489.        changes to the configuration you must use the od_write_msgs()
  3490.        function. The use of both of these functions is described after
  3491.        the chart.
  3492.  
  3493.  
  3494. ┌─────────────────────────────────────────────────────────────────────────────┐
  3495. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 73 │
  3496. └─────────────────────────────────────────────────────────────────────────────┘
  3497.  
  3498.  
  3499.  
  3500. ┌──────┬────────────────── MESSAGE AREAS STRUCTURE ───────────────────────────┐
  3501. │ TYPE │ VARIABLE NAME           │ DESCRIPTION                                │
  3502. ├──────┼─────────────────────────┼────────────────────────────────────────────┤
  3503. │ char │ area[x].name[41]        │ String that contains the full name of      │
  3504. │      │                         │ message area # `x'                         │
  3505. │      │                         │                                            │
  3506. │ char │ area[x].area_type       │ Type of message area # `x'. The message    │
  3507. │      │                         │ area types are one of the following        │
  3508. │      │                         │ constants, defined in the opendoors.h file │
  3509. │      │                         │                                            │
  3510. │      │                         │     TYPE_LOCAL - Messages in this type of  │
  3511. │      │                         │        area are local only to this BBS,    │
  3512. │      │                         │        and do not contain any exportation  │
  3513. │      │                         │        information                         │
  3514. │      │                         │                                            │
  3515. │      │                         │     TYPE_NETMAIL - Messages in this type of│
  3516. │      │                         │        area will contain netmail specific  │
  3517. │      │                         │        information, such as to and from    │
  3518. │      │                         │        node addresses                      │
  3519. │      │                         │                                            │
  3520. │      │                         │     TYPE_ECHOMAIL - Messages in this type  │
  3521. │      │                         │        of area will contain echomail       │
  3522. │      │                         │        specific information, such as       │
  3523. │      │                         │        tearlines and origin lines.         │
  3524. │      │                         │                                            │
  3525. │ char │ area[x].message_kinds   │ This variable indicates the type of        │
  3526. │      │                         │ messages that are permitted in message area│
  3527. │      │                         │ # `x'. Message kinds are again constants   │
  3528. │      │                         │ which are defined in the opendoor.h file,  │
  3529. │      │                         │ and are one of the following:              │
  3530. │      │                         │                                            │
  3531. │      │                         │     KIND_BOTH - Messages posted by users   │
  3532. │      │                         │        may be either public or private     │
  3533. │      │                         │                                            │
  3534. │      │                         │     KIND_PRIVATE - Messages posted by users│
  3535. │      │                         │        must always be private              │
  3536. │      │                         │                                            │
  3537. │      │                         │     KIND_PUBLIC - Messages posted by users │
  3538. │      │                         │        must always be public               │
  3539. │      │                         │                                            │
  3540. │      │                         │     KIND_READONLY - No messages may be     │
  3541. │      │                         │        posted by users                     │
  3542. └──────┴─────────────────────────┴────────────────────────────────────────────┘
  3543.  
  3544.  
  3545. ┌─────────────────────────────────────────────────────────────────────────────┐
  3546. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 74 │
  3547. └─────────────────────────────────────────────────────────────────────────────┘
  3548.  
  3549.  
  3550.  
  3551. ┌──────┬────────────────── MESSAGE AREAS STRUCTURE ───────────────────────────┐
  3552. │ TYPE │ VARIABLE NAME           │ DESCRIPTION                                │
  3553. ├──────┼─────────────────────────┼────────────────────────────────────────────┤
  3554. │ char │ area[x].attrib          │ This variable contains the message area    │
  3555. │      │                         │ attributes for message area # `x'. This    │
  3556. │      │                         │ bitmap has the following bits, who's       │
  3557. │      │                         │ masks are defined again in the opendoor.h  │
  3558. │      │                         │ file:                                      │
  3559. │      │                         │                                            │
  3560. │      │                         │     AREA_ECHOINFO - Indicates whether or   │
  3561. │      │                         │        not EchoMail information should be  │
  3562. │      │                         │        appended to messages in this area   │
  3563. │      │                         │                                            │
  3564. │      │                         │     AREA_COMBINED - Indicates whether or   │
  3565. │      │                         │        not this area can be accessed in    │
  3566. │      │                         │        "combined read" mode                │
  3567. │      │                         │                                            │
  3568. │      │                         │     AREA_FILEATTACH - Indicates whether or │
  3569. │      │                         │        not local file attaches should be   │
  3570. │      │                         │        permitted in this area              │
  3571. │      │                         │                                            │
  3572. │      │                         │     AREA_ALIASES - Indicates whether users │
  3573. │      │                         │        may post messages under any alias   │
  3574. │      │                         │                                            │
  3575. │      │                         │     AREA_HANDLE - Indicates whether or not │
  3576. │      │                         │        users may post messages under their │
  3577. │      │                         │        "handle"                            │
  3578. │      │                         │                                            │
  3579. │ char │ area[x].days_kill       │ Number of days after which messages in this│
  3580. │      │                         │ area should be removed by the message base │
  3581. │      │                         │ packer                                     │
  3582. │      │                         │                                            │
  3583. │ char │ area[x].recv_kill       │ Number of days after which received        │
  3584. │      │                         │ messages in this area should be removed by │
  3585. │      │                         │ the message base packer                    │
  3586. │      │                         │                                            │
  3587. │ int  │ area[x].max_msgs        │ The maximum number of messages the message │
  3588. │      │                         │ base packer should leave in this message   │
  3589. │      │                         │ area                                       │
  3590. │      │                         │                                            │
  3591. │ int  │ area[x].read_sec        │ Minimum security level and flag settings   │
  3592. │ char │ area[x].read_flags_a    │ a user must have to READ messages in this  │
  3593. │ char │ area[x].read_flags_b    │ area                                       │
  3594. │ char │ area[x].read_flags_c    │                                            │
  3595. │ char │ area[x].read_flags_d    │                                            │
  3596. │      │                         │                                            │
  3597. │ int  │ area[x].write_sec       │ Minimum security level and flag settings   │
  3598. │ char │ area[x].write_flags_a   │ a user must have to POST messages in this  │
  3599. │ char │ area[x].write_flags_b   │ area                                       │
  3600. │ char │ area[x].write_flags_c   │                                            │
  3601. │ char │ area[x].write_flags_d   │                                            │
  3602. └──────┴─────────────────────────┴────────────────────────────────────────────┘
  3603.  
  3604.  
  3605. ┌─────────────────────────────────────────────────────────────────────────────┐
  3606. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 75 │
  3607. └─────────────────────────────────────────────────────────────────────────────┘
  3608.  
  3609.  
  3610.  
  3611. ┌──────┬────────────────── MESSAGE AREAS STRUCTURE ───────────────────────────┐
  3612. │ TYPE │ VARIABLE NAME           │ DESCRIPTION                                │
  3613. ├──────┼─────────────────────────┼────────────────────────────────────────────┤
  3614. │      │                         │                                            │
  3615. │ int  │ area[x].sysop_sec       │ Minimum security level and flag settings   │
  3616. │ char │ area[x].sysop_flags_a   │ a user must have to access the sysop-      │
  3617. │ char │ area[x].sysop_flags_b   │ specific functions for messages in this    │
  3618. │ char │ area[x].sysop_flags_c   │ area                                       │
  3619. │ char │ area[x].sysop_flags_d   │                                            │
  3620. │      │                         │                                            │
  3621. │ char │ area[x].origin_line[61] │ String containing the origin line for      │
  3622. │      │                         │ EchoMail messages posted in this area. If  │
  3623. │      │                         │ this string is blank, then the default     │
  3624. │      │                         │ origin line will be used.                  │
  3625. │      │                         │                                            │
  3626. │ char │ area[x].which_aka       │ Which of the 10 "AKAs" should be used for  │
  3627. │      │                         │ the origin address of EchoMail OR NetMail  │
  3628. │      │                         │ messages posted in this area               │
  3629. │      │                         │                                            │
  3630. │ char │ msg_path[80]            │ String containing the path to the message  │
  3631. │      │                         │ area configuration file                    │
  3632. │      │                         │                                            │
  3633. │ char │ msg_type                │ Type of message area configuration file    │
  3634. │      │                         │ that was found by OpenDoors. In this       │
  3635. │      │                         │ version, this will always be RA            │
  3636. └──────┴─────────────────────────┴────────────────────────────────────────────┘
  3637.  
  3638.  
  3639. ┌─────────────────────────────────────────────────────────────────────────────┐
  3640. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 76 │
  3641. └─────────────────────────────────────────────────────────────────────────────┘
  3642.  
  3643.  
  3644.  
  3645. ┌─────────────────────────────────────────────────────────────────────────┐
  3646. │OD_READ_MSGS()     Reads the message area configuration                  │
  3647. └─────────────────────────────────────────────────────────────────────────┘
  3648.   PROTOTYPE: int od_read_msgs(void)
  3649.  
  3650.      FORMAT: od_read_msgs();
  3651.  
  3652.     RETURNS: TRUE  if successful
  3653.              FALSE if unable to read configuration
  3654.  
  3655. DESCRIPTION: This function reads the BBS message area configuration that
  3656.              is located in the directory pointed to by the global
  3657.              variable default_path. od_read_msgs() will automatically
  3658.              detect the type of message areas configuration present in
  3659.              this directory, and read it into the configuration
  3660.              structure pointed to by message_info. (see above). This
  3661.              structure is dynamically allocated by the od_read_msgs()
  3662.              function. If not enough memory is present to read this
  3663.              configuration, or if no OpenDoors compatible configuration
  3664.              files are found in the directory, this function will return
  3665.              FALSE. If successful, then this function will return TRUE.
  3666.              All variables and data stored in the configuration files
  3667.              are automatically converted to C format for your use. If
  3668.              you wish to save any changes made to this configuration,
  3669.              simply call the od_write_msgs() function.
  3670.  
  3671.  
  3672.  
  3673.  
  3674.  
  3675.  
  3676. ┌─────────────────────────────────────────────────────────────────────────┐
  3677. │OD_WRITE_MSGS()   Saves changes to the loaded message areas configuration│
  3678. └─────────────────────────────────────────────────────────────────────────┘
  3679.   PROTOTYPE: int od_write_msgs(void)
  3680.  
  3681.      FORMAT: od_write_msgs();
  3682.  
  3683.     RETURNS: TRUE  if successful
  3684.              FALSE if unable to write configuration, or if not enough
  3685.                    memory is available to write configuration.
  3686.  
  3687. DESCRIPTION: This function will write any changes to the message areas
  3688.              configuration that was previously read by the
  3689.              od_read_msgs() function. All variables are automatically
  3690.              converted from C format back to their original formats.
  3691.              Note that this function can only be called if the
  3692.              od_read_msgs() function has already been successfully used
  3693.              to read the message areas configuration.
  3694.  
  3695.  
  3696. ┌─────────────────────────────────────────────────────────────────────────────┐
  3697. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 77 │
  3698. └─────────────────────────────────────────────────────────────────────────────┘
  3699.  
  3700.  
  3701.  
  3702. ┌─ SYSTEM EVENTS CONFIGURATION ─┐
  3703. └───────────────────────────────┘
  3704.  
  3705.               OpenDoors also gives you access to the BBS system events
  3706.        configuration. System events can be configured on the BBS to
  3707.        cause it to perform specific activities at pre-scheduled times,
  3708.        such as performing system maintainence, performing mail events,
  3709.        and so on. Using the od_read_events() and od_write_events()
  3710.        functions, you can access and alter information on the various
  3711.        events that have been scheduled. This information is available
  3712.        through the event_file structure, described on the chart below:
  3713.  
  3714.  
  3715. ┌──────┬────────────────── SYSTEM EVENTS STRUCTURE ───────────────────────────┐
  3716. │ TYPE │ VARIABLE NAME                      │ DESCRIPTION                     │
  3717. ├──────┼────────────────────────────────────┼─────────────────────────────────┤
  3718. │ char │event_file.event[x].status          │ This variable contains the      │
  3719. │      │                                    │ status of event x. The status of│
  3720. │      │                                    │ an event is one of three values,│
  3721. │      │                                    │ defined in opendoor.h:          │
  3722. │      │                                    │                                 │
  3723. │      │                                    │  ES_DELETED - This event should │
  3724. │      │                                    │     be ignored, and can be      │
  3725. │      │                                    │     overwritten by the data of  │
  3726. │      │                                    │     another event if you wish.  │
  3727. │      │                                    │                                 │
  3728. │      │                                    │  ES_ENABLED - This event is     │
  3729. │      │                                    │     enabled, and will be run by │
  3730. │      │                                    │     the BBS at it's scheduled   │
  3731. │      │                                    │     time.                       │
  3732. │      │                                    │                                 │
  3733. │      │                                    │  ES_DISABLED - This event has   │
  3734. │      │                                    │     been temporarily disabled by│
  3735. │      │                                    │     the sysop, and should be    │
  3736. │      │                                    │     ignored. However, it's      │
  3737. │      │                                    │     information should not be   │
  3738. │      │                                    │     erased.                     │
  3739. │      │                                    │                                 │
  3740. │ char │event_file.event[x].time[6]         │ This string contains the time of│
  3741. │      │                                    │ day at which event x is         │
  3742. │      │                                    │ scheduled.                      │
  3743. │      │                                    │                                 │
  3744. │ char │event_file.event[x].errorlevel      │ This variable lists the         │
  3745. │      │                                    │ level at which the BBS software │
  3746. │      │                                    │ should exit in order to execute │
  3747. │      │                                    │ this event.                     │
  3748. └──────┴────────────────────────────────────┴─────────────────────────────────┘
  3749.  
  3750.  
  3751. ┌─────────────────────────────────────────────────────────────────────────────┐
  3752. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 78 │
  3753. └─────────────────────────────────────────────────────────────────────────────┘
  3754.  
  3755.  
  3756.  
  3757. ┌──────┬────────────────── SYSTEM EVENTS STRUCTURE ───────────────────────────┐
  3758. │ TYPE │ VARIABLE NAME                      │ DESCRIPTION                     │
  3759. ├──────┼────────────────────────────────────┼─────────────────────────────────┤
  3760. │ char │event_file.event[x].days            │ This byte is a bitmap indicating│
  3761. │      │                                    │ which of the 7 days of the week │
  3762. │      │                                    │ on which this event should be   │
  3763. │      │                                    │ run. (ie, bit 0 == Sunday,      │
  3764. │      │                                    │ bit 1 == Monday, etc.)          │
  3765. │      │                                    │                                 │
  3766. │ char │event_file.event[x].forced          │ This TRUE/FALSE value indicates │
  3767. │      │                                    │ whether or not the user should  │
  3768. │      │                                    │ be forced offline in order to   │
  3769. │      │                                    │ run this event.                 │
  3770. │      │                                    │                                 │
  3771. │ char │event_file.event[x].last_date_run[9]│ This string contains the date on│
  3772. │      │                                    │ which event x was last run.     │
  3773. │      │                                    │                                 │
  3774. │ char │event_file.filename                 │ This string stores the full path│
  3775. │      │                                    │ and filename of the event       │
  3776. │      │                                    │ configuration file that has been│
  3777. │      │                                    │ read. Normally, you should not  │
  3778. │      │                                    │ alter this variable             │
  3779. └──────┴────────────────────────────────────┴─────────────────────────────────┘
  3780.  
  3781.  
  3782. ┌─────────────────────────────────────────────────────────────────────────────┐
  3783. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 79 │
  3784. └─────────────────────────────────────────────────────────────────────────────┘
  3785.  
  3786.  
  3787.  
  3788. ┌─────────────────────────────────────────────────────────────────────────┐
  3789. │OD_READ_EVENTS()   Reads the system events configuration                 │
  3790. └─────────────────────────────────────────────────────────────────────────┘
  3791.   PROTOTYPE: int od_read_events(void)
  3792.  
  3793.      FORMAT: od_read_events();
  3794.  
  3795.     RETURNS: TRUE  if successful
  3796.              FALSE if unable to read configuration
  3797.  
  3798. DESCRIPTION: This function reads the event configuration located in the
  3799.              directory listed in the default_path variable. If the event
  3800.              configuration was found, it will be read into the system
  3801.              event configuration structure, described above.
  3802.  
  3803.              This function will return a value of TRUE if it was
  3804.              successful in reading the system event configuration, or
  3805.              FALSE if it OpenDoors was unable to read the events. You
  3806.              should always check the value returned by this function
  3807.              before attempting to access the system events structure.
  3808.  
  3809.  
  3810.  
  3811.  
  3812. ┌─────────────────────────────────────────────────────────────────────────┐
  3813. │OD_WRITE_EVENTS()  Saves the previously loaded system events config      │
  3814. └─────────────────────────────────────────────────────────────────────────┘
  3815.   PROTOTYPE: int od_write_events(void)
  3816.  
  3817.      FORMAT: od_write_events();
  3818.  
  3819.     RETURNS: TRUE  if successful
  3820.              FALSE if unable to save configuration
  3821.  
  3822. DESCRIPTION: This function is used to save the previously loaded events
  3823.              configuration, stored in the system events structure
  3824.              (described on the previous pages). The event information will
  3825.              be written back to the same file from which it was loaded.
  3826.  
  3827.              This function will return a value of TRUE if it was able to
  3828.              save the event configuration. If it was unable to save the
  3829.              configuration, or if you call this function without having
  3830.              already read the configuration with od_read_events(), then
  3831.              od_write_events() will return a value of FALSE.
  3832.  
  3833.  
  3834. ┌─────────────────────────────────────────────────────────────────────────────┐
  3835. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 80 │
  3836. └─────────────────────────────────────────────────────────────────────────────┘
  3837.  
  3838.  
  3839.  
  3840. ┌─ EXTERNAL PROTOCOLS CONFIGURATION ─┐
  3841. └────────────────────────────────────┘
  3842.  
  3843.               OpenDoors also gives you access to the BBS's external
  3844.        protocols configuration. The external protocols configuration
  3845.        functions give you the ability to access and/or alter the setup
  3846.        of various external file transfer protocols that have been
  3847.        installed into the BBS. Using the od_read_protocols() and
  3848.        od_write_protocols() functions, you can access and alter
  3849.        information on any external protocols that have been installed
  3850.        into the BBS. This information is available through the
  3851.        protocol_file structure, described on the chart below:
  3852.  
  3853.  
  3854. ┌──────┬──────────────── EXTERNAL PROTOCOLS STRUCTURE ────────────────────────┐
  3855. │ TYPE │ VARIABLE NAME                      │ DESCRIPTION                     │
  3856. ├──────┼────────────────────────────────────┼─────────────────────────────────┤
  3857. │ char │protocol_file.record[x].name[16]    │This variable contains the name  │
  3858. │      │                                    │of external protocol #x, as it   │
  3859. │      │                                    │is displayed to the BBS user.    │
  3860. │      │                                    │                                 │
  3861. │ char │protocol_file.record[x].active_key  │This variable contains the key   │
  3862. │      │                                    │used to selected external        │
  3863. │      │                                    │protocol #x from the menu.       │
  3864. │      │                                    │                                 │
  3865. │ char │ ...record[x].opus_ctl_file         │This entry has a TRUE/FALSE      │
  3866. │      │                                    │value, indicating whether or not │
  3867. │      │                                    │this protocol uses an OPUS type  │
  3868. │      │                                    │logfile.                         │
  3869. │      │                                    │                                 │
  3870. │ char │protocol_file.record[x].batch_avail │This entry also has a TRUE/FALSE │
  3871. │      │                                    │value, and indicates whether the │
  3872. │      │                                    │protocol supports batch file     │
  3873. │      │                                    │transfers.                       │
  3874. │      │                                    │                                 │
  3875. │ char │protocol_file.record[x].enabled     │This entry has a value of 1 if   │
  3876. │      │                                    │the external protocol is         │
  3877. │      │                                    │enabled, and 0 if the protocol   │
  3878. │      │                                    │has been temporarily disabled.   │
  3879. │      │                                    │                                 │
  3880. │ char │protocol_file.record[x].log_file[81]│This string lists the filename of│
  3881. │      │                                    │the logfile produced by external │
  3882. │      │                                    │protocol #x.                     │
  3883. │      │                                    │                                 │
  3884. │ char │protocol_file.record[x].ctl_file[81]│This string lists the control    │
  3885. │      │                                    │file to be produced for each     │
  3886. │      │                                    │external protocol.               │
  3887. │      │                                    │                                 │
  3888. │ char │protocol_file.record[x].down_cmd[81]│This string contains the command │
  3889. │      │                                    │that should be executed by the   │
  3890. │      │                                    │BBS in order to start a download │
  3891. │      │                                    │using each external protocol.    │
  3892. └──────┴────────────────────────────────────┴─────────────────────────────────┘
  3893.  
  3894.  
  3895. ┌─────────────────────────────────────────────────────────────────────────────┐
  3896. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 81 │
  3897. └─────────────────────────────────────────────────────────────────────────────┘
  3898.  
  3899.  
  3900.  
  3901. ┌──────┬──────────────── EXTERNAL PROTOCOLS STRUCTURE ────────────────────────┐
  3902. │ TYPE │ VARIABLE NAME                      │ DESCRIPTION                     │
  3903. ├──────┼────────────────────────────────────┼─────────────────────────────────┤
  3904. │ char │protocol_file.record[x].down_ctl[81]│This string contains the filename│
  3905. │      │                                    │of the control file to use when  │
  3906. │      │                                    │performing a file download.      │
  3907. │      │                                    │                                 │
  3908. │ char │protocol_file.record[x].up_cmd[81]  │This string contains the command │
  3909. │      │                                    │that should be executed by the   │
  3910. │      │                                    │BBS in order to start an upload  │
  3911. │      │                                    │using external protocol #x.      │
  3912. │      │                                    │                                 │
  3913. │ char │protocol_file.record[x].up_ctl[81]  │This string contains the filename│
  3914. │      │                                    │of the control file to use when  │
  3915. │      │                                    │performing a file download.      │
  3916. │      │                                    │                                 │
  3917. │ char │ ...record[x].up_log_keyword[21]    │This is the keyword that the BBS │
  3918. │      │                                    │software should look for in the  │
  3919. │      │                                    │log to find an upload.           │
  3920. │      │                                    │                                 │
  3921. │ char │ ...record[x].down_log_keyword[21]  │This is the keyword that the BBS │
  3922. │      │                                    │software should look for in the  │
  3923. │      │                                    │log to find any downloads.       │
  3924. │      │                                    │                                 │
  3925. │ char │ ...record[x].desc_word_num         │The word number in the logfile   │
  3926. │      │                                    │of the transfer description.     │
  3927. │      │                                    │                                 │
  3928. │ char │ ...record[x].name_word_num         │The word number in the logfile   │
  3929. │      │                                    │of the filename.                 │
  3930. │      │                                    │                                 │
  3931. │ char │protocol_file.filename[80]          │This string stores the full path │
  3932. │      │                                    │and filename of the BBS external │
  3933. │      │                                    │protocols configuration. Normally│
  3934. │      │                                    │you should not alter this        │
  3935. │      │                                    │variable yourself.               │
  3936. └──────┴────────────────────────────────────┴─────────────────────────────────┘
  3937.  
  3938.  
  3939. ┌─────────────────────────────────────────────────────────────────────────────┐
  3940. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 82 │
  3941. └─────────────────────────────────────────────────────────────────────────────┘
  3942.  
  3943.  
  3944.  
  3945. ┌─────────────────────────────────────────────────────────────────────────┐
  3946. │OD_READ_PROTOCOLS()    Read the BBS external protocols configuration     │
  3947. └─────────────────────────────────────────────────────────────────────────┘
  3948.   PROTOTYPE: int od_read_protocols(void)
  3949.  
  3950.      FORMAT: od_read_protocols();
  3951.  
  3952.     RETURNS: TRUE  if successful
  3953.              FALSE if unable to read configuration
  3954.  
  3955. DESCRIPTION: This function reads the protocol configuration located in
  3956.              the directory listed in the default_path variable. If the
  3957.              protocl configuration was found, it will be read into the
  3958.              external protocol configuration structure, described above.
  3959.  
  3960.              This function will return a value of TRUE if it was
  3961.              successful in reading the external protocol configuration, or
  3962.              FALSE if it OpenDoors was unable to read the protocol
  3963.              configuration. You should always check the value returned
  3964.              by this function before attempting to access the external
  3965.              protocols structure.
  3966.  
  3967.  
  3968.  
  3969.  
  3970. ┌─────────────────────────────────────────────────────────────────────────┐
  3971. │OD_WRITE_PROTOCLS()    Saves previously loaded external protocols config │
  3972. └─────────────────────────────────────────────────────────────────────────┘
  3973.   PROTOTYPE: int od_write_protocols(void)
  3974.  
  3975.      FORMAT: od_write_protocols();
  3976.  
  3977.     RETURNS: TRUE  if successful
  3978.              FALSE if unable to save configuration
  3979.  
  3980. DESCRIPTION: This function is used to save the previously loaded
  3981.              external protocols configuration, stored in the external
  3982.              protocols structure (described on the previous pages). The
  3983.              protocols information will be written back to the same file
  3984.              from which it was loaded.
  3985.  
  3986.              This function will return a value of TRUE if it was able to
  3987.              save the external protocol configuration. If it was unable
  3988.              to save the external protocol configuration, or if you call
  3989.              this function without having already read the configuration
  3990.              with od_read_protocols(), then od_write_protocols() will
  3991.              return a value of FALSE.
  3992.  
  3993.  
  3994. ┌─────────────────────────────────────────────────────────────────────────────┐
  3995. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 83 │
  3996. └─────────────────────────────────────────────────────────────────────────────┘
  3997.  
  3998.  
  3999.  
  4000. ┌─ ACCESSING THE NODE ACTIVITY INFORMATION ─┐
  4001. └───────────────────────────────────────────┘
  4002.  
  4003.               On multi-line BBS systems, the node activity ("useron")
  4004.        functions can provide your programs with information such as who
  4005.        is online on each node, what they are doing, and whether or not
  4006.        they are available for "chat". This information could be useful
  4007.        for a wide variety of applications, such as an activity summary
  4008.        program for SysOps (to allow them to see at a glance what is
  4009.        happening on the BBS), a multi-line chat door, or simply
  4010.        adjusting this information to let other nodes know what the user
  4011.        using your program is doing. In order to begin accessing the BBS
  4012.        node activity information, you must first call the
  4013.        od_useron_open() function. When you are finished accessing this
  4014.        information, you must also close the information files by calling
  4015.        the od_useron_close() function.
  4016.  
  4017.               The node activity information is accessed through the
  4018.        user_on structure, which is described in the chart below. At any
  4019.        time, this structure may contain the information about the
  4020.        activity of any single node. To read the node activity
  4021.        information for a particular node, use the od_useron_read()
  4022.        function, and to save any changes made to this information, use
  4023.        the od_useron_write() function.
  4024.  
  4025.  
  4026. ┌──────┬────────────────── NODE ACTIVITY STRUCTURE ───────────────────────────┐
  4027. │ TYPE │ VARIABLE NAME          │ DESCRIPTION                                 │
  4028. ├──────┼────────────────────────┼─────────────────────────────────────────────┤
  4029. │ char │ user_on.name[36]       │ This variable stores the name of the user   │
  4030. │      │                        │ currently online on the currently read node.│
  4031. │      │                        │ (see the od_useron_read() function for more │
  4032. │      │                        │ information on the currently read node.)    │
  4033. │      │                        │                                             │
  4034. │ char │ user_on.node           │ This variable stores the node number of the │
  4035. │      │                        │ currently read node. If you wish to remove  │
  4036. │      │                        │ a particular node from the node activity    │
  4037. │      │                        │ file, simply read the node, set this        │
  4038. │      │                        │ variable to 0, and then save the node again.│
  4039. │      │                        │ Otherwise, you should not alter the value of│
  4040. │      │                        │ this variable.                              │
  4041. │      │                        │                                             │
  4042. │ int  │ user_on.baud           │ This unsigned integer contains the baud rate│
  4043. │      │                        │ at which the user on the currently read node│
  4044. │      │                        │ is connected.                               │
  4045. │      │                        │                                             │
  4046. │ char │ user_on.location[26]   │ This string contains the city from which the│
  4047. │      │                        │ user on the currently read node is calling  │
  4048. │      │                        │ from.                                       │
  4049. └──────┴────────────────────────┴─────────────────────────────────────────────┘
  4050.  
  4051.  
  4052. ┌─────────────────────────────────────────────────────────────────────────────┐
  4053. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 84 │
  4054. └─────────────────────────────────────────────────────────────────────────────┘
  4055.  
  4056.  
  4057.  
  4058. ┌──────┬────────────────── NODE ACTIVITY STRUCTURE ───────────────────────────┐
  4059. │ TYPE │ VARIABLE NAME          │ DESCRIPTION                                 │
  4060. ├──────┼────────────────────────┼─────────────────────────────────────────────┤
  4061. │ char │ user_on.do_not_disturb │ This variable contains a TRUE/FALSE value   │
  4062. │      │                        │ indicating whether the user on the currently│
  4063. │      │                        │ read node does not which to be disturbed.   │
  4064. │      │                        │ (ie, is not available for chat)             │
  4065. │      │                        │                                             │
  4066. │ char │ user_on.status         │ This variable contains a status value,      │
  4067. │      │                        │ indicating what sort of activity the user   │
  4068. │      │                        │ on the currently read node is engaged in.   │
  4069. │      │                        │ This value will be one of the following     │
  4070. │      │                        │ constants, defined in the opendoor.h file:  │
  4071. │      │                        │                                             │
  4072. │      │                        │   STATUS_BROWSE - Indicates that the user is│
  4073. │      │                        │     browsing (ie, in a menu) on the BBS     │
  4074. │      │                        │                                             │
  4075. │      │                        │   STATUS_XFER - Indicates that the user is  │
  4076. │      │                        │     currently performing a file transfer.   │
  4077. │      │                        │                                             │
  4078. │      │                        │   STATUS_MESSAGE - Indicates that the user  │
  4079. │      │                        │     is writing a message.                   │
  4080. │      │                        │                                             │
  4081. │      │                        │   STATUS_DOOR - Indicates that the user is  │
  4082. │      │                        │     in a door or external program.          │
  4083. │      │                        │                                             │
  4084. │      │                        │   STATUS_CHAT - Indicates that the user is  │
  4085. │      │                        │     currently chatting with the sysop.      │
  4086. │      │                        │                                             │
  4087. │      │                        │   STATUS_QUEST - Indicates that the user is │
  4088. │      │                        │     currently answering a questionaire.     │
  4089. └──────┴────────────────────────┴─────────────────────────────────────────────┘
  4090.  
  4091.  
  4092. ┌─────────────────────────────────────────────────────────────────────────────┐
  4093. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 85 │
  4094. └─────────────────────────────────────────────────────────────────────────────┘
  4095.  
  4096.  
  4097.  
  4098. ┌─────────────────────────────────────────────────────────────────────────┐
  4099. │OD_USERON_OPEN()    Opens the node activity file for access              │
  4100. └─────────────────────────────────────────────────────────────────────────┘
  4101.   PROTOTYPE: int od_useron_open(void)
  4102.  
  4103.      FORMAT: od_useron_open();
  4104.  
  4105.     RETURNS: TRUE  if successful
  4106.              FALSE if unable to open node activity file
  4107.  
  4108. DESCRIPTION: This function opens the node activity file for access, and
  4109.              must be called prior to calling other od_useron_ functions.
  4110.              The node activity file (USERON.BBS on Apex or RemoteAccess
  4111.              systems), should be able to be located in the directory
  4112.              listed in the default_path variable. This function will
  4113.              return a value of TRUE if it was able to open the node
  4114.              activity file, and will return a value of FALSE if it was
  4115.              unable to open the file.
  4116.  
  4117.  
  4118. ┌─────────────────────────────────────────────────────────────────────────────┐
  4119. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 86 │
  4120. └─────────────────────────────────────────────────────────────────────────────┘
  4121.  
  4122.  
  4123.  
  4124. ┌─────────────────────────────────────────────────────────────────────────┐
  4125. │OD_USERON_READ()    Reads the node activity info. for specified node     │
  4126. └─────────────────────────────────────────────────────────────────────────┘
  4127.   PROTOTYPE: int od_useron_read(unsigned char node)
  4128.  
  4129.      FORMAT: od_useron_read(node);
  4130.  
  4131.     RETURNS: TRUE  if successful
  4132.              FALSE if unable to locate node activity information
  4133.  
  4134. DESCRIPTION: This function reads the node activity information for the
  4135.              specified node. This function is simply called with the
  4136.              node number (from 1 - 250 in Apex and Remote Access
  4137.              systems) of the node for which you wish to read the node
  4138.              activity information. If there is a user online on this
  4139.              node, the information will be read into the node activity
  4140.              structure, described above, and a value of TRUE will be
  4141.              returned. If there is no user online on the specified node,
  4142.              or if some error has occurred, then the od_useron_read()
  4143.              function will return a value of FALSE. Thus, you will
  4144.              probably want to check the value returned by this function
  4145.              prior to continuing on in your program. Note that the node
  4146.              activity information file must be opened using the
  4147.              od_useron_open() function before the od_useron_read()
  4148.              function can be used.
  4149.  
  4150.              In order to read the node activity information for every
  4151.              node, simply loop through all of the possible node numbers
  4152.              (ie. 1-99), and checking which nodes exist by the value
  4153.              returned by the od_useron_read() function. For example:
  4154.  
  4155.                     #include "opendoor.h"
  4156.  
  4157.                     int main(int argc,char *argv[])
  4158.                        {
  4159.                        register unsigned char node;
  4160.  
  4161.                        if(!od_useron_open()) return(1);
  4162.  
  4163.                        for(node=1;node<=99;++node)
  4164.                           {
  4165.                           if(od_useron_reasd(node))
  4166.                              {
  4167.                              cprintf("%s from %s is currently on node %d\n\r",
  4168.                                      user_on.name,
  4169.                                      user_on.location,
  4170.                                      user_on.node);
  4171.                              }
  4172.                           }
  4173.  
  4174.                        od_useron_close();
  4175.  
  4176.                        return(0);
  4177.                        }
  4178.  
  4179.  
  4180. ┌─────────────────────────────────────────────────────────────────────────────┐
  4181. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 87 │
  4182. └─────────────────────────────────────────────────────────────────────────────┘
  4183.  
  4184.  
  4185.  
  4186. ┌─────────────────────────────────────────────────────────────────────────┐
  4187. │OD_USERON_WRITE()   Save the currently read node activity information    │
  4188. └─────────────────────────────────────────────────────────────────────────┘
  4189.   PROTOTYPE: int od_useron_write(void)
  4190.  
  4191.      FORMAT: od_useron_write();
  4192.  
  4193.     RETURNS: TRUE  if successful
  4194.              FALSE if no node activity information is currently loaded
  4195.  
  4196. DESCRIPTION: This function saves any changes you have made to the node
  4197.              activity information for the the currently read node back
  4198.              to the useron file. Thus, you may only call this function
  4199.              after having previously succeded in reading the node
  4200.              activity information for a specific node using the
  4201.              od_useron_read() function. The od_useron_write() function
  4202.              will return a value of TRUE if it was able to save the node
  4203.              activity information, or return a FALSE if you have no node
  4204.              activity information is currently loaded.
  4205.  
  4206.              If you wish to remove a certain node from the node activity
  4207.              information file (ie, if the particular node has just gone
  4208.              offline), simply load that node with the od_useron_read()
  4209.              function, set the node number to 0, and write it back to
  4210.              the useron file using the od_useron_write() function.
  4211.  
  4212.  
  4213. ┌─────────────────────────────────────────────────────────────────────────────┐
  4214. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 88 │
  4215. └─────────────────────────────────────────────────────────────────────────────┘
  4216.  
  4217.  
  4218.  
  4219. ┌─────────────────────────────────────────────────────────────────────────┐
  4220. │OD_USERON_CLOSE()   Closes the node activity information file            │
  4221. └─────────────────────────────────────────────────────────────────────────┘
  4222.   PROTOTYPE: int od_useron_close(void)
  4223.  
  4224.      FORMAT: od_useron_close();
  4225.  
  4226.     RETURNS: TRUE  if successful
  4227.              FALSE if the node activity information file has not been
  4228.                    opened
  4229.  
  4230. DESCRIPTION: This function closes the node activity information file
  4231.              (USERON.BBS on Apex and Remote Access systems) after you
  4232.              have finished accessing the node activity information. This
  4233.              function will return a value of TRUE if it was successfully
  4234.              able to close the node activity information file, and will
  4235.              return a value of FALSE if the useron file has not
  4236.              previously been opened.
  4237.  
  4238.  
  4239. ┌─────────────────────────────────────────────────────────────────────────────┐
  4240. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 89 │
  4241. └─────────────────────────────────────────────────────────────────────────────┘
  4242.  
  4243.  
  4244.  
  4245. ┌─ ACCESSING CALL HISTORY INFORMATION ─┐
  4246. └──────────────────────────────────────┘
  4247.  
  4248.               OpenDoors also gives you full access to the BBS call
  4249.        history files, which provides information such as the total
  4250.        number of calls that the BBS has received, and a list of the
  4251.        calls to the BBS so far today - with information such as when
  4252.        each call started and ended, what user was online, and so on. On
  4253.        Apex, RemoteAccess, QuickBBS and compatible systems, this
  4254.        information is stored in the files SYSINFO.BBS and LASTCALL.BBS.
  4255.  
  4256.               In order to access the BBS call history information, you
  4257.        must first open these files, by simply calling the
  4258.        od_calls_open() function. When you are finished accessing this
  4259.        information, you should then close the BBS call history files
  4260.        using the od_calls_close() function. Each of the individual calls
  4261.        in the call history can then be read by calling the
  4262.        od_calls_read_next() function, and new calls may be added to the
  4263.        history by calling the od_calls_add() function. All of the call
  4264.        history information is accessed through the call_history
  4265.        structure, outlined in the table below:
  4266.  
  4267.  
  4268. ┌──────┬─────────────────── CALL HISTORY STRUCTURE ───────────────────────────┐
  4269. │ TYPE │ VARIABLE NAME                      │ DESCRIPTION                     │
  4270. ├──────┼────────────────────────────────────┼─────────────────────────────────┤
  4271. │ char │ call_history.node                  │ This variable lists the node    │
  4272. │      │                                    │ number that the caller of the   │
  4273. │      │                                    │ currently loaded call history   │
  4274. │      │                                    │ record was on.                  │
  4275. │      │                                    │                                 │
  4276. │ char │ call_history.name[36]              │ This string contains the name of│
  4277. │      │                                    │ the particular caller.          │
  4278. │      │                                    │                                 │
  4279. │ char │ call_history.location[26]          │ This string contains the        │
  4280. │      │                                    │ location of the particular      │
  4281. │      │                                    │ caller from the call history.   │
  4282. │      │                                    │                                 │
  4283. │ int  │ call_history.baud_rate             │ This unsigned integer indicates │
  4284. │      │                                    │ the baud rate at which the      │
  4285. │      │                                    │ particular caller was connected │
  4286. │      │                                    │                                 │
  4287. │ long │ call_history.times                 │ This variable indicates the     │
  4288. │      │                                    │ total number of times that the  │
  4289. │      │                                    │ user has called the BBS.        │
  4290. │      │                                    │                                 │
  4291. │ char │ call_history.logon_time[6]         │ This two strings indicate the   │
  4292. │ char │ call_history.logoff_time[6]        │ times at which the call from    │
  4293. │      │                                    │ the call history began and      │
  4294. │      │                                    │ ended.                          │
  4295. └──────┴────────────────────────────────────┴─────────────────────────────────┘
  4296.  
  4297.  
  4298. ┌─────────────────────────────────────────────────────────────────────────────┐
  4299. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 90 │
  4300. └─────────────────────────────────────────────────────────────────────────────┘
  4301.  
  4302.  
  4303.  
  4304.               The following variables from the call_history function
  4305.        are independant of any particular call history record, and will
  4306.        always contain the same value, regardless of what call history
  4307.        record is loaded into the variables listed on the previous page.
  4308.        (The variables on the previous page are from the LASTCALL.BBS
  4309.        file, and these variables are from the SYSINFO.BBS file)
  4310.  
  4311.  
  4312. ┌──────┬─────────────────── CALL HISTORY STRUCTURE ───────────────────────────┐
  4313. │ TYPE │ VARIABLE NAME                      │ DESCRIPTION                     │
  4314. ├──────┼────────────────────────────────────┼─────────────────────────────────┤
  4315. │      │                                    │                                 │
  4316. │ long │ call_history.total_system_calls    │ This variable will always       │
  4317. │      │                                    │ contain the total number of     │
  4318. │      │                                    │ calls that the BBS has received │
  4319. │      │                                    │                                 │
  4320. │ char │ call_history.last_system_caller[36]│ This variable will always       │
  4321. │      │                                    │ contain the name of the LAST    │
  4322. │      │                                    │ caller to the BBS               │
  4323. └──────┴────────────────────────────────────┴─────────────────────────────────┘
  4324.  
  4325.  
  4326. ┌─────────────────────────────────────────────────────────────────────────────┐
  4327. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 91 │
  4328. └─────────────────────────────────────────────────────────────────────────────┘
  4329.  
  4330.  
  4331.  
  4332. ┌─────────────────────────────────────────────────────────────────────────┐
  4333. │OD_CALLS_OPEN()     Opens the BBS call history files for access          │
  4334. └─────────────────────────────────────────────────────────────────────────┘
  4335.   PROTOTYPE: int od_calls_open(void)
  4336.  
  4337.      FORMAT: od_calls_open();
  4338.  
  4339.     RETURNS: TRUE  if successful
  4340.              FALSE if unable to open the BBS call history files
  4341.  
  4342. DESCRIPTION: This function opens the BBS call history files for access,
  4343.              and must be called prior to calling other od_calls_
  4344.              functions. The node activity files (LASTCALL.BBS and
  4345.              SYSINFO.BBS on Apex and RemoteAccess systems), should be
  4346.              able to be located in the directory listed in the
  4347.              default_path variable. This function will return a value of
  4348.              TRUE if it was able to open the call history files, and
  4349.              will return a value of FALSE if it was unable to open the
  4350.              files.
  4351.  
  4352.  
  4353. ┌─────────────────────────────────────────────────────────────────────────────┐
  4354. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 92 │
  4355. └─────────────────────────────────────────────────────────────────────────────┘
  4356.  
  4357.  
  4358.  
  4359. ┌─────────────────────────────────────────────────────────────────────────┐
  4360. │OD_CALLS_READ_NEXT()   Reads the next BBS call history record            │
  4361. └─────────────────────────────────────────────────────────────────────────┘
  4362.   PROTOTYPE: int od_calls_read_next(void)
  4363.  
  4364.      FORMAT: od_calls_read_next();
  4365.  
  4366.     RETURNS: TRUE  if successful
  4367.              FALSE if there are no more call history entries
  4368.                    or if the BBS call history file has not been opened
  4369.  
  4370. DESCRIPTION: This function will read the next BBS call history record
  4371.              from the call history file. This information is stored in
  4372.              the first part of the call_history structure, described
  4373.              above. The od_calls_read_next() function will return a
  4374.              value of TRUE if it was able to read the next record, or
  4375.              FALSE if there are no more records to read. Thus, to read
  4376.              through the BBS call history file, you would simply read
  4377.              each record one at a time by calling the
  4378.              od_calls_read_next() function. For example, the following
  4379.              program will display a list of the user's who have called
  4380.              the BBS today:
  4381.  
  4382.                  #include "opendoor.h"
  4383.  
  4384.                  int main(int argc,char *argv[])
  4385.                     {
  4386.                     od_calls_open();
  4387.  
  4388.                     cprintf("NAME               LOCATION     BAUD  NODE");
  4389.                     cprintf("  CALLS  LOGON  LOGOFF\n\r");
  4390.  
  4391.                     while(od_calls_read_next())
  4392.                        {
  4393.                        cprintf("%-20.20s %-15.15s %6u %-2.2d %-4.4d %s %s\n\r",
  4394.                                call_history.name,
  4395.                                call_history.location,
  4396.                                call_history.baud_rate,
  4397.                                call_history.node,
  4398.                                call_history.times,
  4399.                                call_history.logon_time,
  4400.                                call_history.logoff_time);
  4401.                        }
  4402.  
  4403.                     od_calls_close();
  4404.                     }
  4405.  
  4406.  
  4407. ┌─────────────────────────────────────────────────────────────────────────────┐
  4408. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 93 │
  4409. └─────────────────────────────────────────────────────────────────────────────┘
  4410.  
  4411.  
  4412.  
  4413. ┌─────────────────────────────────────────────────────────────────────────┐
  4414. │OD_CALLS_ADD()      Adds a new BBS call history record to the file       │
  4415. └─────────────────────────────────────────────────────────────────────────┘
  4416.   PROTOTYPE: int od_calls_add(void)
  4417.  
  4418.      FORMAT: od_calls_add();
  4419.  
  4420.     RETURNS: TRUE  if successful
  4421.              FALSE if unsuccessful
  4422.  
  4423. DESCRIPTION: This function can be used to add a new call history record
  4424.              to the BBS call history file. Simply set all of the
  4425.              variable in the first part of the call_history structure
  4426.              (described above) to the desired values, and then call this
  4427.              function. This function will automatically increment the
  4428.              total number of calls to the BBS, and set the name of the
  4429.              last caller. Note that the call history files must be
  4430.              opened using the od_calls_open() function prior to using
  4431.              the od_calls_add() function.
  4432.  
  4433.  
  4434.  
  4435. ┌─────────────────────────────────────────────────────────────────────────────┐
  4436. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 94 │
  4437. └─────────────────────────────────────────────────────────────────────────────┘
  4438.  
  4439.  
  4440.  
  4441. ┌─────────────────────────────────────────────────────────────────────────┐
  4442. │OD_CALLS_CLOSE()    Closes the BBS call history files                    │
  4443. └─────────────────────────────────────────────────────────────────────────┘
  4444.   PROTOTYPE: int od_calls_close(void)
  4445.  
  4446.      FORMAT: od_calls_close();
  4447.  
  4448.     RETURNS: TRUE  if successful
  4449.              FALSE if the BBS call history files have not been opened
  4450.  
  4451. DESCRIPTION: This function closes the BBS call history files after you
  4452.              have finished accessing the node activity information. This
  4453.              function will return a value of TRUE if it was successfully
  4454.              able to close the BBS call history files, and will return a
  4455.              value of FALSE if the files are not currently opened.
  4456.  
  4457.  
  4458. ┌─────────────────────────────────────────────────────────────────────────────┐
  4459. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 95 │
  4460. └─────────────────────────────────────────────────────────────────────────────┘
  4461.  
  4462.  
  4463.  
  4464. ┌─ BBS TIMELOG FILE ─┐
  4465. └────────────────────┘
  4466.  
  4467.               Among the BBS system files that OpenDoors gives you access
  4468.        to is the timelog file. This file stores a record of how busy the
  4469.        BBS has been on average at different times of day. This is the
  4470.        same information that is used to construct a system activity
  4471.        graph. This information is stored in a dynamically allocated
  4472.        structure, pointed to by timelog. Below each variable in this
  4473.        structure is listed, along with a brief description of the
  4474.        information stored within it. Since the timelog variable is
  4475.        actually a pointer to the structure, and not the structure
  4476.        itself, remember that you must access elements within it by using
  4477.        the -> operator in C. For example, to print the date on which the
  4478.        timelog begins:
  4479.  
  4480.                          puts(timelog->start_date);
  4481.  
  4482.        Below are the individual elements of the timelog structure. Note
  4483.        that before this information can be accessed, you must read it
  4484.        using the od_read_timelog() function, the use of which is
  4485.        described after the chart.
  4486.  
  4487.  
  4488.  
  4489. ┌──────┬─────────────────── BBS TIMELOG STRUCTURE ────────────────────────────┐
  4490. │ TYPE │ VARIABLE NAME           │ DESCRIPTION                                │
  4491. ├──────┼─────────────────────────┼────────────────────────────────────────────┤
  4492. │ char │ start_date[9]           │ This string contains the date on which the │
  4493. │      │                         │ timelog begins, in the format MM-DD-YY.    │
  4494. │      │                         │                                            │
  4495. │ int  │ busy_per_hour[24]       │ This array of unsigned integers lists the  │
  4496. │      │                         │ RELATIVE amount of time for which the BBS  │
  4497. │      │                         │ has been busy, on average, during each of  │
  4498. │      │                         │ the 24 hours of the day.                   │
  4499. │      │                         │                                            │
  4500. │ int  │ busy_per_day[7]         │ This array of unsigned integers lists the  │
  4501. │      │                         │ RELATIVE amount of time for which the BBS  │
  4502. │      │                         │ has been busy, on average, during each of  │
  4503. │      │                         │ the 7 days of the week.                    │
  4504. └──────┴─────────────────────────┴────────────────────────────────────────────┘
  4505.  
  4506.  
  4507. ┌─────────────────────────────────────────────────────────────────────────────┐
  4508. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 96 │
  4509. └─────────────────────────────────────────────────────────────────────────────┘
  4510.  
  4511.  
  4512.  
  4513. ┌─────────────────────────────────────────────────────────────────────────┐
  4514. │OD_READ_TIMELOG()  Reads the BBS timelog file into the timelog structure │
  4515. └─────────────────────────────────────────────────────────────────────────┘
  4516.   PROTOTYPE: int od_read_timelog(void)
  4517.  
  4518.      FORMAT: od_read_timelog();
  4519.  
  4520.     RETURNS: TRUE  if successful
  4521.              FALSE if unable to read the timelog
  4522.  
  4523. DESCRIPTION: This function reads the BBS timelog that is located in the
  4524.              directory pointed to by the global variable default_path.
  4525.              od_read_timelog() will automatically detect the type of BBS
  4526.              timelog file present in this directory, and read it into
  4527.              the structure pointed to by timelog. (see above). This
  4528.              structure is dynamically allocated by the od_read_timelog()
  4529.              function. If not enough memory is present to read the
  4530.              timelog, or if no OpenDoors compatible timelog files are
  4531.              found in the directory, this function will return FALSE. If
  4532.              successful, then this function will return TRUE. All
  4533.              variables and data stored in the timelog file are
  4534.              automatically converted to C format for your use.
  4535.  
  4536.  
  4537. ┌─────────────────────────────────────────────────────────────────────────────┐
  4538. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 97 │
  4539. └─────────────────────────────────────────────────────────────────────────────┘
  4540.  
  4541.  
  4542.  
  4543. ┌─ BBS MENU FILES ─┐
  4544. └──────────────────┘
  4545.  
  4546.               OpenDoors also provides you with access to the BBS menu
  4547.        files. This could be usefull in many cases, such as allowing your
  4548.        door programs to use the same menu files used on the rest of the
  4549.        BBS, or in writing your own menu editor. You may also wish to use
  4550.        this function in an installation program to automatically add
  4551.        your door to the BBS'es menu structure. Each menu file will
  4552.        consist of one or more "lines", each of which contains
  4553.        information such as the hot-key, text to display, command to
  4554.        execute, minimum security level, etc. for each command on the
  4555.        menu. The second, third, fourth, ... entries in the menu file are
  4556.        individual "lines" on the menu. However, the entry is not a true
  4557.        line, but instead a special information entry that contains
  4558.        information on the menu prompt. Thus, for the menu:
  4559.  
  4560.                        [!] Logoff
  4561.                        [/] Return to Main Menu
  4562.                        [S] Leave message for sysop
  4563.  
  4564.                    Enter your choice:
  4565.  
  4566.         The first entry in the menu file would contain the "Enter your
  4567.         choice:" prompt. The second entry would then contain the
  4568.         information for the "logoff" command, the third the information
  4569.         for the "return to main menu" command, and so on. You may use
  4570.         the OpenDoors function od_read_menu() and od_write_menu() to
  4571.         read and write any menu file. The menu file information is
  4572.         stored in the structure pointed to by the menuentry structure,
  4573.         which is allocated by the od_read_menu() function. This
  4574.         structure is described on the following page.
  4575.  
  4576.  
  4577. ┌─────────────────────────────────────────────────────────────────────────────┐
  4578. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 98 │
  4579. └─────────────────────────────────────────────────────────────────────────────┘
  4580.  
  4581.  
  4582.  
  4583. ┌──────┬──────────────────── MENU FILE STRUCTURE ─────────────────────────────┐
  4584. │ TYPE │ VARIABLE NAME                 │ DESCRIPTION                          │
  4585. ├──────┼───────────────────────────────┼──────────────────────────────────────┤
  4586. │ char │menuentry->entry[x].type       │ This variable contains the menu      │
  4587. │      │                               │ command type (ie, read message,      │
  4588. │      │                               │ change menu, logoff, etc.) of menu   │
  4589. │      │                               │ entry x. Please refer to the BBS     │
  4590. │      │                               │ documentation for complete           │
  4591. │      │                               │ information on each of the menu      │
  4592. │      │                               │ command #'s. (This information is    │
  4593. │      │                               │ beyond the scope of this manual.)    │
  4594. │      │                               │                                      │
  4595. │ int  │menuentry->entry[x].security   │ This two variables indicate the      │
  4596. │ char │menuentry->entry[x].flag[4]    │ minimum security level and flag      │
  4597. │      │                               │ settings a user must have to access  │
  4598. │      │                               │ menu entry x.                        │
  4599. │      │                               │                                      │
  4600. │ char │menuentry->entry[x].display[76]│ This variable contains the text that │
  4601. │      │                               │ should be displayed for menu entry x.│
  4602. │      │                               │ If no text is to be displayed for    │
  4603. │      │                               │ this menu entry, then this string    │
  4604. │      │                               │ should simply contain a ';' character│
  4605. │      │                               │                                      │
  4606. │ char │menuentry->entry[x].hotkey     │ This variable contains the key       │
  4607. │      │                               │ (letter, number or symbol) that is   │
  4608. │      │                               │ used to select the particular menu   │
  4609. │      │                               │ command.                             │
  4610. │      │                               │                                      │
  4611. │ char │menuentry->entry[x].options[81]│ This string contains special         │
  4612. │      │                               │ information that will be specific    │
  4613. │      │                               │ to each menu command type. For       │
  4614. │      │                               │ example, for the change menu         │
  4615. │      │                               │ command, this string would list the  │
  4616. │      │                               │ name of the menu to change to.       │
  4617. │      │                               │                                      │
  4618. │ char │menuentry->entry[x].foreground │ These two variables indicate the     │
  4619. │ char │menuentry->entry[x].background │ normal and highlighted colours       │
  4620. │      │                               │ for the particular menu item.        │
  4621. │      │                               │                                      │
  4622. │ char │menuentry->num_entries         │ This variable lists the number of    │
  4623. │      │                               │ menu items this particular menu      │
  4624. │      │                               │ actually has. This can be a          │
  4625. │      │                               │ value anywhere from 0-32 entries.    │
  4626. │      │                               │                                      │
  4627. │ char │menuentry->filename[80]        │ This variable indicates the path and │
  4628. │      │                               │ filename of the currently loaded menu│
  4629. │      │                               │ file. If you wish to re-save the menu│
  4630. │      │                               │ under a different filename, simply   │
  4631. │      │                               │ change the filename stored in this   │
  4632. │      │                               │ variable.                            │
  4633. └──────┴───────────────────────────────┴──────────────────────────────────────┘
  4634.  
  4635.  
  4636. ┌─────────────────────────────────────────────────────────────────────────────┐
  4637. │ OpenDoors Programmer's Manual ───────────────────────────────────── Page 99 │
  4638. └─────────────────────────────────────────────────────────────────────────────┘
  4639.  
  4640.  
  4641.  
  4642. ┌─────────────────────────────────────────────────────────────────────────┐
  4643. │OD_READ_MENU()     Reads a BBS menu file into the menu file structure    │
  4644. └─────────────────────────────────────────────────────────────────────────┘
  4645.   PROTOTYPE: int od_read_menu(char *filename)
  4646.  
  4647.      FORMAT: od_read_menu(filename);
  4648.  
  4649.     RETURNS: TRUE  if successful
  4650.              FALSE if unsuccessful
  4651.  
  4652. DESCRIPTION: The od_read_menu() function will read the contents of a
  4653.              BBS menu file into the menu file structure. The `filename'
  4654.              parameter should list the complete path and filename of the
  4655.              BBS menu files to be loaded. If the od_read_menu() function
  4656.              is successful, it will store the contents of the menu file
  4657.              in the menu file structure, and return a value of TRUE. If
  4658.              the menu file was not found, or if there was not enough
  4659.              memory to read the structure, then this function will
  4660.              return a value of FALSE.
  4661.  
  4662.  
  4663.  
  4664.  
  4665. ┌─────────────────────────────────────────────────────────────────────────┐
  4666. │OD_WRITE_MENU      Writes the BBS menu file in the menu file structure   │
  4667. └─────────────────────────────────────────────────────────────────────────┘
  4668.   PROTOTYPE: int od_write_menu(void)
  4669.  
  4670.      FORMAT: od_write_menu();
  4671.  
  4672.     RETURNS: TRUE  if successful
  4673.              FALSE if unsuccessful
  4674.  
  4675. DESCRIPTION: This function writes the currently loaded BBS menu file
  4676.              from the menu file structure back to disk. The
  4677.              od_write_menu() function will return a value of TRUE if
  4678.              successful. If no menu file has been loaded, or there is
  4679.              not enough memory to save the menu file structure, the
  4680.              od_write_menu() function will return a value of FALSE.
  4681.  
  4682.  
  4683. ┌─────────────────────────────────────────────────────────────────────────────┐
  4684. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 100 │
  4685. └─────────────────────────────────────────────────────────────────────────────┘
  4686.  
  4687.  
  4688.  
  4689. ┌─ ACCESSING THE BBS USER BASE FILES ─┐
  4690. └─────────────────────────────────────┘
  4691.  
  4692.               OpenDoors provides you with a complete user base engine
  4693.        for reading, altering, adding or removing users for any Apex,
  4694.        QuickBBS, SuperBBS, Remote Access or compatible user base. For
  4695.        systems running Apex or newer versions of Remote Access, the
  4696.        extended information in the USERSXI.BBS file is also made
  4697.        available, as well as all of the information in the USERS.BBS
  4698.        file - all automatically of course. The chart below lists all the
  4699.        variables available in the user record structure. Those variables
  4700.        that contain information from the USERSXI.BBS file will only be
  4701.        available if the user_type variable is equal to USER_RA100, as
  4702.        shown in the chart below. Again, the user record structure is
  4703.        automatically dynamically allocated by OpenDoors, and thus the
  4704.        structure elements are accessed using C's
  4705.        pointer-to-structure-element operator (->). As always, OpenDoors
  4706.        automatically converts all variables between the format in which
  4707.        they are stored and the standard C variable formats for your use.
  4708.  
  4709.  
  4710.  
  4711. ┌────┬────┬───────────────── USER RECORD VARIABLES ───────────────────────────┐
  4712. │EXT.│    │                               │                                   │
  4713. │INFO│TYPE│VARIABLE NAME                  │DESCRIPTION                        │
  4714. ├────┼────┼───────────────────────────────┼───────────────────────────────────┤
  4715. │    │char│user_record->name[36]          │Name of the currently loaded user  │
  4716. │    │    │                               │                                   │
  4717. │    │char│user_record->location[26]      │Location where the user lives      │
  4718. │    │    │                               │                                   │
  4719. │    │char│user_record->password[16]      │User's password                    │
  4720. │    │    │                               │                                   │
  4721. │    │char│user_record->data_phone[13]    │The user's business/data phone     │
  4722. │    │    │                               │number                             │
  4723. │    │    │                               │                                   │
  4724. │    │char│user_record->voice_phone[13]   │The user's home/voice phone number │
  4725. │    │    │                               │                                   │
  4726. │    │char│user_record->last_time[6]      │String containing the 24-hour      │
  4727. │    │    │                               │format time of the user's last call│
  4728. │    │    │                               │                                   │
  4729. │    │char│user_record->last_date[9]      │String containing the date of the  │
  4730. │    │    │                               │user's last call                   │
  4731. └────┴────┴───────────────────────────────┴───────────────────────────────────┘
  4732.  
  4733.  
  4734. ┌─────────────────────────────────────────────────────────────────────────────┐
  4735. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 101 │
  4736. └─────────────────────────────────────────────────────────────────────────────┘
  4737.  
  4738.  
  4739.  
  4740. ┌────┬────┬───────────────── USER RECORD VARIABLES ───────────────────────────┐
  4741. │EXT.│    │                               │                                   │
  4742. │INFO│TYPE│VARIABLE NAME                  │DESCRIPTION                        │
  4743. ├────┼────┼───────────────────────────────┼───────────────────────────────────┤
  4744. │    │char│user_record->attrib1           │User's attribute flags. Each bit of│
  4745. │    │    │                               │this flag stores a seperate piece  │
  4746. │    │    │                               │of information the user or a       │
  4747. │    │    │                               │seperate user setting, as follows: │
  4748. │    │    │                               │                                   │
  4749. │    │    │                               │  ┌─────┬───────────────────────┐  │
  4750. │    │    │                               │  │ BIT │ DESCRIPTION           │  │
  4751. │    │    │                               │  ├─────┼───────────────────────┤  │
  4752. │    │    │                               │  │  0  │ Is the user deleted   │  │
  4753. │    │    │                               │  │  1  │ Is screen clearing on │  │
  4754. │    │    │                               │  │  2  │ Is "more" prompt on   │  │
  4755. │    │    │                               │  │  3  │ Is ANSI mode on       │  │
  4756. │    │    │                               │  │  4  │ User no-kill setting  │  │
  4757. │    │    │                               │  │  5  │ Transfer-priority     │  │
  4758. │    │    │                               │  │  6  │ Full screen editor    │  │
  4759. │    │    │                               │  │  7  │ Quiet mode            │  │
  4760. │    │    │                               │  └─────┴───────────────────────┘  │
  4761. │    │    │                               │                                   │
  4762. │    │char│user_record->flag[4]           │The User's A, B, C and D flag      │
  4763. │    │    │                               │settings                           │
  4764. │    │    │                               │                                   │
  4765. │    │int │user_record->netmail_credit    │The amount of netmail credit that  │
  4766. │    │    │                               │the user has                       │
  4767. │    │    │                               │                                   │
  4768. │    │int │user_record->credit_pending    │The credit that is pending for user│
  4769. │    │    │                               │                                   │
  4770. │    │int │user_record->msgs_posted       │Total number of messages posted by │
  4771. │    │    │                               │the user                           │
  4772. │    │    │                               │                                   │
  4773. │    │int │user_record->last_read         │System message number of the last  │
  4774. │    │    │                               │message read by the user           │
  4775. │    │    │                               │                                   │
  4776. │    │int │user_record->security          │Unsigned integer containing the    │
  4777. │    │    │                               │user's security level              │
  4778. │    │    │                               │                                   │
  4779. │    │int │user_record->num_calls         │The number of calls the user has   │
  4780. │    │    │                               │placed to the BBS                  │
  4781. │    │    │                               │                                   │
  4782. │    │int │user_record->uploads           │The number of uploads the user has │
  4783. │    │    │                               │made                               │
  4784. │    │    │                               │                                   │
  4785. │    │int │user_record->downloads         │The number of downloads that the   │
  4786. │    │    │                               │user has made                      │
  4787. │    │    │                               │                                   │
  4788. │    │int │user_record->upload_k          │Total number of KiloBytes uploaded │
  4789. │    │    │                               │by the user                        │
  4790. │    │    │                               │                                   │
  4791. │    │int │user_record->download_k        │Total number of KBytes downloaded  │
  4792. └────┴────┴───────────────────────────────┴───────────────────────────────────┘
  4793.  
  4794.  
  4795. ┌─────────────────────────────────────────────────────────────────────────────┐
  4796. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 102 │
  4797. └─────────────────────────────────────────────────────────────────────────────┘
  4798.  
  4799.  
  4800.  
  4801. ┌────┬────┬───────────────── USER RECORD VARIABLES ───────────────────────────┐
  4802. │EXT.│    │                               │                                   │
  4803. │INFO│TYPE│VARIABLE NAME                  │DESCRIPTION                        │
  4804. ├────┼────┼───────────────────────────────┼───────────────────────────────────┤
  4805. │    │    │                               │                                   │
  4806. │    │int │user_record->today_k           │Total K downloaded by the user on  │
  4807. │    │    │                               │the day of their last call         │
  4808. │    │    │                               │                                   │
  4809. │    │int │user_record->elapsed_time      │The amount of time that the user   │
  4810. │    │    │                               │used on the day of their last call │
  4811. │    │    │                               │                                   │
  4812. │    │int │user_record->screen_length     │The user's screen length setting   │
  4813. │    │    │                               │                                   │
  4814. │    │char│user_record->last_pwd_change   │The number of calls the user has   │
  4815. │    │    │                               │placed to the BBS since their last │
  4816. │    │    │                               │password change                    │
  4817. │    │    │                               │                                   │
  4818. │    │char│user_record->attrib2           │Additional user attribute flags. As│
  4819. │    │    │                               │with the attrib1 variable, each bit│
  4820. │    │    │                               │of this flag stores a seperate     │
  4821. │    │    │                               │piece of information the user or a │
  4822. │    │    │                               │seperate user setting, as follows: │
  4823. │    │    │                               │                                   │
  4824. │    │    │                               │  ┌─────┬───────────────────────┐  │
  4825. │    │    │                               │  │ BIT │ DESCRIPTION           │  │
  4826. │    │    │                               │  ├─────┼───────────────────────┤  │
  4827. │    │    │                               │  │  0  │ User hot-keys setting │  │
  4828. │    │    │                               │  │  1  │ Is AVATAR graphics on │  │
  4829. │    │    │                               │  │  2  │ Full screen reader    │  │
  4830. │    │    │                               │  │  3  │ Hidden from userlist  │  │
  4831. │    │    │                               │  └─────┴───────────────────────┘  │
  4832. │    │    │                               │                                   │
  4833. │    │char│user_record->group             │The group number to which the user │
  4834. │    │    │                               │belongs                            │
  4835. │    │    │                               │                                   │
  4836. │Yes │char│user_record->handle[36]        │The user's pseudonym, or handle    │
  4837. │    │    │                               │                                   │
  4838. │Yes │char│user_record->comment[81]       │A string containing any comments   │
  4839. │    │    │                               │the sysop wants to remember about  │
  4840. │    │    │                               │the user                           │
  4841. │    │    │                               │                                   │
  4842. │Yes │char│user_record->first_date[9]     │String containing the date of the  │
  4843. │    │    │                               │user's first call                  │
  4844. │    │    │                               │                                   │
  4845. │Yes │char│user_record->combined_areas[25]│200 bits corrosponding to each of  │
  4846. │    │    │                               │the 200 message areas - indicating │
  4847. │    │    │                               │whether or not the user wants each │
  4848. │    │    │                               │area included in their combined    │
  4849. │    │    │                               │message reading                    │
  4850. │    │    │                               │                                   │
  4851. │Yes │char│user_record->birth_date[9]     │String containing the date of the  │
  4852. │    │    │                               │user's birthday                    │
  4853. └────┴────┴───────────────────────────────┴───────────────────────────────────┘
  4854.  
  4855.  
  4856. ┌─────────────────────────────────────────────────────────────────────────────┐
  4857. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 103 │
  4858. └─────────────────────────────────────────────────────────────────────────────┘
  4859.  
  4860.  
  4861.  
  4862. ┌────┬────┬───────────────── USER RECORD VARIABLES ───────────────────────────┐
  4863. │EXT.│    │                               │                                   │
  4864. │INFO│TYPE│VARIABLE NAME                  │DESCRIPTION                        │
  4865. ├────┼────┼───────────────────────────────┼───────────────────────────────────┤
  4866. │    │    │                               │                                   │
  4867. │Yes │char│user_record->expiry_date[9]    │String containing the date that the│
  4868. │    │    │                               │user's account will expire         │
  4869. │    │    │                               │                                   │
  4870. │Yes │char│user_record->screen_width      │Width of the user's terminal screen│
  4871. │    │    │                               │                                   │
  4872. │    │char│user_type                      │This variable indicates the type   │
  4873. │    │    │                               │of user file that has been opened. │
  4874. │    │    │                               │This value will be one of two      │
  4875. │    │    │                               │constants defined in the opendoor.h│
  4876. │    │    │                               │file:                              │
  4877. │    │    │                               │                                   │
  4878. │    │    │                               │USER_RA100 - Indicates that the    │
  4879. │    │    │                               │   extended information in a       │
  4880. │    │    │                               │   USERSXI.BBS file is available.  │
  4881. │    │    │                               │   When this information is        │
  4882. │    │    │                               │   available, those entries in the │
  4883. │    │    │                               │   user record with a "YES" in the │
  4884. │    │    │                               │   `Ext. Info' column may be used  │
  4885. │    │    │                               │                                   │
  4886. │    │    │                               │USER_RA_QBBS - Indicates that no   │
  4887. │    │    │                               │   extended information from a     │
  4888. │    │    │                               │   USERSXI.BBS file is available.  │
  4889. │    │    │                               │   When this information is not    │
  4890. │    │    │                               │   available, those entries in the │
  4891. │    │    │                               │   user record with a "YES" in the │
  4892. │    │    │                               │   `Ext.  Info' column may not be  │
  4893. │    │    │                               │   used                            │
  4894. │    │    │                               │                                   │
  4895. │    │    │                               │(notice that this variable is not  │
  4896. │    │    │                               │ a member of the user_record       │
  4897. │    │    │                               │ structure)                        │
  4898. │    │    │                               │                                   │
  4899. │    │int │num_users                      │This variable indicates the total  │
  4900. │    │    │                               │number of users present in the     │
  4901. │    │    │                               │currently opened user record file  │
  4902. │    │    │                               │                                   │
  4903. │    │int │user_number                    │This variable indicates the user   │
  4904. │    │    │                               │number of the user record that is  │
  4905. │    │    │                               │currently loaded. If no user record│
  4906. │    │    │                               │is currently loaded, then this     │
  4907. │    │    │                               │value will be equal to -1.         │
  4908. └────┴────┴───────────────────────────────┴───────────────────────────────────┘
  4909.  
  4910.  
  4911. ┌─────────────────────────────────────────────────────────────────────────────┐
  4912. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 104 │
  4913. └─────────────────────────────────────────────────────────────────────────────┘
  4914.  
  4915.  
  4916.  
  4917. ┌─────────────────────────────────────────────────────────────────────────┐
  4918. │OD_OPEN_USERS()    Opens the users file for manipulation                 │
  4919. └─────────────────────────────────────────────────────────────────────────┘
  4920.   PROTOTYPE: int od_open_users(char *path)
  4921.  
  4922.      FORMAT: od_open_users(path);
  4923.  
  4924.     RETURNS: TRUE  if successful
  4925.              FALSE if unable to open users file, or if not enough memory
  4926.                    is present
  4927.  
  4928. DESCRIPTION: The od_open_users() function is used to open the users, and
  4929.              must be called before any of the other user file
  4930.              manipulation functions may be called. The od_open_users()
  4931.              function will automatically attempt to allocate memory for
  4932.              the user record storage. If there is not enough memory
  4933.              available to store this user record, the user base will not
  4934.              be opened, and this function will return a FALSE. You must
  4935.              pass to the od_open_users() function a string indicating
  4936.              the directory where the users file is stored. If you are
  4937.              writing a program that uses the users file, as well as
  4938.              other BBS configuration, it would probably be a good idea
  4939.              to get the path to the users file from the BBS
  4940.              configuration. For example:
  4941.  
  4942.                         strcpy(default_path,"");
  4943.                         od_read_config();
  4944.                         od_open_users(cfg->msg_base_path);
  4945.  
  4946.              Once the user file has been successfully opened (ie, if
  4947.              this function returns a TRUE value), you will be able to
  4948.              determine the number of users on the BBS using the
  4949.              num_users variable. You will also be able to use all of the
  4950.              user base manipulation functions (listed below). Once you
  4951.              are finished working with the user file, you should close
  4952.              it using the od_close_users() function, as described below.
  4953.  
  4954.              If a USERSXI.BBS file exists in this directectory, it will
  4955.              also be opened, and the extended user information will
  4956.              automatically be made available to you by the other user
  4957.              base manipulation functions.
  4958.  
  4959.  
  4960. ┌─────────────────────────────────────────────────────────────────────────────┐
  4961. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 105 │
  4962. └─────────────────────────────────────────────────────────────────────────────┘
  4963.  
  4964.  
  4965.  
  4966. ┌─────────────────────────────────────────────────────────────────────────┐
  4967. │OD_READ_USER()     Reads a user record from the opened user base         │
  4968. └─────────────────────────────────────────────────────────────────────────┘
  4969.   PROTOTYPE: int od_read_user(int num)
  4970.  
  4971.      FORMAT: od_read_user(num)   or   od_read_user(-1)
  4972.  
  4973.     RETURNS:  TRUE if successful
  4974.              FALSE if unable to read user,
  4975.                    if the user file has not been opened,
  4976.                    or if the end of the user file has been reached
  4977.  
  4978. DESCRIPTION: The od_read_user() function is used to read a user from the
  4979.              users file. You can randomly read any user from the user
  4980.              file, by passing a number from 0 to num_users-1 to the
  4981.              od_read_user function. Alternatively, you can read the next
  4982.              user from the file, by passing a value of -1 to this
  4983.              function. When the user file is first opened, the record
  4984.              pointer will be set to the first record, so you can read
  4985.              all records from the user file in sequence by simply always
  4986.              passing a value of -1 to the od_read_user() function. For
  4987.              example:
  4988.  
  4989.                    // program to print every user's name, along with the
  4990.                    // date of their account expiry
  4991.  
  4992.                    od_open_users("");                       // open user file
  4993.                    printf("DATE      NAME\n");              // print titles
  4994.                    while(od_read_user(-1))                  // while users left
  4995.                       printf("%s  %s\n",user_record->expiry_date,
  4996.                                         user_record->name); // print user info
  4997.                    od_close_users();                        // close user file
  4998.  
  4999.  
  5000.              Note that the users file must be opened prior to using the
  5001.              od_read_user() function.
  5002.  
  5003.  
  5004. ┌─────────────────────────────────────────────────────────────────────────────┐
  5005. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 106 │
  5006. └─────────────────────────────────────────────────────────────────────────────┘
  5007.  
  5008.  
  5009.  
  5010. ┌─────────────────────────────────────────────────────────────────────────┐
  5011. │OD_WRITE_USER()    Writes the currently read user back to user base      │
  5012. └─────────────────────────────────────────────────────────────────────────┘
  5013.   PROTOTYPE: int od_write_user(void)
  5014.  
  5015.      FORMAT: od_write_user();
  5016.  
  5017.     RETURNS:  TRUE if successful
  5018.              FALSE if unable to write user,
  5019.                    if the user file has not been opened,
  5020.                    or if no user is currently loaded
  5021.  
  5022. DESCRIPTION: The od_write_user() function is used to write a user back
  5023.              to the user file after the record has been read. If no user
  5024.              record is currently loaded, then this function will return
  5025.              with an error. As always, this function will automatically
  5026.              convert your variables from their C format to the format in
  5027.              which they are stored in the file. If the extended
  5028.              information from a USERSXI.BBS file is present, then the
  5029.              changed record will also be saved in the USERSXI.BBS file,
  5030.              automatically. Thus, an example of use of the
  5031.              od_write_user() function would be:
  5032.  
  5033.                  // program to give any user with 5 or more uploads
  5034.                  // a security level of 50. (This could be used to
  5035.                  // only give users download priviledges after they
  5036.                  // have uploaded 5 times)
  5037.  
  5038.                  od_open_users("");
  5039.                  while(od_read_user(-1))
  5040.                     if(user_record->uploads >= 5 && user_record->security < 50)
  5041.                        {
  5042.                        user_record->security=50;
  5043.                        od_write_user();
  5044.                        }
  5045.                  od_close_users();
  5046.  
  5047.              If you wish to delete a user from the user file, simply
  5048.              read their record, set their deleted bit (see the user
  5049.              record structure), and then write the user to the user
  5050.              file. The user will then be removed the next time the
  5051.              sysop's user base packing utility is run.
  5052.  
  5053.  
  5054. ┌─────────────────────────────────────────────────────────────────────────────┐
  5055. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 107 │
  5056. └─────────────────────────────────────────────────────────────────────────────┘
  5057.  
  5058.  
  5059.  
  5060. ┌─────────────────────────────────────────────────────────────────────────┐
  5061. │OD_ADD_USER()      Adds a new user to the user file                      │
  5062. └─────────────────────────────────────────────────────────────────────────┘
  5063.   PROTOTYPE: int od_add_user(void)
  5064.  
  5065.      FORMAT: od_add_user();
  5066.  
  5067.     RETURNS:  TRUE if successful
  5068.              FALSE if unable to write user,
  5069.                    or if the user file has not been opened
  5070.  
  5071. DESCRIPTION: The od_add_user() function is used to add a new user to the
  5072.              currently opened user file. To create a new user, simply
  5073.              set all of the variables in the user record structure
  5074.              (those entries that begin with user_record->) to the value
  5075.              they should have for the new user, and then call the
  5076.              od_add_user() function. The currently loaded user will then
  5077.              become this new user - the last user in the file.
  5078.  
  5079.  
  5080. ┌─────────────────────────────────────────────────────────────────────────────┐
  5081. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 108 │
  5082. └─────────────────────────────────────────────────────────────────────────────┘
  5083.  
  5084.  
  5085.  
  5086. ┌─────────────────────────────────────────────────────────────────────────┐
  5087. │OD_CLOSE_USERS()   Closes the currently opened user file                 │
  5088. └─────────────────────────────────────────────────────────────────────────┘
  5089.   PROTOTYPE: int od_close_users(void)
  5090.  
  5091.      FORMAT: od_close_users();
  5092.  
  5093.     RETURNS:  TRUE if successful
  5094.              FALSE if unsuccessful
  5095.  
  5096. DESCRIPTION: The od_close_users() function should be used to close the
  5097.              currently loaded user file after all processing with that
  5098.              file has been completed.
  5099.  
  5100.  
  5101. ┌─────────────────────────────────────────────────────────────────────────────┐
  5102. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 109 │
  5103. └─────────────────────────────────────────────────────────────────────────────┘
  5104.  
  5105.  
  5106.  
  5107. ┌─ THE MESSAGE BASE MANIPULATION ROUTINES ─┐
  5108. └──────────────────────────────────────────┘
  5109.  
  5110.               The OpenDoors message base engine, which currently
  5111.        supports the Hudson message base format used by many popular BBS
  5112.        packages such as Apex, RemoteAccess, QuickBBS, SuperBBS and
  5113.        others. Future vesions will be expanded to support other message
  5114.        base formats as well, so that your programs need only be
  5115.        recompiled to automatically gain support for other BBSes, such as
  5116.        PC-Board, Maximus, etc. Use of the message base can be very
  5117.        helpfull in many doors and utilties - either to allow users to
  5118.        post messages to other users or the sysop, or to allow the
  5119.        utility to send it's own messages to users.
  5120.  
  5121.               These message base routines also support the RemoteAccess
  5122.        1.01 Hudson Message Base Locking Specifications, which allow
  5123.        various utilities, multiple BBS nodes, etc. to all access the
  5124.        message base at the same time. If you wish to disable the use of
  5125.        RA 1.01 locking, simply set the global variable ra_101_locking to
  5126.        FALSE.
  5127.  
  5128.               To access the message base, simply open the message base
  5129.        using the od_msg_open() function. When you are finished accessing
  5130.        the message base, simply close it again using the od_msg_close()
  5131.        function. OpenDoors currently requires access to the BBS
  5132.        configuration in order to determine information such as message
  5133.        area types and the location of the message base. Thus, if the
  5134.        configuration strucuture has not already been created (as it is
  5135.        by the od_read_config() fuction), OpenDoors will attempt to read
  5136.        the configruation from the directory listed in the default_path
  5137.        global variable. Once the message base has been opened, you can
  5138.        access information about the message base, such as the total
  5139.        number of messages, etc., through the msg_info structure. While
  5140.        accessing the message base, message header information can be
  5141.        accessed through the message header structure, pointed to by the
  5142.        msg_hdr. This message header contains information on the message
  5143.        you are currently working with, such as who the message is from,
  5144.        who it is addressed to, etc. Both of these structures are
  5145.        documented on the following pages. Following this, you will find
  5146.        references for each of the message base engine functions. Refer
  5147.        carefully to these references for information on performing
  5148.        various functions with the message base, such as reading
  5149.        messages, posting new messages, and so on.
  5150.  
  5151.  
  5152. ┌─────────────────────────────────────────────────────────────────────────────┐
  5153. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 110 │
  5154. └─────────────────────────────────────────────────────────────────────────────┘
  5155.  
  5156.  
  5157.  
  5158. ┌──────┬─────────── MESSAGE BASE INFORMATION STRUCTURE ───────────────────────┐
  5159. │ TYPE │ VARIABLE NAME                 │ DESCRIPTION                          │
  5160. ├──────┼───────────────────────────────┼──────────────────────────────────────┤
  5161. │ int  │ msg_info->first_msg           │ Unsigned integer listing the number  │
  5162. │      │                               │ of the first message in the message  │
  5163. │      │                               │ base                                 │
  5164. │      │                               │                                      │
  5165. │ int  │ msg_info->last_msg            │ Unsigned integer listing the number  │
  5166. │      │                               │ of the last message in the message   │
  5167. │      │                               │ base                                 │
  5168. │      │                               │                                      │
  5169. │ int  │ msg_info->total_msgs          │ Unsigned integer listing the total   │
  5170. │      │                               │ number of messages in the message    │
  5171. │      │                               │ base                                 │
  5172. │      │                               │                                      │
  5173. │ int  │ msg_info->total_on_board[200] │ Unsigned integer listing the total   │
  5174. │      │                               │ number of messages on each of the    │
  5175. │      │                               │ message "boards"                     │
  5176. └──────┴───────────────────────────────┴──────────────────────────────────────┘
  5177.  
  5178.  
  5179.  
  5180.  
  5181. ┌──────┬──────────────── MESSAGE HEADER STRUCTURE ────────────────────────────┐
  5182. │ TYPE │ VARIABLE NAME                 │ DESCRIPTION                          │
  5183. ├──────┼───────────────────────────────┼──────────────────────────────────────┤
  5184. │ int  │ msg_hdr->message_number       │ Unsigned integer listing the message │
  5185. │      │                               │ number of the message that we are    │
  5186. │      │                               │ currently working with. You should   │
  5187. │      │                               │ not change this value.               │
  5188. │      │                               │                                      │
  5189. │ int  │ msg_hdr->previous_reply       │ Unsigned integer listing the message │
  5190. │      │                               │ number of the previous message in    │
  5191. │      │                               │ the "reply chain".                   │
  5192. │      │                               │                                      │
  5193. │ int  │ msg_hdr->next_reply           │ Unsigned integer listing the message │
  5194. │      │                               │ number of the next message in the    │
  5195. │      │                               │ "reply chain".                       │
  5196. │      │                               │                                      │
  5197. │ int  │ msg_hdr->times_read           │ Unsigned integer inidcating the      │
  5198. │      │                               │ number of times this message has been│
  5199. │      │                               │ read. (Not normally used)            │
  5200. │      │                               │                                      │
  5201. │ int  │ msg_hdr->start_block          │ Block number of the first block of   │
  5202. │      │                               │ the message text. You should not     │
  5203. │      │                               │ alter this value.                    │
  5204. │      │                               │                                      │
  5205. │ int  │ msg_hdr->num_blocks           │ Number of blocks in the message text.│
  5206. │      │                               │ Again, you should not alter this     │
  5207. │      │                               │ value.                               │
  5208. └──────┴───────────────────────────────┴──────────────────────────────────────┘
  5209.  
  5210.  
  5211. ┌─────────────────────────────────────────────────────────────────────────────┐
  5212. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 111 │
  5213. └─────────────────────────────────────────────────────────────────────────────┘
  5214.  
  5215.  
  5216.  
  5217. ┌──────┬──────────────── MESSAGE HEADER STRUCTURE ────────────────────────────┐
  5218. │ TYPE │ VARIABLE NAME                 │ DESCRIPTION                          │
  5219. ├──────┼───────────────────────────────┼──────────────────────────────────────┤
  5220. │ int  │ msg_hdr->dest_net             │ For netmail messages, these variables│
  5221. │ int  │ msg_hdr->dest_node            │ will list the origin and destination │
  5222. │ int  │ msg_hdr->origin_net           │ node addresses of the message        │
  5223. │ int  │ msg_hdr->origin_node          │                                      │
  5224. │ char │ msg_hdr->dest_zone            │                                      │
  5225. │ char │ msg_hdr->origin_zone          │                                      │
  5226. │      │                               │                                      │
  5227. │ int  │ msg_hdr->cost                 │ Unsigned int indicating the estimated│
  5228. │      │                               │ cost of sending this netmail message.│
  5229. │      │                               │                                      │
  5230. │ char │ msg_hdr->msg_attr             │ Attribute bits for this message. Each│
  5231. │      │                               │ bit is represented by a seperate     │
  5232. │      │                               │ constant, defined in the opendoor.h  │
  5233. │      │                               │ file. These bits are as follows:     │
  5234. │      │                               │                                      │
  5235. │      │                               │  MSG_DELETED - If set, indicates that│
  5236. │      │                               │     the message has been deleted, and│
  5237. │      │                               │     should never be displayed to the │
  5238. │      │                               │     user. Deleted messages will later│
  5239. │      │                               │     be removed from the message base │
  5240. │      │                               │     when the sysop runs a message    │
  5241. │      │                               │     base packing utility.            │
  5242. │      │                               │                                      │
  5243. │      │                               │  MSG_OUTGOING_NET - If set, indicates│
  5244. │      │                               │     that this message is a netmail   │
  5245. │      │                               │     message that has not yet been    │
  5246. │      │                               │     exported from the message base.  │
  5247. │      │                               │                                      │
  5248. │      │                               │  MSG_NETMAIL - If set, indicates that│
  5249. │      │                               │     this is a netmail message.       │
  5250. │      │                               │                                      │
  5251. │      │                               │  MSG_PRIVATE - If set, indicates that│
  5252. │      │                               │     the message is private, and      │
  5253. │      │                               │     should only be read by the sysop,│
  5254. │      │                               │     the person who posted the        │
  5255. │      │                               │     message, and the person to whom  │
  5256. │      │                               │     the message is addressed.        │
  5257. │      │                               │                                      │
  5258. │      │                               │  MSG_RECEIVED - If set, indicates tha│
  5259. │      │                               │     the person to whom the message is│
  5260. │      │                               │     addressed has read (received) it.│
  5261. │      │                               │                                      │
  5262. │      │                               │  MSG_OUTGOING_ECHO - If set, indicate│
  5263. │      │                               │     that the message is an echomail  │
  5264. │      │                               │     message that has not yet been    │
  5265. │      │                               │     sent.                            │
  5266. │      │                               │                                      │
  5267. │      │                               │  MSG_LOCAL - If set, indicates that  │
  5268. │      │                               │     this is a local message.         │
  5269. └──────┴───────────────────────────────┴──────────────────────────────────────┘
  5270.  
  5271.  
  5272. ┌─────────────────────────────────────────────────────────────────────────────┐
  5273. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 112 │
  5274. └─────────────────────────────────────────────────────────────────────────────┘
  5275.  
  5276.  
  5277.  
  5278. ┌──────┬──────────────── MESSAGE HEADER STRUCTURE ────────────────────────────┐
  5279. │ TYPE │ VARIABLE NAME                 │ DESCRIPTION                          │
  5280. ├──────┼───────────────────────────────┼──────────────────────────────────────┤
  5281. │ char │ msg_hdr->net_attr             │ Netmail bits for this message. Each  │
  5282. │      │                               │ bit is represented by a seperate     │
  5283. │      │                               │ constant, defined in the opendoor.h  │
  5284. │      │                               │ file. These bits (except for the     │
  5285. │      │                               │ file attach bit), will usually only  │
  5286. │      │                               │ be used for netmail messages. These  │
  5287. │      │                               │ bits are as follows:                 │
  5288. │      │                               │                                      │
  5289. │      │                               │  NET_KILL_SENT - If this bit is set, │
  5290. │      │                               │     it indicates that the message    │
  5291. │      │                               │     should be deleted after it has   │
  5292. │      │                               │     been sent (exported from the     │
  5293. │      │                               │     message base).                   │
  5294. │      │                               │                                      │
  5295. │      │                               │  NET_SENT - Indicates that the       │
  5296. │      │                               │     message has been sent.           │
  5297. │      │                               │                                      │
  5298. │      │                               │  NET_FILE_ATTACH - Indicates that    │
  5299. │      │                               │     there are files attached to this │
  5300. │      │                               │     message.                         │
  5301. │      │                               │                                      │
  5302. │      │                               │  NET_CRASH - Indicates that the      │
  5303. │      │                               │     netmail message should be sent   │
  5304. │      │                               │     with "Crash" priority.           │
  5305. │      │                               │                                      │
  5306. │      │                               │  NET_REQ_RECEIPT - Indicates a       │
  5307. │      │                               │     request for a message received   │
  5308. │      │                               │     receipt.                         │
  5309. │      │                               │                                      │
  5310. │      │                               │  NET_REQ_AUDIT - Indicates a request │
  5311. │      │                               │     for an audit.                    │
  5312. │      │                               │                                      │
  5313. │      │                               │  NET_RETURN_RECEIPT - Indicates that │
  5314. │      │                               │     this message is a return receipt.│
  5315. │      │                               │                                      │
  5316. │ char │ msg_hdr->board                │ Unsigned integer from 0 to 199,      │
  5317. │      │                               │ indicating the message board number  │
  5318. │      │                               │ that this message is located in. Do  │
  5319. │      │                               │ not change this value.               │
  5320. │      │                               │                                      │
  5321. │ char │ msg_hdr->time[6]              │ String listing the time at which the │
  5322. │      │                               │ message was created.                 │
  5323. │      │                               │                                      │
  5324. │ char │ msg_hdr->date[9]              │ String listing the date on which the │
  5325. │      │                               │ message was created.                 │
  5326. │      │                               │                                      │
  5327. │ char │ msg_hdr->who_to[36]           │ String listing the user name to which│
  5328. │      │                               │ the message is addressed.            │
  5329. └──────┴───────────────────────────────┴──────────────────────────────────────┘
  5330.  
  5331.  
  5332. ┌─────────────────────────────────────────────────────────────────────────────┐
  5333. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 113 │
  5334. └─────────────────────────────────────────────────────────────────────────────┘
  5335.  
  5336.  
  5337.  
  5338. ┌──────┬──────────────── MESSAGE HEADER STRUCTURE ────────────────────────────┐
  5339. │ TYPE │ VARIABLE NAME                 │ DESCRIPTION                          │
  5340. ├──────┼───────────────────────────────┼──────────────────────────────────────┤
  5341. │ char │ msg_hdr->who_from[36]         │ String listing the user name from    │
  5342. │      │                               │ whom the message was sent.           │
  5343. │      │                               │                                      │
  5344. │ char │ msg_hdr->subject[73]          │ String indicating the subject of     │
  5345. │      │                               │ this message.                        │
  5346. └──────┴───────────────────────────────┴──────────────────────────────────────┘
  5347.  
  5348.  
  5349. ┌─────────────────────────────────────────────────────────────────────────────┐
  5350. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 114 │
  5351. └─────────────────────────────────────────────────────────────────────────────┘
  5352.  
  5353.  
  5354.  
  5355. ┌─────────────────────────────────────────────────────────────────────────┐
  5356. │OD_MSG_OPEN()      Opens the message base for access                     │
  5357. └─────────────────────────────────────────────────────────────────────────┘
  5358.   PROTOTYPE: int od_msg_open(void)
  5359.  
  5360.      FORMAT: od_msg_open();
  5361.  
  5362.     RETURNS:  TRUE if successful
  5363.              FALSE if unable to open message base,
  5364.                    if configuration was not available,
  5365.                    or if not enough memory was available
  5366.  
  5367. DESCRIPTION: The od_msg_open() function allocates memory for the
  5368.              OpenDoors message base engine and opens the message base
  5369.              for access, and must be called prior to using any of the
  5370.              message base manipulation routines. The od_msg_open()
  5371.              function will also setup and read data into the message
  5372.              base information structure, as described above. If the
  5373.              od_msg_open() function returns a TRUE value, then the
  5374.              message base is ready for access, and you are free to call
  5375.              any of the other message base manipulation functions. Once
  5376.              you are finished with the message base, you should close
  5377.              the message base files, using the od_msg_close() function.
  5378.  
  5379.              The OpenDoors message base engine also requires that the
  5380.              main BBS configuration and BBS message area configuration
  5381.              be available. If this information has not already been read
  5382.              when the message base is opened, OpenDoors will attempt to
  5383.              read the configuration from the directory listed in the
  5384.              default_path global variable. Following is an example of a
  5385.              program that uses the message base information read by the
  5386.              od_msg_open() function:
  5387.  
  5388.                 // program to display the total # of messages in each area
  5389.  
  5390.                 #include "opendoor.h"
  5391.  
  5392.                 int main(int argc,char *argv[])
  5393.                    {
  5394.                    unsigned char counter;
  5395.  
  5396.                    if(!od_msg_open()) return(1);
  5397.                    printf("# MSGS     MESSAGE AREA\n");
  5398.                    for(counter=0;counter<200;++counter)
  5399.                       {
  5400.                       if(strlen(message_info->area[counter].name)==0)
  5401.                          {
  5402.                          printf("%-5d      %s\n",
  5403.                                              msg_info->total_on_board[counter],
  5404.                                              message_info->area[counter].name);
  5405.                          }
  5406.                       }
  5407.                    }
  5408.  
  5409. ┌─────────────────────────────────────────────────────────────────────────────┐
  5410. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 115 │
  5411. └─────────────────────────────────────────────────────────────────────────────┘
  5412.  
  5413.  
  5414.  
  5415. ┌─────────────────────────────────────────────────────────────────────────┐
  5416. │OD_MSG_POST()      Writes (posts) a new message to the message base      │
  5417. └─────────────────────────────────────────────────────────────────────────┘
  5418.   PROTOTYPE: int od_msg_post(char *text)
  5419.  
  5420.      FORMAT: od_msg_post(text);
  5421.  
  5422.     RETURNS:  TRUE if successful
  5423.              FALSE if unable to write message,
  5424.                    or if message base has not been opened
  5425.  
  5426. DESCRIPTION: The od_msg_post() function is used to post a new message in
  5427.              the message base. This could either be a message written by
  5428.              a user to another person, or a "robot" message from your
  5429.              program to one or more users. In order to post a message,
  5430.              you must first set some of the variables in the message header
  5431.              structure to the values they should have for this message,
  5432.              then call the od_msg_post() function, passing to it the
  5433.              text of your message. If the message is an echomail
  5434.              message, OpenDoors will automatically add tearline and
  5435.              origin line information (as configured in the message area
  5436.              configuration) for you. The entries in the header structure
  5437.              that you must set prior to calling the od_msg_post function
  5438.              are:
  5439.  
  5440.                  msg_hdr->board
  5441.                  msg_hdr->who_to[36]
  5442.                  msg_hdr->who_from[36]
  5443.                  msg_hdr->subject[73]
  5444.                  msg_hdr->msg_attr
  5445.                  msg_hdr->previous_reply
  5446.                  msg_hdr->next_reply
  5447.  
  5448.              Also, if you are posting a message in a netmail area, you
  5449.              should set the following variables:
  5450.  
  5451.                  msg_hdr->dest_net
  5452.                  msg_hdr->dest_node
  5453.                  msg_hdr->origin_net
  5454.                  msg_hdr->origin_node
  5455.                  msg_hdr->dest_zone
  5456.                  msg_hdr->origin_zone
  5457.                  msg_hdr->cost
  5458.                  msg_hdr->net_attr
  5459.  
  5460.              On the following page is an example of a program that makes
  5461.              use of the od_msg_post() function.
  5462.  
  5463.              *IMPORTANT* Remember that lines in message are always
  5464.              seperated with the carriage return character ('\r'), not the
  5465.              linefeed character ('\n')!
  5466.  
  5467.  
  5468. ┌─────────────────────────────────────────────────────────────────────────────┐
  5469. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 116 │
  5470. └─────────────────────────────────────────────────────────────────────────────┘
  5471.  
  5472.  
  5473.  
  5474.              Here is an example of a program that makes use of the
  5475.              od_msg_post() function. This program simply posts a message
  5476.              wishing happy birthday to any user who's birthday is today:
  5477.  
  5478.  
  5479.                 #include "opendoor.h"              // include header file
  5480.  
  5481.                 #include <time.h>
  5482.                 #include <string.h>
  5483.  
  5484.                 int main(int argc,char *argv[])
  5485.                    {
  5486.                    time_t timer;
  5487.                    struct tm *tblock;
  5488.                    char today[6];
  5489.  
  5490.                    strcpy(default_path,"");        // set default path
  5491.                    od_read_config();               // read configuration
  5492.                                                    // open user base
  5493.                    if(!od_open_users(cfg->msg_base_path)) return(1);
  5494.  
  5495.                    if(!od_msg_open()) return(1);   // open message base
  5496.  
  5497.  
  5498.                    timer=time(NULL);               // get today's date
  5499.                    tblock=localtime(&timer);
  5500.                    sprintf(today,"%02.2d-%02.2d",tblock->tm_mon+1,
  5501.                                                  tblock->tm_mday);
  5502.  
  5503.                    while(od_read_user(-1))         // loop through every user
  5504.                       {
  5505.                       if(strncmp(today,user_record->birth_date,5)==0)
  5506.                          {                         // post message to user
  5507.                          msg_hdr->board=0;         // set message header info
  5508.                          strcpy(msg_hdr->who_to,user_record->name);
  5509.                          strcpy(msg_hdr->who_from,"OpenDoors");
  5510.                          strcpy(msg_hdr->subject,"Happy Birthday!");
  5511.                          msg_hdr->msg_attr=MSG_PRIVATE;
  5512.                          msg_hdr->previous_reply=0;
  5513.                          msg_hdr->next_reply=0;
  5514.                                                    // send message
  5515.                          od_msg_post("Happy Birthday to you!\n");
  5516.                          }
  5517.                       }
  5518.  
  5519.                    od_close_users();               // close files
  5520.                    od_msg_close();
  5521.                    }
  5522.  
  5523.  
  5524. ┌─────────────────────────────────────────────────────────────────────────────┐
  5525. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 117 │
  5526. └─────────────────────────────────────────────────────────────────────────────┘
  5527.  
  5528.  
  5529.  
  5530. ┌─────────────────────────────────────────────────────────────────────────┐
  5531. │OD_MSG_READ_HDR()  Reads the message header of the specified message     │
  5532. └─────────────────────────────────────────────────────────────────────────┘
  5533.   PROTOTYPE: int od_msg_read_hdr(unsigned int num)
  5534.  
  5535.      FORMAT: od_msg_read_hdr(num);
  5536.  
  5537.     RETURNS:  TRUE if successful
  5538.              FALSE if unable to read header,
  5539.                    if invalid message number,
  5540.                    or if message base has not been opened
  5541.  
  5542. DESCRIPTION: The od_msg_read_hdr() function is used to read the header
  5543.              information for a message from the message base. This
  5544.              information will then be available through the message
  5545.              header structure, described above. Note that the message
  5546.              base must be opened, using the od_msg_open() function,
  5547.              prior to calling the od_msg_read_hdr() function.
  5548.  
  5549.              The od_msg_read_hdr() can be called in one of two modes.
  5550.              The first mode allows you to randomly read the header of
  5551.              any message in the message base, and the second allows you
  5552.              to instantly read the next message header.
  5553.  
  5554.              To randomly read any message header from the message base,
  5555.              simply call the od_msg_read_hdr() function, passing to it
  5556.              the message number of the header you wish to read. For
  5557.              example, to display the subject of the first message on the
  5558.              system, simply:
  5559.  
  5560.                           od_msg_read_hdr(msg_info->first_msg);
  5561.                           puts(msg_hdr->subject);
  5562.  
  5563.              Alternatively, you may wish to simply read the next header
  5564.              from the message base. Using this mode will be faster than
  5565.              requiring OpenDoors to search the message header file in
  5566.              order to find the particular message number you asked for.
  5567.              To cause the od_msg_read_hdr() function to read the header
  5568.              of the next message in the message base, simply pass to it
  5569.              the constand NEXT_MESSAGE (defined in the opendoor.h header
  5570.              file.) For example to read all message to the end of the
  5571.              message base, you could:
  5572.  
  5573.                       while(od_msg_read_hdr(NEXT_MESSAGE))
  5574.                          {
  5575.                          printf("From: %s   To: %s    Re: %s\n",
  5576.                                 msg_hdr->who_from,
  5577.                                 msg_hdr->who_to,
  5578.                                 msg_hdr->subject);
  5579.                          }
  5580.  
  5581.  
  5582. ┌─────────────────────────────────────────────────────────────────────────────┐
  5583. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 118 │
  5584. └─────────────────────────────────────────────────────────────────────────────┘
  5585.  
  5586.  
  5587.  
  5588. ┌─────────────────────────────────────────────────────────────────────────┐
  5589. │OD_MSG_READ_TEXT() Reads the text of a particular message                │
  5590. └─────────────────────────────────────────────────────────────────────────┘
  5591.   PROTOTYPE: int od_msg_read_text(char *text,unsigned int max_len)
  5592.  
  5593.      FORMAT: od_msg_read_text(text,max_len);
  5594.  
  5595.     RETURNS:  TRUE if successful
  5596.              FALSE if unable to read message,
  5597.                    if invalid message number,
  5598.                    or if message base has not been opened
  5599.  
  5600. DESCRIPTION: The od_msg_read_text() function is used to read the actual
  5601.              text of a message in the message base. In order to read the
  5602.              text of a message, you must first call the
  5603.              od_msg_read_hdr() function for the desired message number.
  5604.              Then, you simply call the od_msg_read_text() function,
  5605.              passing to it a pointer to a buffer to hold the message,
  5606.              along with the maximum length of the buffer.  Note that the
  5607.              message base must be opened, using the od_msg_open()
  5608.              function, prior to calling the od_msg_read_text() function.
  5609.              For example, to load the text of the first message on
  5610.              the system, simply:
  5611.  
  5612.                      #define MAX_MSG_LEN 20000
  5613.  
  5614.                      ...
  5615.  
  5616.                      char message[MAX_MSG_LEN];
  5617.                      od_msg_read_hdr(msg_info->first_msg);
  5618.                      od_msg_read_text((char *)&message,MAX_MSG_LEN);
  5619.  
  5620.              Note that messages are always stored with carriage returns
  5621.              (\r) between lines, but no line feeds (\n). Thus, to
  5622.              display a message that you have read, you might do
  5623.              something like:
  5624.  
  5625.                  od_msg_read_hdr(NEXT_MESSAGE);
  5626.                  od_msg_read_text((char *)&message,MAX_MSG_LEN);
  5627.  
  5628.                  text=(char *)&buffer;
  5629.  
  5630.                  while(*text)
  5631.                     {
  5632.                     if(*text=='\r')
  5633.                        {
  5634.                        cputs("\n\r");
  5635.                        }
  5636.                     else
  5637.                        {
  5638.                        putch(*text);
  5639.                        }
  5640.                     text++;
  5641.                     }
  5642.  
  5643.  
  5644. ┌─────────────────────────────────────────────────────────────────────────────┐
  5645. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 119 │
  5646. └─────────────────────────────────────────────────────────────────────────────┘
  5647.  
  5648.  
  5649.  
  5650. ┌─────────────────────────────────────────────────────────────────────────┐
  5651. │OD_MSG_CHANGE_HDR()    Saves changes to currenlty loaded message header  │
  5652. └─────────────────────────────────────────────────────────────────────────┘
  5653.   PROTOTYPE: int od_msg_change_hdr(void)
  5654.  
  5655.      FORMAT: od_msg_change_hdr();
  5656.  
  5657.     RETURNS:  TRUE if successful
  5658.              FALSE if unable to write header,
  5659.                    if no header has been read,
  5660.                    or if message base has not been opened
  5661.  
  5662. DESCRIPTION: The od_msg_change_hdr() function can be used to allow you
  5663.              to make changes to the header of a message that already
  5664.              exists. Two important reasons for doing this would be to
  5665.              set the received bit on a message after it has been read,
  5666.              and to set the deleted bit on a message, in order to delete
  5667.              it.
  5668.  
  5669.              The od_msg_change_hdr() function will save the currently
  5670.              loaded message header. Thus, in order to change a message
  5671.              header, you must first read the header with the
  5672.              od_msg_read_hdr() function. Then make any changes you wish
  5673.              to make to the message header, and save it back to the
  5674.              message base using the od_msg_change_hdr() function.
  5675.  
  5676.              This function will return a value of TRUE if it was able to
  5677.              save the changed message header, and FALSE if it was unable
  5678.              to make these changes. Common causes of od_msg_change_hdr()
  5679.              being unable to save the new message header are either that
  5680.              the message header has not been previously read, or that
  5681.              the message base has not been opened.
  5682.  
  5683.  
  5684. ┌─────────────────────────────────────────────────────────────────────────────┐
  5685. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 120 │
  5686. └─────────────────────────────────────────────────────────────────────────────┘
  5687.  
  5688.  
  5689.  
  5690. ┌─────────────────────────────────────────────────────────────────────────┐
  5691. │OD_MSG_CLOSE()     Closes the message base files after access            │
  5692. └─────────────────────────────────────────────────────────────────────────┘
  5693.   PROTOTYPE: int od_msg_close(void)
  5694.  
  5695.      FORMAT: od_msg_close();
  5696.  
  5697.     RETURNS:  TRUE if successful
  5698.              FALSE if message base has not been opened
  5699.  
  5700. DESCRIPTION: The od_msg_close() function is simply used to close the
  5701.              message base files and shutdown the OpenDoors message base
  5702.              engine. Always be sure to call the od_msg_close() function
  5703.              when you are finished accessing the message base.
  5704.  
  5705.  
  5706. ┌─────────────────────────────────────────────────────────────────────────────┐
  5707. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 121 │
  5708. └─────────────────────────────────────────────────────────────────────────────┘
  5709.  
  5710.  
  5711.  
  5712. ┌─ TROUBLESHOOTING COMMON PROBLEMS ─┐
  5713. └───────────────────────────────────┘
  5714.  
  5715.               If you are experiencing difficulty programming with
  5716.        OpenDoors, I would encourage you to try following these steps to
  5717.        solve your problem:
  5718.  
  5719.                1.) Re-read the section(s) of this manual, your Turbo C
  5720.                    manuals and your program itself that apply to the
  5721.                    problem you are experiencing.
  5722.  
  5723.                2.) Check the solutions to common problems section below,
  5724.                    to see if your specific problem is dealt with.
  5725.  
  5726.                3.) Check the value in the od_errno variable, which will
  5727.                    often provide vital clues as to the source of the
  5728.                    problem. Use of the od_errno variable is described
  5729.                    below
  5730.  
  5731.                4.) If you are still stuck, please feel more than free to
  5732.                    get in touch with me! (see the end of the manual for
  5733.                    information on reaching me) I am always more than
  5734.                    happy to help anyone with their OpenDoors problems!
  5735.  
  5736.  
  5737.  
  5738. ┌─ THE OD_ERRNO VARIABLE ─┐
  5739. └─────────────────────────┘
  5740.  
  5741.               To assist in the debugging of programs written with
  5742.        OpenDoors, the BBS system file functions (including configuration
  5743.        files, message files, user files, etc.) use the od_errno global
  5744.        variable. When any of these functions are unable to perform their
  5745.        function, and return a value of FALSE, the od_errno variable will
  5746.        indicate the nature of the error that has occured. The od_errno
  5747.        variable will use the same values as are used by Turbo C's errno
  5748.        variable, and are listed on the following page. For example, you
  5749.        could use the following piece of code to test for a lack of
  5750.        available memory:
  5751.  
  5752.               if(errno==ENOMEM)
  5753.                  {
  5754.                  printf("The last error to occur was as a result of lack
  5755.                          of memory!\n");
  5756.                  }
  5757.  
  5758.  
  5759. ┌─────────────────────────────────────────────────────────────────────────────┐
  5760. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 122 │
  5761. └─────────────────────────────────────────────────────────────────────────────┘
  5762.  
  5763.                          VALUES OF OD_ERRNO VARIABLE
  5764.  
  5765.     od_errno     MEANING
  5766.     ──────────────────────────────────────────────────────────────────────
  5767.     EZERO        Error Zero
  5768.     EINVFNC      An attempt was made to call an invalid function number
  5769.     ENOFILE      OpenDoors was unable to find the specified file
  5770.     ENOPATH      OpenDoors was unable to find the specified path
  5771.     ECONTR       Indicates that internal memory blocks have been corrupted
  5772.     EINVMEM      An attempt was made to access and invalid memory block
  5773.     EINVENV      Indicates that the environment has been corrupted
  5774.     EINVFMT      An invalid format was used in calling OpenDoors functions.
  5775.                  For example, you tried to write a user record back to the
  5776.                  file which has not been previously read.
  5777.     EINVACC      Indicates an invalid access code has been used
  5778.     EINVDAT      Indicates that data was found to be invalid. Often, this
  5779.                  will indicate that a file on the disk has been damaged.
  5780.     EINVDRV      Indicates that a specified disk drive does not exist
  5781.     ENMFILE      Inidcates that the end of a file has been reached, or that
  5782.                  whatever was being searched for could not be found.
  5783.     ENOENT       Indicates that specified file or directory does not exist
  5784.     EMFILE       Indicates that there are not enough file handles available.
  5785.                  The user should increase the FILES= setting in their
  5786.                  CONFIG.SYS file.
  5787.     EACCES       Unable to access a particual file, probably because it is
  5788.                  already in use by another program.
  5789.     EBADF        Bad file number. This error will often occur as a result of
  5790.                  attempting to access a file that has not been opened.
  5791.     ENOMEM       Indicates that not enough memory is available. Try using a
  5792.                  larger memory model, and freeing memory used by other
  5793.                  programs.
  5794.     ENODEV       An attempt was made to access a device that doesn't exist.
  5795.     ERANGE       A value was found to be out of range. This can occur when
  5796.                  you try to use a pathname/filename that is too long, or if
  5797.                  you are attempting to read a user number beyond the end of
  5798.                  the user file.
  5799.     EEXIST       An attempt was made to create a file that already exists.
  5800.     EFAULT       Another unspecified error has occured.
  5801.  
  5802.  
  5803. ┌─────────────────────────────────────────────────────────────────────────────┐
  5804. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 123 │
  5805. └─────────────────────────────────────────────────────────────────────────────┘
  5806.  
  5807.  
  5808.  
  5809. ───────────────────────────────────────────────────────────────────────────────
  5810.  COMMON PROBLEM            SOLUTION
  5811. ───────────────────────────────────────────────────────────────────────────────
  5812.  Program Won't Compile     1.) Check that the compiler is able to locate
  5813.                                the OpenDoors header file, "OPENDOOR.H".
  5814.                                This can be accompilshed either by
  5815.                                placing this header file in the same
  5816.                                directory as your other header files
  5817.                                (such as STDIO.H, etc.), or by placing
  5818.                                the header file in the current directory.
  5819.  
  5820.                            2.) Be sure that you are linking your program
  5821.                                with the correct library for the memory
  5822.                                model you are using. (See the section
  5823.                                on compiling with OpenDoors). Also be
  5824.                                sure that both the source code file for
  5825.                                your program (such as RAVOTE.C) and the
  5826.                                library file are listed in your project
  5827.                                file, and that the project file is
  5828.                                loaded. (For help with project files,
  5829.                                please refer to your Turbo C manuals)
  5830.  
  5831.                            3.) If you have tried the above solutions,
  5832.                                and your program still won't compile,
  5833.                                then the problem is most likely an error
  5834.                                in your source code file. If you are
  5835.                                unable to resolve your problem, feel free
  5836.                                to get in touch with me.
  5837.  
  5838.  
  5839. ┌─────────────────────────────────────────────────────────────────────────────┐
  5840. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 124 │
  5841. └─────────────────────────────────────────────────────────────────────────────┘
  5842.  
  5843.  
  5844.  
  5845. ───────────────────────────────────────────────────────────────────────────────
  5846.  COMMON PROBLEM            SOLUTION
  5847. ───────────────────────────────────────────────────────────────────────────────
  5848.  Screen Will Not Clear     1.) If you are using the od_clr_scr()
  5849.                                function to clear the screen, but are not
  5850.                                getting any results, this is likely
  5851.                                because the user online has screen
  5852.                                clearing turned off. If you wish to force
  5853.                                screen clearing regardless of the user's
  5854.                                screen clearing settings (this is
  5855.                                probably not a good idea), use the
  5856.                                function call od_emulate(12);
  5857.  
  5858.  
  5859.  The sysop's "Shell to     1.) If you press the Alt-J function key, but
  5860.  DOS" function key does        do not get any results, your problem is
  5861.  not work                      likely as a result of lack of memory.
  5862.                                If enough memory is not available to load
  5863.                                the command processor (usually
  5864.                                COMMAND.COM) when the Alt-J function key
  5865.                                is pressed, OpenDoors will automatically
  5866.                                return to the door.
  5867.  
  5868.  
  5869.  Get a "Fixup Overflow"    1.) This problem was probably caused by a
  5870.  error when linking            mismatch between your memory model
  5871.                                selection in your compiler, and the
  5872.                                memory model library you are using. See
  5873.                                the section on compiling programs with
  5874.                                OpenDoors for more information on the
  5875.                                correct library you should be using for
  5876.                                your memory model selection.
  5877.  
  5878.  
  5879.  Difficulty compiling      1.) The OpenDoors built-in terminal emulation
  5880.  doors that use OpenDoors      routines, od_emulate() and od_send_file()
  5881.  terminal emulation under      require Turbo C++ or Borland C++ in order
  5882.  old versions of Turbo C       to be compiled into your programs. You
  5883.                                may, however, "trick" the old versions of
  5884.                                Turbo C into compiling your door, by
  5885.                                creating a global variable, _wscroll.
  5886.                                Simply place the line:
  5887.  
  5888.                                      int _wscroll;
  5889.  
  5890.                                at the beginning of your source code
  5891.                                file. You will now be able to compile
  5892.                                your program and use these function under
  5893.                                old versions of Turbo C, however a few of
  5894.                                the AVATAR-specific control codes will
  5895.                                not always function correctly.
  5896.  
  5897.  
  5898. ┌─────────────────────────────────────────────────────────────────────────────┐
  5899. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 125 │
  5900. └─────────────────────────────────────────────────────────────────────────────┘
  5901.  
  5902.  
  5903.  
  5904. ┌─ OPENDOORS HISTORY ─┐
  5905. └─────────────────────┘
  5906.               This section of the manual is a brief history of the
  5907.        additions and enhancments that OpenDoors has gone through to get
  5908.        to where it is today. OpenDoors is constantly being improved and
  5909.        upgraded, and almost all of the changes are made in response to
  5910.        requests by current users of OpenDoors. In fact, almost every
  5911.        reasonable request to date has been implemented in the current
  5912.        version of OpenDoors. (If you are a registered user of OpenDoors,
  5913.        do you notice where some of your own suggestions have been
  5914.        implemented?) If you are upgrading from a previous version of
  5915.        OpenDoors, this history list will also help you to identify what
  5916.        new features are available in this version.
  5917.  
  5918.  
  5919. Version 1.00 - Initial beta test version of the OpenDoors doordriver.
  5920.                Proved to be very bug-free.
  5921.  
  5922. Version 1.10 - Many features have been improved upon and added since
  5923.                version 1.00.
  5924.  
  5925. Version 1.20 - Made several changes:
  5926.                       ■ Support for the new RemoteAccess 1.00 enhanced
  5927.                         exitinfo.bbs file, with many extra pieces of
  5928.                         information.
  5929.  
  5930.                       ■ Added a Alt-K function key to allow the sysop to
  5931.                         temporarily disable the user's keyboard
  5932.  
  5933.                       ■ Added full support for turning on and off status
  5934.                         line. Status line has been changed slightly in
  5935.                         format, and [F9] help function key added.
  5936.  
  5937.                       ■ Improved sysop chat mode (added multi-colour and
  5938.                         wordwrap)
  5939.  
  5940.                       ■ Fixed up shell-to-DOS to automatically shell to
  5941.                         the command processor specified in COMSPEC
  5942.                         instead of always using COMMAND.COM. OpenDoors
  5943.                         now also returns to system to the drive and
  5944.                         directory it was in before DOS shell was issued.
  5945.  
  5946.                       ■ Added support for the new RemoteAccess sysop
  5947.                         next key.
  5948.  
  5949.  
  5950. ┌─────────────────────────────────────────────────────────────────────────────┐
  5951. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 126 │
  5952. └─────────────────────────────────────────────────────────────────────────────┘
  5953.  
  5954.  
  5955.  
  5956. Version 1.30 - A few quick changes to perfect all the features of this
  5957.                version before beginning major development work on
  5958.                OpenDoors 2.00. Fixed two problems:
  5959.                       ■ The status line can no longer be turned back on
  5960.                         by the sysop using F1 - F9 keys, if your door
  5961.                         has turned it off to put it's own on instead.
  5962.  
  5963.                       ■ A rather major problem was fixed for use of
  5964.                         OpenDoors in conjunction with RA 1.00. We
  5965.                         accidentally forgot to save some of the data
  5966.                         that is unused in previous versions, but has now
  5967.                         been implemented in the new version. This bug
  5968.                         caused some very obscure bugs, such as the
  5969.                         USERSXI.BBS file being fried. All fixed now.
  5970.  
  5971. Version 1.40 - Another maintenance release. This version should now
  5972.                function perfectly when used in conjunction with older
  5973.                versions of Turbo C. Other changes in this version
  5974.                include:
  5975.                       ■ Better error recovery in the case that something
  5976.                         on the BBS has been screwed up.
  5977.  
  5978.                       ■ More customability of OpenDoors, including
  5979.                         allowing the user (programmer) to alter the
  5980.                         various OpenDoors messages, and provisions for
  5981.                         user defined function keys for the sysop. (ie,
  5982.                         you could make Alt-Y another hotkey for the
  5983.                         sysop)
  5984.  
  5985. Version 2.00 - Yet another release, prior to the next major upgrades, some new
  5986.                features have been implemented including:
  5987.                       ■ Added support for AVATAR graphics. OpenDoors
  5988.                         will automatically detect the presence of AVATAR
  5989.                         graphics mode when running under Remote Access,
  5990.                         and will allow your door to toggle it when
  5991.                         running under other BBS systems.
  5992.  
  5993.                       ■ Improved ANSI routines. Added some new
  5994.                         functions, and changed existing functions to
  5995.                         send shorter ANSI codes in some cicumstances.
  5996.  
  5997.                       ■ The "Sysop Next" key should now work correctly with
  5998.                         RA 1.00 and later.
  5999.  
  6000.  
  6001. Version 2.10 - Changes in this version include:
  6002.                       ■ Implementation of a registration key-code for ease
  6003.                         of upgrading to registered versions.
  6004.  
  6005.                       ■ Added an od_printf() function for ease of formatted
  6006.                         output from within OpenDoors.
  6007.  
  6008.  
  6009. ┌─────────────────────────────────────────────────────────────────────────────┐
  6010. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 127 │
  6011. └─────────────────────────────────────────────────────────────────────────────┘
  6012.  
  6013.  
  6014.  
  6015. Version 2.20 - More improvments, including:
  6016.                       ■ Fixing of some minor bugs, such as incorrect handling
  6017.                         of the path to DORINFO1.DEF/EXITINFO.BBS files.
  6018.  
  6019.                       ■ Added support for more customability, such as hooks
  6020.                         for functions that will be called before and after
  6021.                         Shell to DOS and sysop chat.
  6022.  
  6023.                       ■ OpenDoors is now DesqView aware. OpenDoors will
  6024.                         automatically detect the presence of DesqView, and
  6025.                         uses the DesqView `virtual screen buffer' for screen
  6026.                         display if present.
  6027.  
  6028.                       ■ A QuickBBS 2.75 compatibility problem has also been
  6029.                         fixed.
  6030.  
  6031.  
  6032. Version 2.30 - Fixed a small bug in the registration system.
  6033.  
  6034.  
  6035. Version 3.00 - A MAJOR upgrade, released as a beta-test version,
  6036.                including the following additions/changes:
  6037.                       ■ Debuged, Debuged and debuged some more!
  6038.  
  6039.                       ■ Added support for door information files from:
  6040.                         WWIV, PC-Board, Spitfire, WildCat, GAP, TriTel
  6041.                         and others.
  6042.  
  6043.                       ■ Added .ASC/.ANS/.AVT file display support with
  6044.                         automatic interpretation of QBBS/SuperBBS/RA
  6045.                         control characters.
  6046.  
  6047.                       ■ Added ALT-D key to drop the user back to the BBS
  6048.                         without hanging up.
  6049.                       
  6050.                       ■ Added direct access to RA style configuration,
  6051.                         file area, message area, external protocols,
  6052.                         event configuration, caller history, users
  6053.                         online, menu files, user base and other system
  6054.                         files.
  6055.  
  6056.  
  6057. ┌─────────────────────────────────────────────────────────────────────────────┐
  6058. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 128 │
  6059. └─────────────────────────────────────────────────────────────────────────────┘
  6060.  
  6061.  
  6062.  
  6063.                       ■ Added complete set of message base manipulation
  6064.                         routines, with full support for the RA 1.01
  6065.                         message base locking scheme.
  6066.  
  6067.                       ■ The user manual has also been re-worked to
  6068.                         (hopefully) make it easier to work with.
  6069.  
  6070.  
  6071. Version 3.10 - The following bug fixes and changes have been made since
  6072.                since the release of version 3.00:
  6073.                       ■ Time fields in messages are now correctly
  6074.                         formatted
  6075.  
  6076.                       ■ Corrected a bug in the od_set_attrib function
  6077.                         where the intensity setting would not correctly
  6078.                         be transmitted to the remote when using ANSI
  6079.                         graphics.
  6080.  
  6081.                       ■ Fixed a bug in the re-writing of the
  6082.                         DORINFO1.DEF which cause sysop and user's last
  6083.                         names to be corrupted.
  6084.  
  6085.                       ■ Registered users may now disable the display of
  6086.                         copyright and registration information when the
  6087.                         door starts up.
  6088.  
  6089.  
  6090. Version 3.20 - A few more changes and bug fixes were made since version
  6091.                3.10:
  6092.                       ■ Fixed the FILES.BBS lister to correctly support
  6093.                         FILES.BBS files located in directories other than
  6094.                         the default dir, and added page pausing to the
  6095.                         FILES.BBS lister.
  6096.  
  6097.  
  6098. Version 3.30 - The following changes and bug fixes were made since
  6099.                version 3.20:
  6100.                       ■ OpenDoors no longer re-writes the DORINFO1.DEF
  6101.                         upon exiting. No BBS's are known to actually
  6102.                         make use of the information changed in
  6103.                         DORINFO1.DEF, and re-writing this file was
  6104.                         causing more troubles than it was worth.
  6105.  
  6106.                       ■ The od_msg_read_hdr() function's NEXT_MESSAGE
  6107.                         command now works correctly.
  6108.  
  6109.                       ■ Added an od_errno variable to assist in
  6110.                         debugging of programs written with the BBS file
  6111.                         engine portion of OpenDoors.
  6112.  
  6113. ┌─────────────────────────────────────────────────────────────────────────────┐
  6114. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 129 │
  6115. └─────────────────────────────────────────────────────────────────────────────┘
  6116.  
  6117.  
  6118.  
  6119. Version 3.40 - A minor upgrade version, with the following changes:
  6120.                       ■ Fixed a compatibility problem with locked baud
  6121.                         rates. Now, if OpenDoors receives a baud rate
  6122.                         the door information file that is not supported
  6123.                         in the FOSSIL definitions, it will continue
  6124.                         without setting the baud rate. (Whereas before,
  6125.                         OpenDoors would report an error and exit.)
  6126.  
  6127.                       ■ Made some changes to the manual, and included a
  6128.                         utility to remove the extended-ASCII characters
  6129.                         from the manual to ease printing on some printers.
  6130.  
  6131. ┌─────────────────────────────────────────────────────────────────────────────┐
  6132. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 130 │
  6133. └─────────────────────────────────────────────────────────────────────────────┘
  6134.  
  6135.  
  6136.  
  6137. ┌─ CLOSING WORDS ─┐
  6138. └─────────────────┘
  6139.               While OpenDoors by no means handles every aspect of door
  6140.        and BBS utility programming, I'm sure you'll find that it will
  6141.        allow you to get into programming your own doors and utilities
  6142.        easier than ever before! As you have seen, OpenDoors handles
  6143.        everything for you, and (in my honest opinion), does a lot better
  6144.        job than many other similar products (most of which cost $50,
  6145.        $75, or even more). But, what you see here is by no means the
  6146.        final version of OpenDoors! We're constantly building on it, and
  6147.        I can guarantee you what you see in the next release will be even
  6148.        more impressive than this! Do keep in mind, though, that we will
  6149.        be upping the price for future versions, so now is the time to
  6150.        register! Here are some of the things we have up planned for
  6151.        future releases:
  6152.  
  6153.                    ■ A Windows version of OpenDoors, which will permit
  6154.                      easier creation of doors for windows-specific
  6155.                      BBS systems, such as Apex. Of course, all registered
  6156.                      users of the DOS version of OpenDoors will also be
  6157.                      registered for the Windows version.
  6158.                    ■ Addition of some of the new Remote Access features,
  6159.                      such as sysop page overriding, etc.
  6160.                    ■ Direct interfacing with many more BBS
  6161.                      formats for configuration & message files.
  6162.                    ■ Built in file-transfer protocols.
  6163.                    ■ Support for other BBS systems.
  6164.                    ■ Stomp any of the bugs that may still exist. This
  6165.                      product has already been very extesively tested,
  6166.                      but there are always things we don't know about.
  6167.                    ■ Lots and lots more!
  6168.  
  6169.  
  6170.  
  6171. ┌─────────────────────────────────────────────────────────────────────────────┐
  6172. │ OpenDoors Programmer's Manual ──────────────────────────────────── Page 131 │
  6173. └─────────────────────────────────────────────────────────────────────────────┘
  6174.  
  6175.  
  6176.  
  6177.                 However, what exactly the new version looks like will
  6178.        depend a lot on what people want. If you have any questions,
  6179.        comments, or suggestions, please feel more to free to contact me
  6180.        at 1:243/1.8 in FidoNet. Also, if there are any BBS systems or
  6181.        file formats that you would like to see supported in future
  6182.        versions, for which you have the technical specifications, send
  6183.        them along and I'll see what I can do! If you are having
  6184.        difficulty getting in touch with me, feel free to contact Jake
  6185.        Wadland on his BBS at 1-705-749-6110 (1:229/326 in FidoNet).
  6186.  
  6187.                 I would also like to take this chance to thank everyone
  6188.        who has registered OpenDoors, given me encouragment to continue
  6189.        developing this package, and everyone who has helped with
  6190.        suggestions and bug-reports. Special thanks to all users who have
  6191.        made suggestions and to Robert La Ferte for his help in beta
  6192.        testing, and putting up with me!
  6193.  
  6194.                 Thank-you, and don't forget to register your copy of
  6195.        OpenDoors today!
  6196.  
  6197.