home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / dfÜ / bbs / tempdemo / docs / tdocs-programmers < prev    next >
Encoding:
Text File  |  1996-02-01  |  69.4 KB  |  2,358 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  __________________________________________________________________________
  13.  __________________________________________________________________________
  14.  __________________________________________________________________________
  15.  
  16.          ___________      B B S    S O F T W A R E      ___________
  17.         /          /\_____ _______  _____________ _____/\          \
  18.        /__________/ /    //      /\/      /\     \\    \ \__________\
  19.        \ ___  ____\/    //      / /      /  \     \\    \/____  ___ /
  20.         V   \ \  /_____//______/ /______/    \_____\\_____\  / /   V
  21.         :    \ \ \  ___\\      \ \  ___ \    / ____// ____/ / /    .
  22.         .     \ \ \ \___ \ \  \ \ \ \__\ \  / /_\  / /___  / /     .
  23.                \ \ \  __\ \ \__\ \ \  ___/ / __/ \/___  / / /
  24.                 \ \ \ \____\ \  \ \ \ \   / /___\____/ / / /
  25.                  \_\/\_____\\_\/ \_\/\_\_/_____//_____/\/_/
  26.                    V       V  V    V   V V      V       V
  27.                    |       .  :    .   . |      :       .
  28.                    .          .    :     :      .       .
  29.  
  30.          /T\empest BBS v3.40 Programmers Documentation (c) 1993-96
  31.  
  32.                       (Revision Date: Janurary, 1996)
  33.  
  34.                             Author: Michael Bockert
  35.                      Documentation: Michael Bockert
  36.  
  37.  __________________________________________________________________________
  38.  __________________________________________________________________________
  39.  __________________________________________________________________________
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  __________________________________________________________________________
  62.  __________________________________________________________________________
  63.  __________________________________________________________________________
  64.  
  65.                               C O N T E N T S
  66.  __________________________________________________________________________
  67.  
  68.  CHAPTER I - Server Information
  69.  
  70.  1-1  Server Msg Port Commands
  71.  
  72.  __________________________________________________________________________
  73.  
  74.  CHAPTER II - Door Code.
  75.  
  76.  2-1  Tempest "C" Door Code
  77.  2-2  Arexx Door Interface Code
  78.  
  79.  __________________________________________________________________________
  80.  
  81.  __________________________________________________________________________
  82.  __________________________________________________________________________
  83.  __________________________________________________________________________
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  __________________________________________________________________________
  91.  __________________________________________________________________________
  92.  __________________________________________________________________________
  93.  
  94.                       CHAPTER I - Server Information.
  95.  __________________________________________________________________________
  96.  __________________________________________________________________________
  97.  __________________________________________________________________________
  98.  
  99.  
  100.  struct TempMessage // New Tempest Server Structure.
  101.  {
  102.   struct Message Msg;
  103.   UWORD  command;     // 2 bytes
  104.   UWORD  node;        // 2 bytes
  105.  
  106.   WORD   word1;       // 2 byte variables.
  107.   WORD   word2;
  108.   WORD   word3;
  109.  
  110.   LONG   long1;       // 4 byte variables.
  111.   LONG   long2;
  112.   LONG   long3;
  113.  
  114.   ULONG  ulong1;      // 4 byte unsigned.
  115.   ULONG  ulong2;
  116.   ULONG  ulong3;
  117.  
  118.   char string[200];   // string for passing strings.
  119.   char extra[200];    // Extra space for future variables.
  120.  };
  121.  
  122.  
  123.  
  124.  1-1  Server Msg Port Commands
  125.  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  126.  
  127.     1-1.1  Iconify Toggle (1)
  128.     ~~~~~~~~~~~~~~~~~~~~~~~~~
  129.     Iconifies/Un-Iconifies a node.
  130.  
  131.  
  132.     1-1.2  Shut Down Node Immediately (2)
  133.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  134.     Shut down a node immeidately. Kicks users offline and shuts down as
  135.     quickly as possible.
  136.  
  137.  
  138.     1-1.3  Reserved
  139.     ~~~~~~~~~~~~~~~
  140.     1-1.4  Reserved
  141.     ~~~~~~~~~~~~~~~
  142.     1-1.5  Reserved
  143.     ~~~~~~~~~~~~~~~
  144.     1-1.6  Reserved
  145.     ~~~~~~~~~~~~~~~
  146.  
  147.     1-1.7  Kick User Offline (7)
  148.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149.     Kicks the current user off the bbs.  If the user is in a transfer, it is
  150.     auto aborted and the user is then kicked off.
  151.  
  152.  
  153.     1-1.8  Abort User's Transfer (8)
  154.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  155.     Aborts user's current file transfer.
  156.  
  157.  
  158.     1-1.9  Toggle Sysop Available Flag (9)
  159.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  160.     This toggles the Sysop Available flag.  Whether sysop is accepting sysop
  161.     pages or not.
  162.  
  163.  
  164.     1-1.10  Set Task Priority (10)
  165.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  166.     Change Task priority of node.
  167.     NOTE:  All nodes should be set to the same priority always.
  168.  
  169.     TempMsg->word1 is used to pass the value to set the priority to.
  170.  
  171.  
  172.     1-1.11  Node/Window to Front (11)
  173.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  174.     Brings the node window to the front.
  175.  
  176.  
  177.     1-1.12  Toggle Capture Log On/Off (12)
  178.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  179.     Turns capture on/off.
  180.  
  181.  
  182.     1-1.13  Reserve Caller By Slot Number (13)
  183.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  184.     Send the user slot number through TempMsg->word1 and it reserves the node
  185.     for that user.
  186.  
  187.  
  188.     1-1.14  Reserve Caller By User Handle (14)
  189.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  190.     Send the user handle through TempMsg->string and it reserves the node
  191.     for that user.
  192.  
  193.  
  194.     1-1.15  Reserved
  195.     ~~~~~~~~~~~~~~~~
  196.     1-1.16  Reserved
  197.     ~~~~~~~~~~~~~~~~
  198.     1-1.17  Reserved
  199.     ~~~~~~~~~~~~~~~~
  200.     1-1.18  Reserved
  201.     ~~~~~~~~~~~~~~~~
  202.     1-1.19  Reserved
  203.     ~~~~~~~~~~~~~~~~
  204.  
  205.     1-1.20  Re-Load BBS Data into node (20)
  206.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  207.     This will reload all data files into node to update any changes.
  208.  
  209.  
  210.     1-1.21  Toggle Temporary Sysop Access (21)
  211.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  212.     This toggles Temporary sysop access on/off.
  213.  
  214.  
  215.     1-1.22  Open New Shell (22)
  216.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  217.     Opens new cli.
  218.  
  219.  
  220.     1-1.23  Busy Modem (23)
  221.     ~~~~~~~~~~~~~~~~~~~~~~~
  222.     Sends modem busy string, only works when no caller is online.
  223.  
  224.  
  225.     1-1.24  Reset Modem (24)
  226.     ~~~~~~~~~~~~~~~~~~~~~~~~
  227.     Sends modem reset string, only works when no caller is online.
  228.  
  229.  
  230.     1-1.25  Open Modem String (25)
  231.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  232.     Sends modem open string, only works when no caller is online.
  233.  
  234.  
  235.     1-1.26  On Hook Modem String (26)
  236.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  237.     Sends modem On Hook string, only works when no caller is online.
  238.  
  239.  
  240.     1-1.27  Hang Up Modem String (27)
  241.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  242.     Sends modem hang up string, only works when a user IS online.
  243.  
  244.  
  245.     1-1.28  Answer Modem String (28)
  246.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  247.     Sends modem answer string, only works when no caller is online.
  248.  
  249.  
  250.  
  251.     1-1.30  Sysop Login (30)
  252.     ~~~~~~~~~~~~~~~~~~~~~~~~
  253.     Sysop Login to bbs.  Only works when nobody is on the node.
  254.  
  255.  
  256.     1-1.31  Local Login (31)
  257.     ~~~~~~~~~~~~~~~~~~~~~~~~
  258.     Local Login as a user.  Only works when nobody is on the node.
  259.  
  260.  
  261.     1-1.32  Instant Login (32)
  262.     ~~~~~~~~~~~~~~~~~~~~~~~~~~
  263.     Instant Login, connects user from voice to the bbs.
  264.  
  265.  
  266.     1-1.33  Chat User (33)
  267.     ~~~~~~~~~~~~~~~~~~~~~~
  268.     This allows you to enter chat with a user.  If the node is iconified,
  269.     then it will un-iconify and bring the window to the front and jump
  270.     into chat with the user.
  271.  
  272.  
  273.     1-1.34  Edit Online User's Account (34)
  274.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  275.     This will un-iconify a node and/or bring it to the front and will pause
  276.     the user's activity and bring up the account editor for the user's
  277.     account.
  278.  
  279.  
  280.     1-1.35  Add Time To User Online (35)
  281.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  282.     Adds minutes of time to user online.
  283.     Value set with (TempMsg->word1).
  284.  
  285.  
  286.     1-1.36  Take Time From User Online (36)
  287.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  288.     Removes minutes of time from the user online.
  289.     Value set with (TempMsg->word1).
  290.  
  291.  
  292.     1-1.37  Execute Load Terminal Script (37)
  293.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  294.     Tells the node to close the serial and execute the term script for that
  295.     node.
  296.  
  297.  
  298.     1-1.50  Print Text (50)
  299.     ~~~~~~~~~~~~~~~~~~~~~~~
  300.     Print text contained in TempMsg->string.  This text will be sent to a node
  301.     and printed to the user.
  302.  
  303.  
  304.     If you have an idea for a new one, let me know.
  305.  
  306.  
  307.  
  308.  __________________________________________________________________________
  309.  __________________________________________________________________________
  310.  __________________________________________________________________________
  311.  
  312.                      CHAPTER II - Door Code
  313.  __________________________________________________________________________
  314.  __________________________________________________________________________
  315.  __________________________________________________________________________
  316.  
  317.  
  318.  2.1  Tempest "C" Door Code
  319.  ~~~~~~~~~~~~~~~~~~~~~~~~~~
  320.  Example routines of the following commands are included in external files
  321.  along with an example door shell.
  322.  
  323.  
  324.  ** NOTE: When coding Tempest doors the User, NodeData, SystemData, and
  325.           Today structures are passed to all doors automatically as pointers
  326.           to the real structures in memory.  This gives you direct access
  327.           to the user online and other structures
  328.  
  329.     Tempest List of Door Commands:
  330.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  331.     DOOR START ROUTINE
  332.     DOOR I/O ROUTINE
  333.     DOOR COMMAND 999: Close Door
  334.  
  335.     DOOR COMMAND   1: pl (Print Line)
  336.     DOOR COMMAND   2: ConPutStr
  337.     DOOR COMMAND   3: SerPutStr
  338.     DOOR COMMAND   4: SendChar
  339.     DOOR COMMAND   5: ConPutChar
  340.     DOOR COMMAND   6: SerPutChar
  341.     DOOR COMMAND  10: CTRLC
  342.     DOOR COMMAND  15: CheckKey
  343.     DOOR COMMAND  16: HotKey
  344.     DOOR COMMAND  17: Cursor Detect Hotkey
  345.     DOOR COMMAND  20: Input String
  346.     DOOR COMMAND  21: Input String (Ansi Bar Background)
  347.     DOOR COMMAND  22: Line Input String
  348.     DOOR COMMAND  23: Lint Input String (Ansi Bar Background)
  349.     DOOR COMMAND  24: Line Input String (Hidden)
  350.     DOOR COMMAND  25: Lint Input String (Hidden) (Ansi Bar Background)
  351.     DOOR COMMAND  30: Get BBS Paths
  352.     DOOR COMMAND  31: Get User Time
  353.     DOOR COMMAND  33: Get String
  354.     DOOR COMMAND  34: Get Value
  355.     DOOR COMMAND  41: Alter Time
  356.     DOOR COMMAND  43: Set Value
  357.     DOOR COMMAND  44: Activity
  358.     DOOR COMMAND  50: Select Transfer Protocol
  359.     DOOR COMMAND  51: Mark/Flag file for download
  360.     DOOR COMMAND  52: Zmodem Download
  361.     DOOR COMMAND  53: Zmodem Upload
  362.     DOOR COMMAND  54: Hydra Download
  363.     DOOR COMMAND  60: Callers Log Entry
  364.     DOOR COMMAND  61: Sysop Activity Log Entry
  365.     DOOR COMMAND  62: DeBug Log Entry
  366.     DOOR COMMAND  63: User Log Entry
  367.     DOOR COMMAND  69: Write File
  368.     DOOR COMMAND  70: Show File
  369.     DOOR COMMAND  71: Pause
  370.     DOOR COMMAND  72: More (Y/N/NS) Prompt
  371.     DOOR COMMAND  73: MSG Editor
  372.     DOOR COMMAND  74: Re-Load Data Files to Memory
  373.     DOOR COMMAND  75: Get a Random Number
  374.     DOOR COMMAND  76: Copy a File
  375.     DOOR COMMAND  77: Move a File
  376.     DOOR COMMAND  78: Get File Size
  377.     DOOR COMMAND  79: WildCard String Compare
  378.     DOOR COMMAND  80: Strip Color Ansi Codes
  379.     DOOR COMMAND  81: Strip All Ansi Codes
  380.     DOOR COMMAND  82: Find Assignment
  381.     DOOR COMMAND  90: Post Message
  382.     DOOR COMMAND  91: Join Conference
  383.     DOOR COMMAND 100: Load User Account
  384.     DOOR COMMAND 101: Save User Account
  385.     DOOR COMMAND 103: Find User Slot Number
  386.     DOOR COMMAND 110: Load Catalog Entry
  387.     DOOR COMMAND 111: Save Catalog Entry
  388.  
  389.     _______________________________________________________________________
  390.  
  391.  
  392.     DOOR START ROUTINE
  393.     ~~~~~~~~~~~~~~~~~~
  394.     This routine is to be your very first call in the door program.  It is
  395.     mandatory or the bbs will lock up!  This routine makes sure the BBS was
  396.     run from Tempest and not the cli.  The Node Number is passed by the bbs
  397.     so we know what port to open up.
  398.  
  399.     if x equal to 0, then door was run from cli and will exit.
  400.  
  401.  
  402.     int DoorStart(TEXT *node)
  403.      {
  404.       struct MsgPort *HisPort;
  405.       send.carrier=0;
  406.       sprintf(st,"%s:TEMPEST_DOOR",node);
  407.       HisPort = FindPort(st);
  408.       if(HisPort==NULL) return (FALSE);
  409.       sprintf(MyName,"%s:DOOR_PORT",node);
  410.       MyPort = CreatePort(MyName,0L);
  411.       if(MyPort==NULL)
  412.        {
  413.         PutStr("Can't open port");
  414.         return(int)FALSE;
  415.        }
  416.       DOORIO();
  417.       User=*&send.User;
  418.       return (int)TRUE;
  419.      }
  420.     _______________________________________________________________________
  421.  
  422.  
  423.     DOOR I/O ROUTINE
  424.     ~~~~~~~~~~~~~~~~
  425.     This command will pass data to and from the door and BBS.
  426.     Every door is required to use this routine.
  427.  
  428.  
  429.     int DOORIO(void)
  430.     {
  431.      struct MsgPort *HisPort;
  432.      if(send.carrier) return(0);
  433.      HisPort = FindPort(st);
  434.      if(HisPort!=NULL)
  435.       {
  436.        send.Msg.mn_Node.ln_Type = NT_MESSAGE;
  437.        send.Msg.mn_Length = sizeof(send);
  438.        send.Msg.mn_ReplyPort = MyPort;
  439.        send.carrier=0;
  440.        PutMsg((struct MsgPort *)HisPort,(struct Message *)&send);
  441.        Wait(1 << MyPort->mp_SigBit);
  442.        GetMsg(MyPort);
  443.        if(send.carrier) CloseStuff();
  444.        return(1);
  445.       }
  446.      return(0);
  447.     }
  448.     _______________________________________________________________________
  449.  
  450.  
  451.     DOOR COMMAND 999: Close Door
  452.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  453.     This command will close/shut down the door and return to the BBS.
  454.     Every door is required to use this command.
  455.  
  456.     send.Command = 999
  457.  
  458.  
  459.     void CloseStuff(void)
  460.     {
  461.      send.Command=999;
  462.      DOORIO();
  463.      while(msg=(struct MyMessage *)GetMsg(MyPort))
  464.            ReplyMsg((struct Message *)msg);
  465.      if(MyPort) DeletePort(MyPort);
  466.      exit(0);
  467.     }
  468.     _______________________________________________________________________
  469.  
  470.  
  471.     DOOR COMMAND 1: pl (Print Line)
  472.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  473.     This command sends a string to both the console and the serial output.
  474.  
  475.     send.Command= 1
  476.     send.text1  = Pointer to the passed string
  477.  
  478.  
  479.     VOID pl(TEXT *string)
  480.     {
  481.      send.Command=1;
  482.      send.text1=string;
  483.      DOORIO();
  484.     }
  485.     _______________________________________________________________________
  486.  
  487.  
  488.     DOOR COMMAND 2: ConPutStr
  489.     ~~~~~~~~~~~~~~~~~~~~~~~~~
  490.     This command sends a string to the console output.
  491.  
  492.     send.Command= 2
  493.     send.text1  = Pointer to the passed string
  494.  
  495.  
  496.     VOID ConPutStr(TEXT *string)
  497.     {
  498.      send.Command=2;
  499.      send.text1=string;
  500.      DOORIO();
  501.     }
  502.     _______________________________________________________________________
  503.  
  504.  
  505.     DOOR COMMAND 3: SerPutStr
  506.     ~~~~~~~~~~~~~~~~~~~~~~~~~
  507.     This command sends a string to the serial output.
  508.  
  509.     send.Command= 3
  510.     send.text1  = Pointer to the passed string
  511.  
  512.  
  513.     VOID SerPutStr(TEXT *string)
  514.     {
  515.      send.Command=3;
  516.      send.text1=string;
  517.      DOORIO();
  518.     }
  519.     _______________________________________________________________________
  520.  
  521.  
  522.     DOOR COMMAND 4: SendChar
  523.     ~~~~~~~~~~~~~~~~~~~~~~~~
  524.     This command sends a single character to both the console and the serial
  525.     output.
  526.  
  527.     send.Command= 4
  528.     send.text1  = Pointer to the passed string
  529.  
  530.  
  531.     VOID SendChar(TEXT *string)
  532.     {
  533.      send.Command=4;
  534.      send.text1=string;
  535.      DOORIO();
  536.     }
  537.     _______________________________________________________________________
  538.  
  539.  
  540.     DOOR COMMAND 5: ConPutChar
  541.     ~~~~~~~~~~~~~~~~~~~~~~~~~~
  542.     This command sends a single character to the console output.
  543.  
  544.     send.Command= 5
  545.     send.text1  = Pointer to the passed string
  546.  
  547.  
  548.     VOID ConPutChar(TEXT *string)
  549.     {
  550.      send.Command=5;
  551.      send.text1=string;
  552.      DOORIO();
  553.     }
  554.     _______________________________________________________________________
  555.  
  556.  
  557.     DOOR COMMAND 6: SerPutChar
  558.     ~~~~~~~~~~~~~~~~~~~~~~~~~~
  559.     This command sends a single character to the serial output.
  560.  
  561.     send.Command= 6
  562.     send.text1  = Pointer to the passed string
  563.  
  564.  
  565.     VOID SerPutChar(TEXT *string)
  566.     {
  567.      send.Command=6;
  568.      send.text1=string;
  569.      DOORIO();
  570.     }
  571.     _______________________________________________________________________
  572.  
  573.  
  574.     DOOR COMMAND 7: tildepl (Print Line with Tilde Code Support)
  575.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  576.     This command sends a string to both the console and the serial output.
  577.     Also detects tilde codes and interpruts them.
  578.  
  579.     send.Command= 7
  580.     send.text1  = Pointer to the passed string
  581.                   (Must be large enough to handle inserted text from tilde
  582.                    codes)
  583.  
  584.  
  585.     VOID tildepl(TEXT *string)
  586.     {
  587.      send.Command=7;
  588.      send.text1=string;
  589.      DOORIO();
  590.     }
  591.     _______________________________________________________________________
  592.  
  593.  
  594.     DOOR COMMAND 10: CTRLC
  595.     ~~~~~~~~~~~~~~~~~~~~~~
  596.     This command checks to see if a CTRL-C Abort key was pressed.
  597.  
  598.     send.Command= 10
  599.  
  600.     returns value to send.Value1 (0=No abort key detected, 1= Yes)
  601.  
  602.     int CTRLC(VOID)
  603.     {
  604.      send.Command=10;
  605.      DOORIO();
  606.      return(send.Value1);
  607.     }
  608.     _______________________________________________________________________
  609.  
  610.  
  611.     DOOR COMMAND 15: CheckKey
  612.     ~~~~~~~~~~~~~~~~~~~~~~~~~~
  613.     This command checks to see if a key has been pressed, and if so returns
  614.     the key that was pressed, if no key was detected, it continues on
  615.     without waiting.
  616.  
  617.     send.Command= 15
  618.     send.Value2 = set to zero to initalize it.
  619.  
  620.     returns to send.Value2 the value of the key pressed.
  621.  
  622.     int CheckKey(VOID)
  623.     {
  624.      send.Command=15;
  625.      send.Value2=0;
  626.      DOORIO();
  627.      return(send.Value2);
  628.     }
  629.     _______________________________________________________________________
  630.  
  631.  
  632.     DOOR COMMAND 16: HotKey
  633.     ~~~~~~~~~~~~~~~~~~~~~~~
  634.     This command waits for a key to be pressed and is a hotkey, does not
  635.     wait for the user to hit return.
  636.  
  637.     send.Command= 6
  638.     send.text1  = Pointer to the passed string
  639.  
  640.     returns the character that was entered to the first position of the
  641.     passed string.
  642.  
  643.  
  644.     int hotkey(TEXT *character)
  645.     {
  646.      send.Command=16;
  647.      send.text1=character;
  648.      DOORIO();
  649.      return((int)character[0]);
  650.     }
  651.     _______________________________________________________________________
  652.  
  653.  
  654.     DOOR COMMAND 17: Cursor Detect Hotkey
  655.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  656.     This command is the same as the hotkey routine, except that it allows
  657.     you to detect the cursor keys as input.
  658.  
  659.     send.Command= 17
  660.  
  661.     returns an int value, which is the number value of the character entered
  662.     as send.Value1.
  663.  
  664.     If the user entered a cursor key, then the returning value will be as
  665.     follows for cursor keys:
  666.  
  667.              UP ARROW = 300
  668.        SHIFT UP ARROW = 301
  669.            DOWN ARROW = 400
  670.      SHIFT DOWN ARROW = 401
  671.            LEFT ARROW = 500
  672.      SHIFT LEFT ARROW = 501
  673.           RIGHT ARROW = 600
  674.     SHIFT RIGHT ARROW = 601
  675.  
  676.     Use those 8 values to detect cursor keys.  If they enter any other key
  677.     then it will be the normal 0-255 value of all ascii characters.
  678.  
  679.  
  680.     int CursorHotKey(VOID)
  681.     {
  682.      send.Command=17;
  683.      DOORIO();
  684.      return(send.Value1);
  685.     }
  686.  
  687.  
  688.     EXAMPLE CALL ROUTINE:
  689.     ====================
  690.  
  691.     int  cursor
  692.     char string[50];
  693.  
  694.     cursor=CursorHotKey();
  695.     if(cursor>255)
  696.      {
  697.       switch(cursor)
  698.        {
  699.         case 300: // UP ARROW
  700.         case 301: // SHIFT UP ARROW
  701.         case 400: // DOWN ARROW
  702.         case 401: // SHIFT DOWN ARROW
  703.         case 500: // LEFT ARROW
  704.         case 501: // SHIFT LEFT ARROW
  705.         case 600: // RIGHT ARROW
  706.         case 601: // SHIFT RIGHT ARROW
  707.        }
  708.      }
  709.     if(cursor<256) string[0]=(char)cursor; // Normal character entered!
  710.     string[1]=NULL;
  711.     _______________________________________________________________________
  712.  
  713.  
  714.     DOOR COMMAND 20: Input String
  715.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  716.     This command will allow you to enter a string of input.
  717.  
  718.     send.Command= 20
  719.     send.Value1 = Length Limit of input
  720.     send.text1  = pointer to the passed string.
  721.  
  722.     returns string input to send.text1
  723.  
  724.  
  725.     VOID input(TEXT *mstring,int len)
  726.     {
  727.      send.Command=20;
  728.      send.Value1=len;
  729.      send.text1 =mstring;
  730.      DOORIO();
  731.     }
  732.     _______________________________________________________________________
  733.  
  734.  
  735.     DOOR COMMAND 21: Input String (Ansi Bar Background)
  736.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  737.     This command is the same as the input routine except that there is an
  738.     ansi background showing the full limit of the string input.
  739.  
  740.     send.Command= 21
  741.     send.Value1 = Length Limit of input
  742.     send.text1  = Pointer to the passed string
  743.  
  744.  
  745.     VOID inputAB(TEXT *mstring,int len)
  746.     {
  747.      send.Command=21;
  748.      send.Value1=len;
  749.      send.text1 =mstring;
  750.      DOORIO();
  751.     }
  752.     _______________________________________________________________________
  753.  
  754.  
  755.     DOOR COMMAND 22: Line Input String
  756.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  757.     This command will allow you to enter a string of input and start with a
  758.     beginning string for editing.
  759.  
  760.     send.Command= 22
  761.     send.Value1 = Length Limit of input
  762.     send.text1  = pointer to New String passed, where the new input will end
  763.                   up.
  764.     send.text2  = pointer to Old String passed, this string will be displayed
  765.                   has starting input.
  766.  
  767.     returns string input to send.text1
  768.  
  769.  
  770.     VOID LineInput(TEXT *oldstring,TEXT *newstring,int len)
  771.     {
  772.      send.Command=22;
  773.      send.Value1=len;
  774.      send.text1=newstring;
  775.      send.text2=oldstring;
  776.      DOORIO();
  777.     }
  778.     _______________________________________________________________________
  779.  
  780.  
  781.     DOOR COMMAND 23: Lint Input String (Ansi Bar Background)
  782.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  783.     This command is the same as the line input routine except that there is
  784.     an ansi background showing the full limit of the string input.
  785.  
  786.     send.Command= 23
  787.     send.Value1 = Length Limit of input
  788.     send.text1  = pointer to New String passed, where the new input will end
  789.                   up.
  790.     send.text2  = pointer to Old String passed, this string will be displayed
  791.                   has starting input.
  792.  
  793.     returns string input to send.text1
  794.  
  795.  
  796.     VOID LineInputAB(TEXT *oldstring,TEXT *newstring,int len)
  797.     {
  798.      send.Command=23;
  799.      send.Value1=len;
  800.      send.text1=newstring;
  801.      send.text2=oldstring;
  802.      DOORIO();
  803.     }
  804.     _______________________________________________________________________
  805.  
  806.  
  807.     DOOR COMMAND 24: Line Input String (Hidden)
  808.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  809.     This command will allow you to enter a string of input and start with a
  810.     beginning string for editing but all text will be echoed to the screen
  811.     as just periods, hiding what is really being entered.
  812.  
  813.     send.Command= 24
  814.     send.Value1 = Length Limit of input
  815.     send.text1  = pointer to New String passed, where the new input will end
  816.                   up.
  817.     send.text2  = pointer to Old String passed, this string will be displayed
  818.                   has starting input.
  819.  
  820.     returns string input to send.text1
  821.  
  822.  
  823.     VOID LineInputHide(TEXT *oldstring,TEXT *newstring,int len)
  824.     {
  825.      send.Command=24;
  826.      send.Value1=len;
  827.      send.text1=newstring;
  828.      send.text2=oldstring;
  829.      DOORIO();
  830.     }
  831.     _______________________________________________________________________
  832.  
  833.  
  834.     DOOR COMMAND 25: Lint Input String (Hidden) (Ansi Bar Background)
  835.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  836.     This command is the same as the line input hidden routine except that
  837.     there is an ansi background showing the full limit of the string input.
  838.  
  839.     send.Command= 25
  840.     send.Value1 = Length Limit of input
  841.     send.text1  = pointer to New String passed, where the new input will end
  842.                   up.
  843.     send.text2  = pointer to Old String passed, this string will be displayed
  844.                   has starting input.
  845.  
  846.     returns string input to send.text1
  847.  
  848.  
  849.     VOID LineInputHideAB(TEXT *oldstring,TEXT *newstring,int len)
  850.     {
  851.      send.Command=25;
  852.      send.Value1=len;
  853.      send.text1=newstring;
  854.      send.text2=oldstring;
  855.      DOORIO();
  856.     }
  857.     _______________________________________________________________________
  858.  
  859.  
  860.     DOOR COMMAND 30: Get BBS Paths
  861.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  862.     This command will return the one of the bbs paths.
  863.  
  864.     send.Command= 30
  865.     send.Value1 = Which path to return.
  866.     send.text1  = pointer to the string passed that will store the path.
  867.  
  868.     [Value] : [Path Returned]
  869.             :
  870.        0    : Main BBS Path.
  871.        1    : Path of Main Tempest files & Accounts.Data file.
  872.        2    : Path of Account Info directory where Applications &
  873.               FlaggedFiles directories are stored.
  874.        3    : Path where Bad Archives uploaded are stored.
  875.        4    : Path where Catalog files (File Listings) are stored.
  876.        5    : Path of Describe directory.
  877.        6    : Path where doors are stored.
  878.        7    : Path where Extended Description files are stored.
  879.        8    : Path where all bbs logs are stored.
  880.        9    : Path where modules are stored.
  881.       10    : Path where resumealbe files are stored.
  882.       11    : Path of Optional Directory.
  883.       12    : Path of Scripts Directory.
  884.       13    : Path of Setup Directory.
  885.       14    : Path of sysop hold directory.
  886.       15    : Path of Text file direcotry.
  887.       16    : Path of Voting Booth files.
  888.       17    : Path of current node's upload work directory.
  889.  
  890.  
  891.     returns the desired bbs path to send.text1
  892.  
  893.  
  894.     VOID GetPaths(TEXT *s,int opt)
  895.     {
  896.      send.Command=30;
  897.      send.Value1=opt;
  898.      strcpy(s,"");
  899.      send.text1=s;
  900.      DOORIO();
  901.     }
  902.     _______________________________________________________________________
  903.  
  904.  
  905.     DOOR COMMAND 31: Get User Time
  906.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  907.     This command will return the current online user's time remaining.
  908.  
  909.     send.Command= 31
  910.     send.text1  = pointer to the string passed that will store the time.
  911.  
  912.     returns time remaining of user online into send.text1.
  913.  
  914.  
  915.     VOID GetUserTime(TEXT *s)
  916.     {
  917.      send.Command=31;
  918.      send.text1=s;
  919.      DOORIO();
  920.     }
  921.     _______________________________________________________________________
  922.  
  923.  
  924.     DOOR COMMAND 33: Get String
  925.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  926.     This command will return a string from the ~ Tilde list.
  927.  
  928.     send.Command= 33
  929.     send.Value1 = which string to return.
  930.     send.text1  = pointer to the string passed that will store the desired
  931.                   string.
  932.  
  933.     returns desired string into send.text1.
  934.  
  935.  
  936.     VOID GetStr(TEXT *s,int opt)
  937.     {
  938.      send.Command=33;
  939.      send.Value1=opt;
  940.      strcpy(s,"");
  941.      send.text1=s;
  942.      DOORIO();
  943.     }
  944.  
  945.     _______________________________________________________________________
  946.  
  947.  
  948.     DOOR COMMAND 34: Get Value
  949.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  950.     This command will get a value of the option number you pass it.
  951.  
  952.     send.Command= 34
  953.     send.Value1 = which value to return.
  954.  
  955.     returns value desired to send.Value2.
  956.  
  957.     EXAMPLE: GetValue(0) This would return the ANSI color on/off setting
  958.  
  959.     Available Options:  0 - If ansi color is on or off (returns 0=Off, 1=On)
  960.  
  961.  
  962.  
  963.     int GetValue(int opt)
  964.     {
  965.      send.Command=34;
  966.      send.Value1=opt;
  967.      DOORIO();
  968.      return(send.Value2);
  969.     }
  970.     _______________________________________________________________________
  971.  
  972.  
  973.     DOOR COMMAND 41: Alter Time
  974.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  975.     This command allows you to edit the user's time remaining.
  976.  
  977.     send.Command= 41
  978.     send.Value1 = actual number to offset the current time.
  979.  
  980.  
  981.     Examples Values:  -10, 10, 5, -1, -5, etc.
  982.  
  983.  
  984.     VOID AlterTime(int opt)
  985.     {
  986.      send.Command=41;
  987.      send.Value1=opt;
  988.      DOORIO();
  989.     }
  990.     _______________________________________________________________________
  991.  
  992.  
  993.     DOOR COMMAND 43: Set Value
  994.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  995.     This command allows you to set certain values in the bbs.
  996.  
  997.     send.Command= 43
  998.     send.Value1 = Which Option to Change.
  999.     send.Value2 = What to change it to.
  1000.  
  1001.     EXAMPLE: SetValue(1,0) This would make the BBS have a priority of 1
  1002.  
  1003.     Available Options:  0 - BBS Priority
  1004.                         1 - Ansi ON
  1005.                         2 - Ansi OFF
  1006.  
  1007.  
  1008.     VOID SetValue(int opt1,int opt)
  1009.     {
  1010.      send.Command=43;
  1011.      send.Value2=opt1;
  1012.      send.Value1=opt;
  1013.      DOORIO();
  1014.     }
  1015.     _______________________________________________________________________
  1016.  
  1017.  
  1018.     DOOR COMMAND 44: Activity
  1019.     ~~~~~~~~~~~~~~~~~~~~~~~~~
  1020.     This command will allow you to change the user's activity field.
  1021.  
  1022.     send.Command= 44
  1023.     send.Value1 = which preset activity to set it to, or 99 to make your own,
  1024.     send.text1  = pointer to passed string, only used if you select 99 to
  1025.                   create your own activity text.
  1026.  
  1027.     After exiting door, the original activity of the user is automaticly
  1028.     restored by the bbs.
  1029.  
  1030.     Current List of Preset Activity Numbers:
  1031.  
  1032.  
  1033.      2: About to Download
  1034.      4: About to Upload
  1035.      6: Account Editing
  1036.      7: Archiving Catalogs
  1037.      8: Doors Area
  1038.      9: Archiving Messages
  1039.     12: Chatting Sysop
  1040.     14: Comment to Sysop
  1041.     16: Connecting
  1042.     18: Downloading
  1043.     20: E-Mail Area
  1044.     22: File Listings
  1045.     24: File Mail
  1046.     26: File Maintenance
  1047.     28: Flagging Files
  1048.     30: Idle
  1049.     31: Internode Msg Send
  1050.     32: Internode Live Chat
  1051.     33: Internode Line Chat
  1052.     34: Joining Area
  1053.     36: Logging Off
  1054.     38: Logging On
  1055.     40: New User
  1056.     42: Paging Sysop
  1057.     44: Reading Bulletins
  1058.     46: Reading Messages
  1059.     48: Viewing Text File
  1060.     50: Remote Shell
  1061.     52: Scanning Mail
  1062.     54: Sysop DL
  1063.     56: File Descriptions
  1064.     58: Uploading
  1065.     60: Viewing Archive
  1066.     62: Waiting for Call
  1067.     64: Posting a Message
  1068.     66: Zippy Searching
  1069.     70: Viewing Logs
  1070.  
  1071.     99: Generic Text, You send your own text you want displayed.
  1072.         (Option 99 Works in Tempest DOOR COMMANDonly, NOT in AREXX)
  1073.  
  1074.  
  1075.     VOID Activity(BYTE act,TEXT *s)
  1076.     {
  1077.      send.Command=44;
  1078.      send.Value1=act;
  1079.      send.text1=s;
  1080.      DOORIO();
  1081.     }
  1082.     _______________________________________________________________________
  1083.  
  1084.  
  1085.     DOOR COMMAND 50: Select Protocol
  1086.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1087.     This command allows the user to select their transfer protocol.
  1088.  
  1089.     send.Command= 50
  1090.  
  1091.     VOID SelectTransferProtocol(VOID)
  1092.     {
  1093.      send.Command=50;
  1094.      DOORIO();
  1095.     }
  1096.     _______________________________________________________________________
  1097.  
  1098.  
  1099.     DOOR COMMAND 51: Mark/Flag file for download
  1100.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1101.     This command allows you to flag/mark a file for download.
  1102.     You can pass it a number as a string or just a filename as a string.
  1103.     This command will check the current area the user is joined to.
  1104.  
  1105.     send.Command= 51
  1106.     send.text1  = pointer to passed string that contains the filename or
  1107.                   number to be flagged.
  1108.  
  1109.  
  1110.     VOID MarkFile(TEXT *flagfile)
  1111.     {
  1112.      send.Command=51;
  1113.      send.text1=flagfile);
  1114.      DOORIO();
  1115.     }
  1116.     _______________________________________________________________________
  1117.  
  1118.  
  1119.     DOOR COMMAND 52: Zmodem Download
  1120.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1121.     This command will send the user a file with Zmodem protocol.
  1122.  
  1123.     send.Command= 52
  1124.     send.text1  = pointer to passed string that contains the file to be
  1125.                   downloaded.
  1126.  
  1127.  
  1128.     VOID ZmodemDownload(TEXT *string)
  1129.     {
  1130.      send.Command=52;
  1131.      send.text1=string;
  1132.      DOORIO();
  1133.     }
  1134.     _______________________________________________________________________
  1135.  
  1136.  
  1137.     DOOR COMMAND 53: Zmodem Upload
  1138.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1139.     This command will allow users to upload files to the bbs through a
  1140.     door using the internal zmodem protocol.  You must handle the files
  1141.     yourself, they will be located in the work dir (Incomplete files) and
  1142.     work/done dir (Complete files).  This has just been added to give the
  1143.     advanced programmers the option in their programs.
  1144.  
  1145.     send.Command= 53
  1146.  
  1147.  
  1148.     VOID ZmodemUpload(VOID)
  1149.     {
  1150.      send.Command=53;
  1151.      DOORIO();
  1152.     }
  1153.     _______________________________________________________________________
  1154.  
  1155.  
  1156.     DOOR COMMAND 54: Hydra Download
  1157.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1158.     This command will send the user a file with Hydra protocol.
  1159.  
  1160.     send.Command= 54
  1161.     send.text1  = pointer to passed string that contains the file to be
  1162.                   downloaded.
  1163.  
  1164.  
  1165.     VOID HydraDownload(TEXT *string)
  1166.     {
  1167.      send.Command=54;
  1168.      send.text1=string;
  1169.      DOORIO();
  1170.     }
  1171.     _______________________________________________________________________
  1172.  
  1173.  
  1174.     DOOR COMMAND 60: Callers Log Entry
  1175.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1176.     This command will output the passed text to the callers log.
  1177.  
  1178.     send.Command= 60
  1179.     send.text1  = pointer to passed string to be wrote to log.
  1180.  
  1181.  
  1182.     VOID CLOG(TEXT *outstring)
  1183.     {
  1184.      send.Command=60;
  1185.      send.text1=outstring;
  1186.      DOORIO();
  1187.     }
  1188.     _______________________________________________________________________
  1189.  
  1190.  
  1191.     DOOR COMMAND 61: Sysop Activity Log Entry
  1192.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1193.     This command will output the passed text to the Sysop Activity log.
  1194.  
  1195.     send.Command= 61
  1196.     send.text1  = pointer to passed string to be wrote to log.
  1197.  
  1198.  
  1199.     VOID CLOG(TEXT *outstring)
  1200.     {
  1201.      send.Command=61;
  1202.      send.text1=outstring;
  1203.      DOORIO();
  1204.     }
  1205.     _______________________________________________________________________
  1206.  
  1207.  
  1208.     DOOR COMMAND 62: DeBug Log Entry
  1209.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1210.     This command will output the passed text to the DeBug log.
  1211.  
  1212.     send.Command= 62
  1213.     send.text1  = pointer to passed string to be wrote to log.
  1214.  
  1215.  
  1216.     VOID CLOG(TEXT *outstring)
  1217.     {
  1218.      send.Command=62;
  1219.      send.text1=outstring;
  1220.      DOORIO();
  1221.     }
  1222.     _______________________________________________________________________
  1223.  
  1224.  
  1225.     DOOR COMMAND 63: User Log Entry
  1226.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1227.     This command will output the passed text to a user's special user log.
  1228.  
  1229.     send.Command= 63
  1230.     send.text1  = pointer to passed string to be wrote to log.
  1231.  
  1232.  
  1233.     VOID USERLOG(TEXT *outstring)
  1234.     {
  1235.      send.Command=63;
  1236.      send.text1=outstring;
  1237.      DOORIO();
  1238.     }
  1239.     _______________________________________________________________________
  1240.  
  1241.  
  1242.     DOOR COMMAND 69: Write File
  1243.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1244.     This command will writes out text to a text file.
  1245.  
  1246.     send.Command= 69
  1247.     send.text1  = pointer to passed string that gives the path+filename of
  1248.                   text file to be wrote to.
  1249.     send.text2  = pointer to passed string that has the text to be wrote to
  1250.                   this file.
  1251.  
  1252.  
  1253.     VOID WriteFile(TEXT *ostring,TEXT *mstring)
  1254.     {
  1255.      send.Command=69;
  1256.      send.text1=ostring;
  1257.      send.text2=mstring;
  1258.      DOORIO();
  1259.     }
  1260.     _______________________________________________________________________
  1261.  
  1262.  
  1263.     DOOR COMMAND 70: Show File
  1264.     ~~~~~~~~~~~~~~~~~~~~~~~~~~
  1265.     This command will show/display a given text file.
  1266.  
  1267.     send.Command= 70
  1268.     send.text1  = pointer to string passed that has path+filename of file
  1269.                   to be displayed.
  1270.  
  1271.  
  1272.     VOID showfile(TEXT *mstring)
  1273.     {
  1274.      send.Command=70;
  1275.      send.text1=mstring;
  1276.      DOORIO();
  1277.     }
  1278.     _______________________________________________________________________
  1279.  
  1280.  
  1281.     DOOR COMMAND 71: Pause
  1282.     ~~~~~~~~~~~~~~~~~~~~~~
  1283.     This command will display a Pause...(Hit A Key) type prompt that will
  1284.     wait for the user to hit a key before continuing.
  1285.  
  1286.     send.Command= 71
  1287.  
  1288.  
  1289.     int Pause(VOID)
  1290.     {
  1291.      send.Command=71;
  1292.      DOORIO();
  1293.      return(send.Value1);
  1294.     }
  1295.     _______________________________________________________________________
  1296.  
  1297.  
  1298.     DOOR COMMAND 72: More (Y/N/NS) Prompt
  1299.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1300.  
  1301.     This command will pause and ask if the user wants to continue listing,
  1302.     stop listing, or continue with non-stop display.
  1303.  
  1304.     send.Command= 72
  1305.  
  1306.     Return Values: 0 = Continue Listing
  1307.                    1 = Stop Listing
  1308.                    2 = Non Stop
  1309.  
  1310.     Return value is stored in send.Value1.
  1311.  
  1312.  
  1313.     int MORE(VOID)
  1314.     {
  1315.      send.Command=72;
  1316.      DOORIO();
  1317.      return(send.Value1);
  1318.     }
  1319.     _______________________________________________________________________
  1320.  
  1321.  
  1322.     DOOR COMMAND 73: MSG Editor
  1323.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1324.     This command will call up the internal message editor and allow you to
  1325.     write out a text file with it.
  1326.  
  1327.     send.Command= 73
  1328.     send.Value1 = Max Number of lines allowed (100 MAX MAX)
  1329.     send.text1  = pointer to Path+FileName of file to be saved.
  1330.  
  1331.  
  1332.     VOID MsgEditor(TEXT *Filename,int maxlength)
  1333.     {
  1334.      send.Command=73;
  1335.      send.Value1=maxlength;
  1336.      send.text1=Filename;
  1337.      DOORIO();
  1338.     }
  1339.     _______________________________________________________________________
  1340.  
  1341.  
  1342.     DOOR COMMAND 74: Re-Load Data Files to Memory
  1343.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1344.     Re-Loads all the bbs data files into memory, to update any that have
  1345.     been changed.
  1346.  
  1347.     send.Command= 74
  1348.  
  1349.  
  1350.     VOID LoadSystemData(VOID)
  1351.     {
  1352.      send.Command=74;
  1353.      DOORIO();
  1354.     }
  1355.     _______________________________________________________________________
  1356.  
  1357.  
  1358.     DOOR COMMAND 75: Get a Random Number
  1359.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1360.     Get a random number between 0 and number passed to routine.
  1361.  
  1362.     send.Command= 75
  1363.     send.Value1 = set to passed number to set high number in range.
  1364.  
  1365.     returns generated random number into send.Value1
  1366.  
  1367.  
  1368.     int Random(int x)
  1369.     {
  1370.      send.Command=75;
  1371.      send.Value1=x;
  1372.      DOORIO();
  1373.      return(send.Value1);
  1374.     }
  1375.     _______________________________________________________________________
  1376.  
  1377.  
  1378.     DOOR COMMAND 76: Copy a File
  1379.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1380.     Move a file from source to destination.
  1381.  
  1382.     send.Command= 76
  1383.     send.text1  = Pointer to Source Path+Filename.
  1384.     send.text2  = Pointer to Destination Path+Filename.
  1385.  
  1386.  
  1387.     VOID CopyFile(TEXT *Source,TEXT *Destination)
  1388.     {
  1389.      send.Command=76;
  1390.      send.text1=Source;
  1391.      send.text2=Destination;
  1392.      DOORIO();
  1393.     }
  1394.     _______________________________________________________________________
  1395.  
  1396.  
  1397.     DOOR COMMAND 77: Move a File
  1398.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1399.     Move a file from source to destination.
  1400.  
  1401.     send.Command= 77
  1402.     send.text1  = Pointer to Source Path+Filename.
  1403.     send.text2  = Pointer to Destination Path+Filename.
  1404.  
  1405.  
  1406.     VOID MoveFile(TEXT *Source,TEXT *Destination)
  1407.     {
  1408.      send.Command=77;
  1409.      send.text1=Source;
  1410.      send.text2=Destination;
  1411.      DOORIO();
  1412.     }
  1413.     _______________________________________________________________________
  1414.  
  1415.  
  1416.     DOOR COMMAND 78: Get File Size
  1417.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1418.     Get file size of a file.
  1419.  
  1420.     send.Command= 78
  1421.     send.text1  = Pointer to Path+Filename.
  1422.  
  1423.     Returns file size of the file into send->LongValue.
  1424.  
  1425.  
  1426.     ULONG FileSize(TEXT *Source)
  1427.     {
  1428.      send.Command=78;
  1429.      send.text1=Source;
  1430.      DOORIO();
  1431.      return(send.LongValue);
  1432.     }
  1433.     _______________________________________________________________________
  1434.  
  1435.  
  1436.     DOOR COMMAND 79: WildCard String Compare
  1437.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1438.     Compares a string with a pattern to see if there is a match, supports
  1439.     '*' and '?' wild card keys.
  1440.  
  1441.     send.text1 = Pointer to string to be searched.
  1442.     send.text2 = Pointer to pattern to be searched for.
  1443.  
  1444.     Returns to send.Value1 a 0 if a match is found and 1 if there was no
  1445.     match found
  1446.  
  1447.  
  1448.     int StringCompare(TEXT *string, TEXT *pattern)
  1449.     {
  1450.      send.Command=79;
  1451.      send.text1=string;
  1452.      send.text2=pattern;
  1453.      DOORIO();
  1454.      return(send.Value1);
  1455.     }
  1456.     _______________________________________________________________________
  1457.  
  1458.  
  1459.     DOOR COMMAND 80: Strip Color Ansi Codes
  1460.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1461.     Strips only ansi color related ansi codes from a string.
  1462.  
  1463.     send.text1 = Pointer to string to be stripped of ansi codes.
  1464.  
  1465.     VOID StripColorAnsiCodes(TEXT *string)
  1466.     {
  1467.      send.Command=80;
  1468.      send.text1=string;
  1469.      DOORIO();
  1470.     }
  1471.     _______________________________________________________________________
  1472.  
  1473.  
  1474.     DOOR COMMAND 81: Strip All Ansi Codes
  1475.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1476.     Strips all ansi codes from a string.
  1477.  
  1478.     send.text1 = Pointer to string to be stripped of ansi codes.
  1479.  
  1480.     VOID StripAllAnsiCodes(TEXT *string)
  1481.     {
  1482.      send.Command=81;
  1483.      send.text1=string;
  1484.      DOORIO();
  1485.     }
  1486.     _______________________________________________________________________
  1487.  
  1488.  
  1489.     DOOR COMMAND 82: Find Assignment
  1490.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1491.     Checks an assignment to make sure it exists.  Prevents requesters from
  1492.     poping up if a device/assignment does not exists.
  1493.  
  1494.     Returns 0 if device/assignment was found, or 1 if it was not valid.
  1495.  
  1496.     send.text1 = Pointer to string containing path/assignment to be checked.
  1497.  
  1498.     int FindAssignment(TEXT *string)
  1499.     {
  1500.      send.Command=82;
  1501.      send.text1=string;
  1502.      DOORIO();
  1503.      return(send.Value1);
  1504.     }
  1505.     _______________________________________________________________________
  1506.  
  1507.  
  1508.     DOOR COMMAND 90: Post Message
  1509.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1510.     Save a message in the bbs.
  1511.  
  1512.     send.Command = 90
  1513.     send.Value1  = Area
  1514.     send.text1   = Pointer to your letters structure.
  1515.     send.text2   = Pointer to msg text filename.
  1516.  
  1517.  
  1518.     VOID SaveMsg(struct Letters *Letters,int Area,TEXT *FileName)
  1519.      {
  1520.       send.Command=90;
  1521.       send.Value1=Area;
  1522.       send.text1 =(char *)Letters;
  1523.       send.text2 =FileName;
  1524.       DOORIO();
  1525.      }
  1526.     _______________________________________________________________________
  1527.  
  1528.  
  1529.     DOOR COMMAND 91: Join Conference
  1530.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1531.     Join a different area.
  1532.  
  1533.     send.Command   = 91
  1534.     send.LongValue = Area to Join
  1535.  
  1536.  
  1537.     VOID JoinConference(ULONG Area)
  1538.      {
  1539.       send.Command=91;
  1540.       send.LongValue=Area;
  1541.       DOORIO();
  1542.      }
  1543.     _______________________________________________________________________
  1544.  
  1545.  
  1546.     DOOR COMMAND 100: Load User Account
  1547.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1548.     Load a user account into a user structure.
  1549.  
  1550.     send.Command  = 100
  1551.     send.LongValue= Pointer to your user structure.
  1552.  
  1553.     Return value is saved in send.Value1 and returns 0 = Load Ok,
  1554.     1= Error in load.
  1555.  
  1556.  
  1557.     int LoadUserAccount(struct User *hoozer,UWORD slot)
  1558.     {
  1559.      send.Command=100;
  1560.      send.LongValue=(ULONG)hoozer;
  1561.      send.Value1   =slot;
  1562.      DOORIO();
  1563.      return(send.Value1); // 0 = Loaded Ok, 1 = Error in load.
  1564.     }
  1565.     _______________________________________________________________________
  1566.  
  1567.  
  1568.     DOOR COMMAND 101: Save User Account
  1569.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1570.     Save a user account from a user structure.
  1571.  
  1572.     send.Command  = 101
  1573.     send.LongValue= Pointer to your user structure.
  1574.  
  1575.     Return value is saved in send.Value1 and returns 0 = Saved Ok,
  1576.     1= Error in save.
  1577.  
  1578.  
  1579.     int SaveUserAccount(struct User *hoozer,UWORD slot)
  1580.     {
  1581.      send.Command=101;
  1582.      send.LongValue=(ULONG)hoozer;
  1583.      send.Value1   =slot;
  1584.      DOORIO();
  1585.      return(send.Value1); // 0 = Saved Ok, 1 = Error in save.
  1586.     }
  1587.     _______________________________________________________________________
  1588.  
  1589.  
  1590.     DOOR COMMAND 103: Find User Slot Number
  1591.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1592.     Supply the user name and the routine will return the user slot number.
  1593.  
  1594.     send.Command= 103
  1595.     send.text1  = Pointer to user name string.
  1596.  
  1597.     Returns Slot number of user or 0 if user name was not found.
  1598.  
  1599.  
  1600.     int FindUserSlot(TEXT *name)
  1601.     {
  1602.      send.Command=103;
  1603.      send.text1  =name;
  1604.      DOORIO();
  1605.      return(send.Value1); // Returns Slot # or 0 if it is not found.
  1606.     }
  1607.     _______________________________________________________________________
  1608.  
  1609.  
  1610.     DOOR COMMAND 110: Load Catalog Entry
  1611.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1612.     Load a catalog entry into a catalogs structure.
  1613.  
  1614.     send.Command   = 110
  1615.     send.text1     = Pointer to your catalogs structure.
  1616.     send.LongValue = Area
  1617.     send.Value1    = Sub File Listing (0 if upload area)
  1618.     send.Value2    = Slot to read
  1619.  
  1620.     Returns value to send.Value1, 0 = Loaded ok, 1 = Error in load.
  1621.  
  1622.  
  1623.     int LoadCatalogEntry(struct Catalogs *cat,ULONG Area,ULONG SubArea,UWORD Slot)
  1624.     {
  1625.      send.Command  =110;
  1626.      send.text1    =(char *)cat;
  1627.      send.LongValue=Area;
  1628.      send.Value1   =SubArea;
  1629.      send.Value2   =Slot;
  1630.      DOORIO();
  1631.      return(send.Value1); // 0 = Loaded Ok, 1 = Error in load.
  1632.     }
  1633.     _______________________________________________________________________
  1634.  
  1635.     DOOR COMMAND 111: Save Catalog Entry
  1636.     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1637.     Save a catalog entry into a catalogs structure.
  1638.  
  1639.     send.Command   = 111
  1640.     send.text1     = Pointer to your catalogs structure.
  1641.     send.LongValue = Area
  1642.     send.Value1    = Sub File Listing (0 if upload area)
  1643.     send.Value2    = Slot to write
  1644.  
  1645.     Returns value to send.Value1, 0 = Saved ok, 1 = Error in save.
  1646.  
  1647.  
  1648.     int SaveCatalogEntry(struct Catalogs *cat,ULONG Area,ULONG SubArea,UWORD Slot)
  1649.      {
  1650.       send.Command  =111;
  1651.       send.text1    =(char *)cat;
  1652.       send.LongValue=Area;
  1653.       send.Value1   =SubArea;
  1654.       send.Value2   =Slot;
  1655.       DOORIO();
  1656.       return(send.Value1); // 0 = Loaded Ok, 1 = Error in load.
  1657.      }
  1658.  
  1659.  __________________________________________________________________________
  1660.  __________________________________________________________________________
  1661.  __________________________________________________________________________
  1662.  
  1663.  
  1664.  2-2  Arexx Door Interface
  1665.  ~~~~~~~~~~~~~~~~~~~~~~~~~
  1666. ** Using AREXX with Tempest
  1667.    ~~~~~~~~~~~~~~~~~~~~~~~~
  1668.    OK, if you've written in AREXX before, AND know how to use it for
  1669.    Tempest v3.15 and newer, you can skip this section.  Otherwise, you
  1670.    may want to examine this section, even if it's only for review
  1671.    purposes.
  1672.  
  1673.    This header will begin ALL AREXX programs you write for Tempest,
  1674.    and will probably need to be changed if you're converting a program
  1675.    from another BBS system.
  1676.  
  1677.  ------- cut here --------- cut here --------- cut here --------- cut here
  1678.  
  1679. ARG BBS_NODE
  1680. options results
  1681. Address value 'TempRexx-'BBS_NODE
  1682.  
  1683. ------- cut here --------- cut here --------- cut here --------- cut here
  1684.  
  1685.    Here is a line-by-line explanation of this code segment.
  1686.  
  1687. "ARG BBS_NODE"
  1688.  
  1689.    This automatically picks up the NODE number that the user is on,
  1690.    and stores it into the variable BBS_NODE.  This is REQUIRED, or else
  1691.    if two users (or the SYSOP and a user) use the program at the same
  1692.    time, they will collide, crashing one or both nodes, and of course,
  1693.    possibly GURUing!
  1694.  
  1695. "options results"
  1696.  
  1697.    This tells the AREXX program that the BBS will be sending us data,
  1698.    and that our received data should be avaliable in the FIXED variable
  1699.    "result".  (Note, that is NOT a typo!  results in the options line IS
  1700.    plural, but the variable we get our answer in is NOT!).  By a FIXED
  1701.    variable, I mean that you cannot change it.  The BBS will put the
  1702.    answer into RESULT no matter what (If there IS an answer/reply).  You
  1703.    can, of course, COPY the contents of result to another variable.  for
  1704.    example:  UserName = result
  1705.  
  1706. "Address value 'TempRexx-'BBS_NODE"
  1707.  
  1708.    This line needs to be broken down to be best understood.  the word
  1709.    "Address" let's AREXX know that we are going to have a fixed program
  1710.    (Tempest) to do our commuication with.  "Value" indicates that it will
  1711.    be a text address, rather than a numerical one (The standard).
  1712.    'TempRexx-' is PART of the actual address that your program will use.
  1713.    by adding the BBS_NODE after it (NO SPACES!), you turn that address
  1714.    into 'TempRexx-1' (for node 1) etc etc..  This allows us to have ONE
  1715.    program that can be used on multi-node boards, without having to have
  1716.    more than one copy of the program.  Needless to say, if this line is
  1717.    omitted, the AREXX program won't know where to send/receive data, nor
  1718.    will the BBS, so both will be locked until either they both crash, or
  1719.    you reboot.  Whichever one comes first!
  1720.  
  1721.    After you have the header as listed above, you are ready to continue
  1722.    on into the wonderful world of AREXX.  The code varies so much beyond
  1723.    theses lines, that I won't even touch on the subject.  To even attempt
  1724.    it would push this document well over the intended file size....  So,
  1725.    with this much under our belt, and a good attitude, we procede on to
  1726.    the Command Set.
  1727.  
  1728.  
  1729. To Exit the arexx program add the following 2 lines to the end.
  1730.  
  1731. 'exit'
  1732. exit
  1733.  
  1734.  
  1735.  
  1736.  
  1737. ** The Command Set
  1738.    ~~~~~~~~~~~~~~~
  1739.    - Command parameters
  1740.  
  1741.    Please note that YES, some commands are duplicated, and there are
  1742.    different formats with the same results.  This is due to the
  1743.    imitation/emulation of the various BBS programs avaliable, and also
  1744.    makes it possible to use most avaliable script even in an unaltered
  1745.    state.  As I get more lists of commands, there may be even more added,
  1746.    depending on the Tempest Owner's demand for it.
  1747.  
  1748.    IMPORTANT NOTE:  Even though you see all these commands listed as
  1749.    uppercase letters, you are NOT required to do that.  It makes it easier
  1750.    to read, but that's it.  The can be all lowercase, or any mixture.
  1751.    When the BBS receives the code, it's done in a non-case-sensitive
  1752.    compare, so however you wanna do it is fine.  It MUST be spelled
  1753.    correctly though!  I can't compensate for that!
  1754.  
  1755.    There are three basic command types supported:
  1756.  
  1757.    1) COMMAND
  1758.    2) COMMAND FUNCTION
  1759.    3) COMMAND FUNCTION PARAMETER
  1760.  
  1761.    The command type (option one) is a general command, that usually
  1762.    won't have a result returned.  For example:  EXIT, BufferFlush
  1763.  
  1764.    The command & function is the one that will probably be the most
  1765.    commonly used.  It involves the command, and a function to be performed
  1766.    on it.  An example would be:  'GetVar' '1'
  1767.  
  1768.    The command, function, and parameter will be mostly used for
  1769.    intercommunication with the BBS itself.  An example would be:
  1770.    PUTVAR1 'This is User's Name'
  1771.  
  1772.    Ok, after understanding that, I'll now attempt to explain each
  1773.    command, it's function, and any parameters that might be required.
  1774.  
  1775.  
  1776. ** Command List - Alphabetical
  1777.    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1778.  
  1779.        ACTIVITY
  1780.        ~~~~~~~~
  1781.        This allows you to change the user activity that shows up in who doors
  1782.        and servers to show what the user is doing currently.
  1783.        Pass it the activity text you want displayed.
  1784.        Can also pass a number value to use one of the internal activities,
  1785.        check C Door code for complete list of internal activities.
  1786.        (19 characters max please)
  1787.  
  1788.        After quiting arexx door, the original activity of the user is
  1789.        automaticly restored by the bbs.
  1790.  
  1791.  
  1792.        ADDPOINTS
  1793.        ~~~~~~~~~
  1794.        Currently not defined, and is ignored. No result returned.
  1795.        Added for compatibility.
  1796.  
  1797.  
  1798.        ADDTIME
  1799.        ~~~~~~~
  1800.        Adds minutes to a users time online.   Pass it the number of
  1801.        minutes to add.
  1802.        For opposite see 'REMOVETIME'.
  1803.  
  1804.  
  1805.        BAUD
  1806.        ~~~~
  1807.        Returns the baud rate of the current user online.
  1808.  
  1809.  
  1810.        BBSIDENTIFY
  1811.        ~~~~~~~~~~~
  1812.        This command takes one of five possible functions.  The result
  1813.        returned will be determined as follows:
  1814.  
  1815.        - BBSIDENTIFY ANSI     = Returns an Integer value of 0 or 1,
  1816.                                 which indicates if they have ANSI on or
  1817.                                 off.
  1818.        - BBSIDENTIFY ABBEREXX = returns the version of the BBS
  1819.        - BBSIDENTIFY BBS      = returns the Tempest BBS (c) 1994 message
  1820.        - BBSIDENTIFY NAME     = returns the name of the BBS.
  1821.        - BBSIDENTIFY SYSOP    = returns the name of the system operator.
  1822.        - BBSIDENTIFY TERM     = Returns Baud rate they are currently at,
  1823.                                 and a simple 8N1 Full-Duplex string.
  1824.        - BBSIDENTIFY USER     = returns User's Name, Location, and
  1825.                                 security level, all separated by a space,
  1826.                                 and each item enclosed in quotes.
  1827.  
  1828.        BUFFERFLUSH
  1829.        ~~~~~~~~~~~
  1830.        Flushes any characters, commands, or garbage (line noise) from the
  1831.        buffer, so that the AREXX program can start clean.  This ensures
  1832.        that accidental commands won't be entered accidentally.  I recommend
  1833.        EVERY program uses this command as their first program instruction
  1834.        (After setting up the address value statement, of course!).  This
  1835.        command does not use any parameters, and any given will be ignored.
  1836.        It also does not return anything to the program in Result.
  1837.  
  1838.  
  1839.        CARRIER
  1840.        ~~~~~~~
  1841.        See 'GetCarrier'; Included for compatibility.
  1842.  
  1843.  
  1844.        CHECKABORT
  1845.        ~~~~~~~~~~
  1846.        Checks to see if CTRL-C has been entered, returns '1' if it has and
  1847.        returns '0' if not.
  1848.  
  1849.  
  1850.        CHECKIO
  1851.        ~~~~~~~
  1852.        Checks to see if there is any inputed characters to be read, if there
  1853.        is it returns "TRUE" and if there is not returns "FALSE".
  1854.  
  1855.  
  1856.        CLS
  1857.        ~~~
  1858.        This  command stands for CLear Screen.  It merely clears the screen
  1859.        (User's and SYSOP's) and places the cursor in the upper left corner
  1860.        of the screen, usually called "HOME".
  1861.  
  1862.  
  1863.        CONTINUE
  1864.        ~~~~~~~~
  1865.        Prints the Message  'Pause...[Hit Return]:'  prompt.
  1866.  
  1867.  
  1868.        DISPLAYFILE [string]
  1869.        ~~~~~~~~~~~~~~~~~~~~
  1870.        See 'SENDFILE'; Included for compatibility.
  1871.  
  1872.  
  1873.        DOWNLOAD [string]
  1874.        ~~~~~~~~~~~~~~~~~
  1875.        This command will let you download a file.  You must send it the
  1876.        complete Path+filename in the given string.
  1877.  
  1878.  
  1879.        DROPCARRIER
  1880.        ~~~~~~~~~~~
  1881.        See 'KICKOFF'; Included for compatibility.
  1882.  
  1883.  
  1884.        EXIT
  1885.        ~~~~
  1886.        Tell the BBS that the arexx port does not need to be open any
  1887.        longer.  The user will be returned to the BBS at this point.  The
  1888.        arexx program CAN still run and do various cleanup utilities, but
  1889.        may NOT call on any more information from the BBS.
  1890.  
  1891.  
  1892.        EXITSCRIPT
  1893.        ~~~~~~~~~~
  1894.        This command is used by Xenolink BBS, and Tempest support is only
  1895.        partial at this time.  Under Xenolink, this command returns control
  1896.        to the BBS, but the arexx script is still active, so when the arexx
  1897.        script executes another BBS command, the user is yanked back into
  1898.        the Arexx script again.  In the Tempest emulation of this, it merely
  1899.        exits back to the BBS, leaving the arexx script still running.  The
  1900.        arexx program CANNOT get BACK to the BBS however, nor can it call
  1901.        anymore BBS functions, since the connection has been broken at that
  1902.        point.  This may change in the future.  Currently, 'EXIT' is the
  1903.        command that should be used in place of this one.
  1904.  
  1905.  
  1906.        GETCARRIER
  1907.        ~~~~~~~~~~
  1908.        This command checks to verify that the user has not hungup on the
  1909.        BBS.  If this test returns "TRUE", then the connection is ok.  if it
  1910.        returns "FALSE" you will need to exit your program as quickly as
  1911.        possible, so that the BBS may reset for the next caller.  results
  1912.        returned are "TRUE" for carrier present, and "FALSE" for no carrier.
  1913.  
  1914.  
  1915.        GETCHAR  [string]
  1916.        ~~~~~~~~~~~~~~~~~
  1917.        This command does not require a parameter, but can accept one.
  1918.        This was to maintain compatibility with Xenolink BBS.  If a paramter
  1919.        is present, it will be sent to the output.  The routine then waits for
  1920.        the  user to press one key, and the key pressed will be contained in
  1921.        Result.  (This is also known as a HOTKEY function.) If the parameter
  1922.        is NOT present, no change will be made to the output.
  1923.  
  1924.  
  1925.        GETLINE NORMAL | HIDE | YESNO | NOYES [string]
  1926.        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1927.        This routine accepts input of up to 80 characters.  The options that
  1928.        affect the procedure on this are listed below.
  1929.  
  1930.        - GETLINE  NORMAL = Prints the [string] to the output, both SYSOP
  1931.                            and user, and inputs a normal answer, which is
  1932.                            returned in the variable result.
  1933.        - GETLINE  HIDE   = This lets the user input like normal except for
  1934.                            what the user types is hidden from display,
  1935.                            the bbs will echo periods instead of what was
  1936.                            actually typed.
  1937.        - GETLINE  YESNO  = This prints the string, and accepts a HOTKEY
  1938.                            answer of Y or N, defualting to Y if N was not
  1939.                            selected. Returns the key that was pressed in
  1940.                            Result.
  1941.        - GETLINE  NOYES  = This prints the string, and accepts a HOTKEY
  1942.                            answer of Y or N, defualting to N if Y was not
  1943.                            selected. Returns the key that was pressed in
  1944.                            Result.
  1945.  
  1946.        GETUSER
  1947.        GETUSERVAR
  1948.        GETVAR      [Number between 1 and xxx inclusive|KEYWORD]
  1949.        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1950.        These three commands ALL do the same thing, but are cloned for the
  1951.        convenience of emulating the various BBS programs.  Since this
  1952.        command accepts two types of parameters, let me attempt to explain.
  1953.        To succesfully emulate Xenolink, I had to accept words, as well as
  1954.        numbers.  This means that BOTH do the same thing, but since
  1955.        Xenolink's vocabulary is somewhat limited, the numbers offer more
  1956.        functions.  The word equivelents can be used, but for Tempest
  1957.        programming, I recommend the numbers.  The opposites of this command
  1958.        are PUTVAR, SETUSERVAR, and PUTUSER.  PLEASE NOTE: Some of these
  1959.        commands are READ-ONLY, which  means you can read them, but no
  1960.        function is avaliable to write it back out.  This has been done for
  1961.        safety's sake.  For example, you can read the name of the BBS, and
  1962.        the SYSOP's name, but it cannot be changed in the BBS.
  1963.        (The AREXX program can alter it in itself all it wants, it just
  1964.         won't be saved to the BBS....)
  1965.  
  1966.  
  1967.        - The Numerical Commands: Sequential Order
  1968.          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1969.          Please note that GETUSER, GETUSERVAR, and GETVAR can be used
  1970.          interchangedly, but since GETVAR is faster to type, I'll be using
  1971.          it for my examples.
  1972.  
  1973.          These commands are the same! as the Putvar commands
  1974.  
  1975.            0 : Alias
  1976.            1 : Password
  1977.            2 : Real Name
  1978.            3 : Street Address
  1979.            4 : City
  1980.            5 : State
  1981.            6 : PostalCode
  1982.            7 : Country
  1983.  
  1984.            8 : Voice Phone Number
  1985.            9 : Data Phone Number
  1986.  
  1987.           10 : BirthDate (MM-DD-YY)   (GetUser Only)
  1988.           11 : Age                    (GetUser Only)
  1989.           12 : Sex (M or F)
  1990.  
  1991.           13 : Computer Model
  1992.           14 : Sysop Comments
  1993.  
  1994.           15 : First Time On System
  1995.           16 : Last Time On System
  1996.           17 : Logon Time/Date
  1997.  
  1998.           18 : User Slot Number
  1999.           19 : *****[NOT USED, LATER USE] - userserialnumber
  2000.           20 : Security Level
  2001.           21 : *****[NOT USED, LATER USE] - securitytitle
  2002.  
  2003.           22 : *****[NOT USED, LATER USE] \
  2004.           23 : *****[NOT USED, LATER USE]  > Net Addresses
  2005.           24 : *****[NOT USED, LATER USE] /
  2006.  
  2007.           25 : Total Calls
  2008.           26 : Total Posts
  2009.           27 : *****[NOT USED, LATER USE]
  2010.           28 : Total Uploaded Files
  2011.           29 : Total Uploaded Bytes
  2012.           30 : Total Downloaded Files
  2013.           31 : Total Downloaded Bytes
  2014.           32 : Total Time Bank Mins Stored Up
  2015.           33 : *****[NOT USED, LATER USE]
  2016.           34 : *****[NOT USED, LATER USE]
  2017.           35 : *****[NOT USED, LATER USE]
  2018.           36 : *****[NOT USED, LATER USE]
  2019.           37 : *****[NOT USED, LATER USE]
  2020.  
  2021.           38 : File Ratio
  2022.           39 : Byte Ratio
  2023.           40 : *****[NOT USED, LATER USE]
  2024.  
  2025.           41 : Period Limit for Calls
  2026.           42 : Period Limit for Posts
  2027.           43 : Period Limit for Uploaded Files
  2028.           44 : Period Limit for Uploaded Bytes
  2029.           45 : Period Limit for Downloaded Files
  2030.           46 : Period Limit for Downloaded Bytes
  2031.           47 : Period Limit for Time
  2032.           48 : Period Limit for Time Bank
  2033.           49 : Period Limit for Chat Time
  2034.           50 : *****[NOT USED, LATER USE]
  2035.           51 : *****[NOT USED, LATER USE]
  2036.           52 : *****[NOT USED, LATER USE]
  2037.           53 : *****[NOT USED, LATER USE]
  2038.           54 : *****[NOT USED, LATER USE]
  2039.  
  2040.           55 : *****[NOT USED, LATER USE] Period Type
  2041.           56 : *****[NOT USED, LATER USE] Period Length
  2042.  
  2043.           57 : Period Calls
  2044.           58 : Period Posts
  2045.           59 : Period Uploaded Files
  2046.           60 : Period Uploaded Bytes
  2047.           61 : Period Downloaded Files
  2048.           62 : Period Downloaded Bytes
  2049.           63 : *****[NOT USED, LATER USE] Period Time
  2050.           64 : *****[NOT USED, LATER USE] Period Time Bank
  2051.           65 : Period Chat Time
  2052.           66 : *****[NOT USED, LATER USE]
  2053.           67 : *****[NOT USED, LATER USE]
  2054.           68 : *****[NOT USED, LATER USE]
  2055.           69 : *****[NOT USED, LATER USE]
  2056.           70 : *****[NOT USED, LATER USE]
  2057.  
  2058.           71 : Time Left
  2059.           72 : Chat Time Left
  2060.           73 : File Downloads Left
  2061.           74 : Byte Downloads Left
  2062.           75 : *****[NOT USED, LATER USE]
  2063.           76 : *****[NOT USED, LATER USE]
  2064.           77 : *****[NOT USED, LATER USE]
  2065.           78 : *****[NOT USED, LATER USE]
  2066.           79 : *****[NOT USED, LATER USE]
  2067.           80 : Day Credits
  2068.           81 : File Credits
  2069.           82 : Byte Credits
  2070.           83 : *****[NOT USED, LATER USE]
  2071.           84 : Personal Bytes
  2072.           85 : Msg Base Rejoined
  2073.           86 : File Base Rejoined
  2074.           87 : Screen Length
  2075.           88 : Screen Width
  2076.           89 : Ansi Type
  2077.           90 : Upload Protocol Selected
  2078.           91 : Download Protocol Selected
  2079.           92 : Selected Language
  2080.           93 : Selected Traslation
  2081.           94 : Time Zone Offset
  2082.           95 : Who Preference
  2083.           96 : File Listing View Mode
  2084.           97 : Weed Days
  2085.           98 : Reduce Days
  2086.           99 : Reduce Access
  2087.          100 : User's Password Failures
  2088.  
  2089.  
  2090.  
  2091.        GETSTR [which]
  2092.        ~~~~~~~~~~~~~~
  2093.        With this command you can get a string from the (~) Variables List
  2094.        from Chapter V.  Just use the Arexx Code to get the string you
  2095.        desire.
  2096.  
  2097.  
  2098.        INPUT [characters<80]
  2099.        ~~~~~~~~~~~~~~~~~~~~~
  2100.        Accepts an input string from the user, with a maximum of 80
  2101.        characters.  The user will not be allowed to type past 80
  2102.        characters, so the routine has some built in error checking.  No
  2103.        string will be printed, even if passed to the routine.
  2104.        See also: PROMPT
  2105.  
  2106.  
  2107.        INPUTWAITING
  2108.        ~~~~~~~~~~~~
  2109.        Currently not defined, and is ignored. No result returned.
  2110.  
  2111.  
  2112.        KICKOFF
  2113.        ~~~~~~~
  2114.        Force a user's premature logoff.  Sends the BBS the same code as
  2115.        the sysop hitting "F9", for Force Logoff.  Accepts no parameters.
  2116.        returns nothing.
  2117.  
  2118.  
  2119.        LOGENTRY [string]
  2120.        ~~~~~~~~~~~~~~~~~
  2121.        This will write the string [string] to the SYSOP's callerslog file.
  2122.        the function returns nothing.
  2123.  
  2124.  
  2125.        MAYGETCHAR
  2126.        ~~~~~~~~~~
  2127.        Checks for input and if there is no input it continues immediately.
  2128.        Just like a hotkey except it don't wait around for someone to input
  2129.        a key, it only checks if something was entered and if so returns the
  2130.        key that was entered.
  2131.  
  2132.  
  2133.        MARKFILE [string]
  2134.        ~~~~~~~~~~~~~~~~~
  2135.        This command will allow you to flag/mark a file for download.
  2136.        You must pass it the file number or the file name, NO PATH!
  2137.        It will only allow you to flag files from the user's current
  2138.        file area joined.
  2139.  
  2140.  
  2141.        MENUSET
  2142.        ~~~~~~~
  2143.        Currently not defined, and is ignored. No result returned.
  2144.  
  2145.  
  2146.        MESSAGE [string]
  2147.        ~~~~~~~~~~~~~~~~
  2148.        Print a line of formatted or unformatted text, and places a carriage
  2149.        return at the end of the string. Nothing is returned.
  2150.  
  2151.  
  2152.        MORE
  2153.        ~~~~
  2154.        This command is the same as Excelsior BBS.  It basically displays the
  2155.        More(Y/n/ns)? prompt.  It will return one of the following values:
  2156.  
  2157.        0 = (Yes) Continue
  2158.        1 = (No)  Stop Listing
  2159.        2 = (NS)  Non Stop Listing
  2160.        Anything less than 0 is dropped carrier.
  2161.  
  2162.  
  2163.        MSG [string]
  2164.        ~~~~~~~~~~~~
  2165.        This function performs the same as 'MESSAGE', but does NOT append a
  2166.        carriage return on the end.  the cursor remains at the last
  2167.        character.  This function returns nothing.
  2168.  
  2169.  
  2170.        MSGEDITOR [string]
  2171.        ~~~~~~~~~~~~~~~~~~
  2172.        This command will call up the Tempest Msg Editor.
  2173.        You must pass it the Path+Filename of the file to be created when
  2174.        the text is saved and the max number of lines for the editor.
  2175.  
  2176.        [string] field contains both the Path+filename and max number of
  2177.        for the editor.
  2178.  
  2179.        Example string:  'RAM:Message.txt 50'
  2180.  
  2181.        Notice that the path+filename is first then a space then the max
  2182.        number of lines for the message editor.
  2183.  
  2184.  
  2185.        NEWLINE
  2186.        ~~~~~~~
  2187.        This command ONLY prints a carriage return AND a linefeed.  NO
  2188.        parameters are accepted, and returns nothing.
  2189.  
  2190.  
  2191.        OUTTEXT [string]
  2192.        ~~~~~~~~~~~~~~~~
  2193.        See 'MSG'; Included for compatibility.
  2194.  
  2195.  
  2196.        PATH [Value]
  2197.        ~~~~~~~~~~~~
  2198.        Returns the desired path to a certain bbs directory.
  2199.  
  2200.          [Value] : [Path Returned]
  2201.                  :
  2202.             0    : Main BBS Path.
  2203.             1    : Path of Main Tempest files & Accounts.Data file.
  2204.             2    : Path of Account Info directory where Applications &
  2205.                    FlaggedFiles directories are stored.
  2206.             3    : Path where Bad Archives uploaded are stored.
  2207.             4    : Path where Catalog files (File Listings) are stored.
  2208.             5    : Path of Describe directory.
  2209.             6    : Path where doors are stored.
  2210.             7    : Path where Extended Description files are stored.
  2211.             8    : Path where all bbs logs are stored.
  2212.             9    : Path where modules are stored.
  2213.            10    : Path where resumealbe files are stored.
  2214.            11    : Path of Optional Directory.
  2215.            12    : Path of Scripts Directory.
  2216.            13    : Path of Setup Directory.
  2217.            14    : Path of sysop hold directory.
  2218.            15    : Path of Text file direcotry.
  2219.            16    : Path of Voting Booth files.
  2220.            17    : Path of current node's upload work directory.
  2221.  
  2222.  
  2223.        PRINT [string]
  2224.        ~~~~~~~~~~~~~~
  2225.        See 'MESSAGE'; Included for compatibility.
  2226.  
  2227.  
  2228.        PROMPT [string]
  2229.        ~~~~~~~~~~~~~~~
  2230.        This performs much as the INPUT command, but also prints a string
  2231.        to the output first.  Example:
  2232.        PROMPT "Do you want me to delete your Hard  Drive?   [YES/NO] "
  2233.        It will then wait until the user enters a response (up to 80
  2234.        characters) and then return the answer in result.  Obviously this is
  2235.        a bad example, but you get the idea.
  2236.  
  2237.  
  2238.        PUTUSER
  2239.        PUTVAR
  2240.        SETUSERVAR [Number between 1 and 62 inclusive|KEYWORD]  [VALUE]
  2241.        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2242.        These three commands ALL do the same thing, but are cloned for the
  2243.        convenience of emulating the various BBS programs.  Since this
  2244.        command accepts two types of parameters, let me attempt to explain.
  2245.        To succesfully emulate Xenolink, I had to accept words, as well as
  2246.        numbers.  This means that BOTH do the same thing, but since
  2247.        Xenolink's vocabulary is somewhat limited, the numbers offer more
  2248.        functions.  The word equivelents can be used, but for Tempest
  2249.        programming, I recommend the numbers.  The opposites of this command
  2250.        are GETVAR, GETUSERVAR, and GETUSER.  PLEASE  NOTE:  Some of these
  2251.        commands are READ-ONLY, which means you can read them, but no
  2252.        function is avaliable to write it back out.  This has been done for
  2253.        safety's sake.  For example, you can read the name of the BBS, and
  2254.        the SYSOP's name, but it cannot be changed in the BBS.
  2255.        (The AREXX program can alter it in itself all it wants, it just
  2256.         won't be saved to the BBS....)
  2257.  
  2258.        PLEASE NOTE: ALL of these commands return a value to result.  The
  2259.        command returned will be noted after the description of the command.
  2260.  
  2261.        Please be patient here, as there are approximately 80 variations
  2262.        of this command!
  2263.  
  2264.        - The Numerical commands: Sequential Order
  2265.        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2266.        Please note that PUTUSER, SETUSERVAR, and PUTVAR can be used
  2267.        interchangedly, but since PUTVAR is faster to type, I'll be using it
  2268.        for my examples. OK?  If not, type it yerself.
  2269.  
  2270.        [SEE GETVAR COMMAND LIST, IT IS THE SAME!
  2271.  
  2272.  
  2273.        QUERY [string]
  2274.        ~~~~~~~~~~~~~~
  2275.        See 'INPUT'; Included for compatibility.
  2276.  
  2277.  
  2278.        REMOVETIME
  2279.        ~~~~~~~~~~
  2280.        Subtracts minutes from a users time online.  Pass it the number of
  2281.        minutes to subtract.
  2282.        For opposite see 'ADDTIME'.
  2283.  
  2284.  
  2285.        SCREENOUT  [string]
  2286.        ~~~~~~~~~~~~~~~~~~~
  2287.        Outputs text to the screen only, does not send to the serial.
  2288.  
  2289.  
  2290.        SENDFILE [path:Filename]
  2291.        ~~~~~~~~~~~~~~~~~~~~~~~~
  2292.        Print a file from disk to the screen.  Great for viewing ANSI files
  2293.        on the BBS, since it ignores what Tempest's "R"ead command considers
  2294.        "binary" code.  Also useful for showing scripts, startup-sequences,
  2295.        etc to other sysops, or perhaps even program code.
  2296.  
  2297.  
  2298.        SENDSTRING  [string]
  2299.        ~~~~~~~~~~~~~~~~~~~~
  2300.        Prints the formatted or unformatted [string].  NO carriage return
  2301.        OR linefeed  is added.  Useful for data positioning.  Same as MSG
  2302.        and OUTTEXT.
  2303.  
  2304.  
  2305.        SETNODESTATUS
  2306.        ~~~~~~~~~~~~~
  2307.        Currently not defined, and is ignored. No result returned.
  2308.  
  2309.  
  2310.        SETUSERVAR  [parameter to alter] [altering value]
  2311.        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2312.        This is a clone of PUTUSER and PUTVAR.  See those for function and
  2313.        paramter settings.
  2314.  
  2315.  
  2316.        SHUTDOWN
  2317.        ~~~~~~~~
  2318.        Does nothing, added for compatibility.
  2319.  
  2320.  
  2321.        SYSOPLOG
  2322.        ~~~~~~~~
  2323.        See 'LOGENTRY'; Included for compatibility.
  2324.  
  2325.  
  2326.        TIMEONLINE
  2327.        ~~~~~~~~~~
  2328.        See 'TIMEREMAINING'; Included for compatibility.
  2329.  
  2330.  
  2331.        TIMEREMAINING
  2332.        ~~~~~~~~~~~~~
  2333.        Returns the time left online in minutes the user has left.
  2334.  
  2335.  
  2336.        TRANSMIT
  2337.        ~~~~~~~~
  2338.        See 'MESSAGE'; Included for compatibility.
  2339.  
  2340.  
  2341.        UPLOAD
  2342.        ~~~~~~
  2343.        This command will let a user upload with internal zmodem.  You must
  2344.        handle the files yourself, they will be located in the
  2345.        work dir (Incomplete files) and work/done dir (Complete files).
  2346.        This has just been added to give the advanced programmers the
  2347.        option in their programs.
  2348.  
  2349.  
  2350.        VERSION
  2351.        ~~~~~~~
  2352.        Returns the version and date release of the BBS Software; Included
  2353.        for compatibility routines.
  2354.  
  2355.  __________________________________________________________________________
  2356.  __________________________________________________________________________
  2357.  __________________________________________________________________________
  2358.