home *** CD-ROM | disk | FTP | other *** search
/ Shareware 1 2 the Maxx / sw_1.zip / sw_1 / BBS / TG27.ZIP / TELEGARD.H < prev    next >
C/C++ Source or Header  |  1991-12-15  |  43KB  |  968 lines

  1. /*****************************************************************************/
  2. /*>                                                                         <*/
  3. /*>                     Telegard Bulletin Board System                      <*/
  4. /*>      Copyright 1988-1991 by Martin Pollard.  All rights reserved.       <*/
  5. /*>                                                                         <*/
  6. /*>                     Data Types and File Structures                      <*/
  7. /*>                                                                         <*/
  8. /*****************************************************************************/
  9.  
  10. #ifndef __TELEGARD_H
  11. #define __TELEGARD_H
  12.  
  13. #define BBS_VER     "2.7"       /* current version number */
  14.  
  15. #define MAXBOARDS       256     /* max # of message bases */
  16. #define MAXUBOARDS      256     /* max # of file bases */
  17. #define MAXPROTOCOLS    120     /* max # of transfer protocols */
  18. #define MAXEVENTS       10      /* max # of scheduled events */
  19. #define MAXARCS         8       /* max # of archivers */
  20. #define MAXMENUCMDS     50      /* max # of menu commands */
  21. #define NUMVOTEAS       10      /* max # of voting question answers */
  22. #define NUMVOTEQS       20      /* max # of voting questions */
  23.  
  24. #define ATNO            0       /* no anonymous posts allowed */
  25. #define ATYES           1       /* anonymous posts are allowed */
  26. #define ATFORCED        2       /* ALL posts are forced anonymous */
  27. #define ATDEARABBY      3       /* "Dear Abby" message base */
  28. #define ATANYNAME       4       /* users can post as ANY name they want */
  29.  
  30. #define MLOCAL          0       /* local message base */
  31. #define MNETMAIL        1       /* NetMail message base */
  32. #define MECHOMAIL       2       /* EchoMail message base */
  33. #define MGROUPMAIL      3       /* GroupMail message base */
  34.  
  35. #define MPUBLIC         0       /* post public messages only */
  36. #define MPRIVATE        1       /* post private messages only */
  37.  
  38. /*---------------------------------------------------------------------------*/
  39.  
  40. typedef unsigned char boolean;      /* Turbo Pascal "boolean" */
  41. typedef unsigned char byte;         /* Turbo Pascal "byte" */
  42. typedef signed short int integer;   /* Turbo Pascal "integer" */
  43. typedef signed long int longint;    /* Turbo Pascal "longint" */
  44. typedef unsigned char string;       /* Turbo Pascal "string" */
  45. typedef unsigned short int word;    /* Turbo Pascal "word" */
  46. typedef unsigned int bit;           /* shorthand for C bit fields */
  47.  
  48. /*---------------------------------------------------------------------------*/
  49.  
  50. typedef string acstring[21];        /* Access Control System string */
  51. typedef byte acrq[4];               /* AR flags */
  52. typedef byte clrs[2][10];           /* color records: */
  53.                                     /* [0][x] = mono  */
  54.                                     /* [1][x] = color */
  55. typedef integer secrange[256];      /* security tables */
  56.  
  57. typedef byte cpackdatetime[6];              /* packed date/time */
  58. typedef byte mzscanr[MAXBOARDS / 8];        /* msg base scan flags */
  59. typedef byte fzscanr[MAXUBOARDS / 8];       /* file base scan flags */
  60. typedef cpackdatetime mhireadr[MAXBOARDS];  /* last msg read table */
  61.  
  62. /*****************************************************************************/
  63. /*                                                                           */
  64. /*       The format of the packed date/time structure is as follows:         */
  65. /*                                                                           */
  66. /*                 Byte #0    |    Byte #1    |    Byte #2                   */
  67. /*             ===============|===============|===============               */
  68. /*             7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0               */
  69. /*             `-----------' `-------------' `-----' `-------'               */
  70. /*                RESERVED        Year        Month     Day                  */
  71. /*                              (8 bits)    (4 bits) (5 bits)                */
  72. /*                                                                           */
  73. /*                 Byte #3    |    Byte #4    |    Byte #5                   */
  74. /*             ===============|===============|===============               */
  75. /*             7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0               */
  76. /*             `-------' `---------' `---------' `-----------'               */
  77. /*               Hour      Minute      Second    1/100 Seconds               */
  78. /*             (5 bits)   (6 bits)    (6 bits)     (7 bits)                  */
  79. /*                                                                           */
  80. /*****************************************************************************/
  81.  
  82. typedef struct      /* user AC flags */
  83. {
  84.     bit rlogon : 1;         /* L - Restricted to one call a day */
  85.     bit rchat : 1;          /* C - Can't page the SysOp */
  86.     bit rvalidate : 1;      /* V - Posts marked unvalidated */
  87.     bit ramsg : 1;          /* A - Can't change the AutoMessage */
  88.     bit rpostan : 1;        /* * - Can't post anonymously */
  89.     bit rpostpvt : 1;       /* E - Can't post private */
  90.     bit rpostnet : 1;       /* N - Can't post NetMail */
  91.     bit rpost : 1;          /* P - Can't post at all */
  92.     bit rvoting : 1;        /* K - Can't vote */
  93.     bit rmsg : 1;           /* M - Force mail deletion */
  94.     bit rreserved : 1;      /* RESERVED */
  95.     bit onekey : 1;         /* onekey input mode */
  96.     bit avatar : 1;         /* user has AVATAR */
  97.     bit pause : 1;          /* pause */
  98.     bit novice : 1;         /* user is at novice help level */
  99.     bit ansi : 1;           /* user has ANSI */
  100.     bit color : 1;          /* user has color */
  101.     bit alert : 1;          /* alert SysOp when user logs on */
  102.     bit smw : 1;            /* short-message waiting for user */
  103.     bit nomail : 1;         /* user mail-box is closed */
  104.     bit fnodlratio : 1;     /* 1 - No UL/DL ratio */
  105.     bit fnopostratio : 1;   /* 2 - No post/call ratio */
  106.     bit fnofilepts : 1;     /* 3 - No file points checking */
  107.     bit fnodeletion : 1;    /* 4 - Protection from deletion */
  108. }
  109. uflags;
  110.  
  111. /*---------------------------------------------------------------------------*/
  112.  
  113. typedef struct      /* *.MIX status flags */
  114. {
  115.     bit deleted : 1;        /* is message deleted? */
  116.     bit unvalidated : 1;    /* is message unvalidated? */
  117.     bit permanent : 1;      /* is message permanent? */
  118. }
  119. msgindexstatr;
  120.  
  121. typedef struct      /* *.MIX Fido message attributes */
  122. {
  123.     bit private : 1;        /* private */
  124.     bit crash : 1;          /* crash mail */
  125.     bit received : 1;       /* received */
  126.     bit sent : 1;           /* sent */
  127.     bit fattach : 1;        /* file attached */
  128.     bit intransit : 1;      /* in-transit */
  129.     bit orphan : 1;         /* orphaned */
  130.     bit kill : 1;           /* kill after sending */
  131.     bit local : 1;          /* local message */
  132.     bit hold : 1;           /* hold for pickup */
  133.     bit unused : 1;         /* **UNUSED** */
  134.     bit freq : 1;           /* file request */
  135.     bit rreq : 1;           /* return receipt request */
  136.     bit receipt : 1;        /* return receipt message */
  137.     bit areq : 1;           /* audit request */
  138.     bit fureq : 1;          /* file update request */
  139. }
  140. fidoattrib;
  141.  
  142. typedef struct      /* *.MIX Fido message attributes (extended) */
  143. {
  144.     bit direct : 1;         /* direct to recipient */
  145.     bit immediate : 1;      /* immediate delivery */
  146.     bit delsent : 1;        /* delete when sent */
  147. }
  148. fidoxattrib;
  149.  
  150. typedef struct      /* *.MIX : Message index records */
  151. {
  152.     longint hdrptr;             /* message header pointer */
  153.     integer isreplyto;          /* reply-to message number (-1=none) */
  154.     cpackdatetime isreplytoid;  /* packed date/time of replied message */
  155.     integer numreplies;         /* number of replies to THIS message */
  156.     cpackdatetime msgdate;      /* message date/time (packed) */
  157.     byte msgdowk;               /* message day of week (0=Sun..6=Sat) */
  158.     fidoattrib attrib;          /* Fido msg attributes (see above) */
  159.     fidoxattrib xattrib;        /* extended Fido attribs (see above) */
  160.     msgindexstatr flags;        /* status flags (see above) */
  161. }
  162. msgindexrec;
  163.  
  164. typedef struct      /* *.BRD from/to information */
  165. {
  166.     byte anon;          /* anonymous type (0=no, 1/2=yes, 3="Abby", */
  167.                         /*   4="Problemed Person", 5=any name */
  168.     word usernum;       /* user number (0=none) */
  169.     word zone;          /* zone (0=none) */
  170.     word net;           /* net (0=none) */
  171.     word node;          /* node (0=none) */
  172.     word point;         /* point (0=none) */
  173.     string name[37];    /* user name (all caps) if anon=3..5, */
  174.                         /* otherwise null ('')                */
  175.     string real[37];    /* user real name (all caps) */
  176.     string alias[37];   /* user alias (all caps) */
  177. }
  178. fromtoinfo;
  179.  
  180. typedef struct      /* *.BRD : Message header records */
  181. {
  182.     longint msgptr;         /* pointer to message text */
  183.     word msglength;         /* length of message text */
  184.     word cost;              /* cost to send message (NetMail only) */
  185.     fromtoinfo fromi;       /* from user information */
  186.     fromtoinfo toi;         /* to user information */
  187.     string title[72];       /* title of message */
  188.     string datetime[20];    /* Net/Echo/Group original msg date */
  189. }
  190. mheaderrec;
  191.  
  192. /*---------------------------------------------------------------------------*/
  193.  
  194. typedef struct      /* *.DIR status flags */
  195. {
  196.     bit notval : 1;         /* if file is not validated */
  197.     bit isrequest : 1;      /* if file is offline */
  198.     bit resumelater : 1;    /* if file is resume-later */
  199. }
  200. filstat;
  201.  
  202. typedef struct      /* *.DIR : File records */
  203. {
  204.     string filename[13];    /* filename */
  205.     string description[61]; /* file description */
  206.     integer filepoints;     /* file points */
  207.     integer nacc;           /* number DLs */
  208.     byte res1;              /* RESERVED */
  209.     integer blocks;         /* # 128 byte blks */
  210.     integer owner;          /* ULer of file */
  211.     string stowner[37];     /* ULer's name */
  212.     string date[9];         /* date ULed */
  213.     integer daten;          /* numeric date ULed       */
  214.                             /* (# days since 01/01/85) */
  215.     longint vpointer;       /* pointer to verbose descr (-1=none) */
  216.     filstat filestat;       /* file status */
  217.     byte res2[10];          /* RESERVED */
  218. }
  219. ulfrec;
  220.  
  221. /*---------------------------------------------------------------------------*/
  222.  
  223. typedef struct      /* *.MNU status flags */
  224. {
  225.     bit clrscrbefore : 1;   /* C: clear screen before menu display */
  226.     bit dontcenter : 1;     /* D: don't center the menu titles! */
  227.     bit nomenuprompt : 1;   /* N: no menu prompt whatsoever? */
  228.     bit forcepause : 1;     /* P: force a pause before menu display? */
  229.     bit autotime : 1;       /* T: is time displayed automatically? */
  230. }
  231. mnuflags;
  232.  
  233. typedef struct      /* *.MNU : Menu records */
  234. {
  235.     string menuname[3][101];    /* menu name */
  236.     string directive[13];       /* help file displayed */
  237.     string tutorial[13];        /* tutorial help file */
  238.     string menuprompt[121];     /* menu prompt */
  239.     acstring acs;               /* access requirements */
  240.     string password[16];        /* password required */
  241.     string fallback[9];         /* fallback menu */
  242.     byte forcehelplevel;        /* forced help level for menu */
  243.     byte gencols;               /* generic menus: # of columns */
  244.     byte gcol[3];               /* generic menus: colors */
  245.     mnuflags menuflags;         /* menu status variables */
  246. }
  247. menurec;
  248.  
  249. typedef struct      /* *.MNU command status flags */
  250. {
  251.     bit hidden : 1;     /* H: is command ALWAYS hidden? */
  252.     bit unhidden : 1;   /* U: is command ALWAYS visible? */
  253. }
  254. cmdflags;
  255.  
  256. typedef struct      /* *.MNU : Command records */
  257. {
  258.     string ldesc[71];           /* long command description */
  259.     string sdesc[36];           /* short command description */
  260.     string ckeys[15];           /* command-execution keys */
  261.     acstring acs;               /* access requirements */
  262.     string cmdkeys[3];          /* command keys: type of command */
  263.     string mstring[51];         /* MString: command data */
  264.     cmdflags commandflags;      /* command status variables */
  265. }
  266. commandrec;
  267.  
  268. /*---------------------------------------------------------------------------*/
  269.  
  270. typedef struct      /* ZLOG.DAT : System log */
  271. {
  272.     string date[9];         /* entry date */
  273.     integer userbaud[5];    /* new user logon BPS rates   */
  274.                             /* (300,1200,2400,4800,9600+) */
  275.     integer active;         /* % activity */
  276.     integer calls;          /* # of calls */
  277.     integer newusers;       /* # of new users */
  278.     integer pubpost;        /* # of public posts */
  279.     integer privpost;       /* # of private posts */
  280.     integer netpost;        /* # of NetMail posts */
  281.     integer criterr;        /* # of critical errors */
  282.     integer uploads;        /* # of uploads */
  283.     integer downloads;      /* # of downloads */
  284.     longint uk;             /* amount ULed in K */
  285.     longint dk;             /* amount DLed in K */
  286. }
  287. zlogrec;
  288.  
  289. /*---------------------------------------------------------------------------*/
  290.  
  291. typedef struct      /* BOARDS.DAT status flags */
  292. {
  293.     bit mbrealname : 1;     /* real names are forced */
  294.     bit mbvisible : 1;      /* visible to users w/o access */
  295.     bit mbfilter : 1;       /* filter ANSI/8-bit ASCII */
  296.     bit mbstrip : 1;        /* strip center/title codes */
  297.     bit mbaddtear : 1;      /* add tear/origin lines */
  298.     bit mbtopstar : 1;      /* Top Star base (GroupMail only) */
  299.     bit mbimmune : 1;       /* immune to "twitting" */
  300.     bit mbinternet : 1;     /* special Internet (UUCP) handling */
  301. }
  302. mbflags;
  303.  
  304. typedef struct      /* BOARDS.DAT : Message base records */
  305. {
  306.     string name[41];        /* message base description */
  307.     string filename[9];     /* BRD/MIX data filename */
  308.     string msgpath[41];     /* messages pathname */
  309.     string password[21];    /* base password */
  310.     acstring acs;           /* access requirement */
  311.     acstring postacs;       /* post access requirement */
  312.     word maxmsgs;           /* max message count */
  313.     byte anonymous;         /* anonymous type */
  314.     mbflags mbstat;         /* message base status vars */
  315.     byte mbtype;            /* message base type */
  316.     byte mbpost;            /* message base posting type */
  317.     string origin[51];      /* origin line */
  318.     byte kludge_color;      /* color of kludge line */
  319.     byte quote_color;       /* color of quoted line */
  320.     byte tear_color;        /* color of tear line */
  321.     byte origin_color;      /* color of origin line */
  322.     word zone;              /* network address */
  323.     word net;               /* (zone:net/node.point) */
  324.     word node;
  325.     word point;
  326. }
  327. boardrec;
  328.  
  329. /*---------------------------------------------------------------------------*/
  330.  
  331. typedef struct      /* CONFRENC.DAT : Conference data */
  332. {
  333.     struct
  334.     {
  335.         acstring acs;       /* access requirement */
  336.         string name[41];    /* name of conference */
  337.     }
  338.     conference[27];
  339. }
  340. confrec;
  341.  
  342. /*---------------------------------------------------------------------------*/
  343.  
  344. typedef struct      /* EVENTS.DAT : Scheduled event records */
  345. {
  346.     boolean active;             /* whether active */
  347.     string description[31];     /* event description (for logs) */
  348.     string etype;               /* A:CS, C:hat, D:os call, E:xternal */
  349.     string execdata[21];        /* errorlevel if "E", commandline if "D" */
  350.     integer busytime;           /* off-hook time before; 0 if none */
  351.     integer exectime;           /* time of execution */
  352.     boolean busyduring;         /* busy phone DURING event? */
  353.     integer duration;           /* length of time event takes */
  354.     byte execdays;              /* bitwise execution days,    */
  355.                                 /* or day of month if monthly */
  356.     boolean monthly;            /* monthly event? */
  357. }
  358. eventrec;
  359.  
  360. /*---------------------------------------------------------------------------*/
  361.  
  362. typedef struct      /* GFILES.DAT status flags */
  363. {
  364.     bit tbunhidden : 1;     /* whether *VISIBLE* to users w/o access */
  365.     bit tbreserved1 : 1;    /* RESERVED FLAG #1 */
  366.     bit tbreserved2 : 1;    /* RESERVED FLAG #2 */
  367. }
  368. tbflags;
  369.  
  370. typedef struct      /* GFILES.DAT : Text-file records */
  371. {
  372.     string title[41];   /* title */
  373.     string filen[13];   /* filename */
  374.     string gdate[9];    /* date of Tfile / Tfile base */
  375.     integer gdaten;     /* numeric date for fast calculation */
  376.     acstring acs;       /* access requirement */
  377.     acstring ulacs;     /* upload to base access requirement */
  378.     tbflags tbstat;     /* text-file base status vars */
  379.     byte res[10];       /* RESERVED */
  380. }
  381. tfilerec;
  382.  
  383. /*---------------------------------------------------------------------------*/
  384.  
  385. typedef struct      /* LASTON.DAT : Last few callers records */
  386. {
  387.     longint callernum;      /* system caller number */
  388.     string name[37];        /* user name of caller */
  389.     integer number;         /* user number of caller */
  390.     string citystate[31];   /* city/state of caller */
  391. }
  392. lcallers;
  393.  
  394. /*---------------------------------------------------------------------------*/
  395.  
  396. typedef struct      /* MACROS.LST : Keyboard macro records */
  397. {
  398.     string macro[4][241];
  399. }
  400. macrorec;
  401.  
  402. /*---------------------------------------------------------------------------*/
  403.  
  404. typedef struct      /* MODEM.DAT status flags */
  405. {
  406.     bit lockedport : 1;     /* COM port locked at constant rate */
  407.     bit xonxoff : 1;        /* XON/XOFF (software) flow control */
  408.     bit ctsrts : 1;         /* CTS/RTS (hardware) flow control */
  409. }
  410. modemflags;
  411.  
  412. typedef struct      /* MODEM.DAT : Modem configuration */
  413. {
  414.     word waitbaud;              /* wait bps */
  415.     byte comport;               /* COM port number */
  416.     string init[81];            /* initialization string */
  417.     string answer[41];          /* answer string */
  418.     string hangup[41];          /* hangup string */
  419.     string offhook[41];         /* phone off-hook string */
  420.     integer nocallinittime;     /* reinit modem after x mins of inactivity */
  421.     word lockedportbaud;        /* bps rate to use when COM port locked */
  422.     modemflags flags;           /* status flags (see above) */
  423.     byte nocarrier;             /* NO CARRIER result code */
  424.     byte resultcode[2][8];      /* CONNECT result codes:                    */
  425.                                 /* 300,1200,2400,4800,7200,9600,12000,14400 */
  426. }
  427. modemrec;
  428.  
  429. /*---------------------------------------------------------------------------*/
  430.  
  431. typedef struct      /* NAMES.LST : Sorted names listing */
  432. {
  433.     string name[37];    /* user name */
  434.     integer number;     /* user number */
  435. }
  436. smalrec;
  437.  
  438. /*---------------------------------------------------------------------------*/
  439.  
  440. typedef struct      /* NETWORK.DAT status flags */
  441. {
  442.     bit nstrip : 1;         /* strip message codes? */
  443.     bit naddtear : 1;       /* add tear/origin lines to Net/Group? */
  444.     bit nholduser : 1;      /* hold all non-SysOp NetMail? */
  445.     bit nhold : 1;          /* default NetMail to "hold"? */
  446.     bit ncrash : 1;         /* default NetMail to "crash"? */
  447.     bit nkill : 1;          /* default NetMail to "kill/sent"? */
  448. }
  449. netflags;
  450.  
  451. typedef struct      /* NETWORK.DAT : Network information */
  452. {
  453.     word zone;              /* network address       */
  454.     word net;               /* (zone:net/node.point) */
  455.     word node;
  456.     word point;
  457.     string origin[51];      /* origin line */
  458.     byte kludge_color;      /* color of kludge line */
  459.     byte quote_color;       /* color of quoted text */
  460.     byte tear_color;        /* color of tear line */
  461.     byte origin_color;      /* color of origin line */
  462.     netflags flags;         /* status flags */
  463.     string netpath[41];     /* NetMail path */
  464.     string echopath[41];    /* EchoMail path */
  465.     string grouppath[41];   /* GroupMail path */
  466.     string nodepath[41];    /* nodelist path */
  467. }
  468. networkrec;
  469.  
  470. /*---------------------------------------------------------------------------*/
  471.  
  472. typedef struct      /* NODELIST.DAT status flags */
  473. {
  474.     bit hub : 1;        /* node is a net hub */
  475.     bit host : 1;       /* node is a net host */
  476.     bit region : 1;     /* node is region coord */
  477.     bit zone : 1;       /* node is a zone coord */
  478.     bit cm : 1;         /* runs continuous mail */
  479.     bit ores1 : 1;      /* reserved for Opus */
  480.     bit ores2 : 1;      /* reserved for Opus */
  481.     bit ores3 : 1;      /* reserved for Opus */
  482.     bit ores4 : 1;      /* reserved for Opus */
  483.     bit ores5 : 1;      /* reserved for Opus */
  484.     bit nores1 : 1;     /* reserved for non-Opus */
  485.     bit nores2 : 1;     /* reserved for non-Opus */
  486.     bit nores3 : 1;     /* reserved for non-Opus */
  487.     bit nores4 : 1;     /* reserved for non-Opus */
  488.     bit nores5 : 1;     /* reserved for non-Opus */
  489.     bit nores6 : 1;     /* reserved for non-Opus */
  490. }
  491. nodeflags;
  492.  
  493. typedef struct      /* NODELIST.DAT modem type flags */
  494. {
  495.     bit hst : 1;    /* node uses a USRobotics HST modem */
  496.     bit pep : 1;    /* node uses a Telebit PEP modem */
  497.     bit v32 : 1;    /* node uses a V.32 modem */
  498.     bit v32b : 1;   /* node uses a V.32bis modem */
  499.     bit h96 : 1;    /* node uses a Hayes Express96 modem */
  500. }
  501. modemtypes;
  502.  
  503. typedef struct      /* NODELIST.DAT : Version 6 nodelist data */
  504. {
  505.     integer net;            /* net number */
  506.     integer node;           /* node number */
  507.     integer cost;           /* cost per minute to call */
  508.     string name[34];        /* node name */
  509.     string phone[40];       /* phone number */
  510.     string city[30];        /* city and state */
  511.     string password[8];     /* password */
  512.     integer realcost;       /* phone company's charge */
  513.     integer hubnode;        /* node # of this node's hub (0=none) */
  514.     byte rate;              /* actual bps rate divided by 300 */
  515.     modemtypes modem;       /* modem type codes */
  516.     nodeflags flags;        /* set of flags */
  517.     byte res[2];            /* RESERVED */
  518. }
  519. nodedatarec;
  520.  
  521. typedef struct      /* NODELIST.IDX : Version 6 nodelist index */
  522. {
  523.     integer node;       /* node number */
  524.     integer net;        /* net number */
  525. }
  526. nodeindexrec;
  527.  
  528. /*---------------------------------------------------------------------------*/
  529.  
  530. typedef struct      /* PROTOCOL.DAT status flags */
  531. {
  532.     bit xbactive : 1;           /* is protocol active? */
  533.     bit xbisbatch : 1;          /* is batch definition? */
  534.     bit xbisresume : 1;         /* is resume definition? */
  535.     bit xbxferokcode : 1;       /* does result code = xfer OK? */
  536. }
  537. xbflags;
  538.  
  539. typedef struct      /* PROTOCOL.DAT : File transfer protocols */
  540. {
  541.     xbflags xbstat;         /* protocol flags */
  542.     string ckeys[15];       /* command keys */
  543.     string descr[41];       /* description */
  544.     acstring acs;           /* access string */
  545.     string templog[26];     /* temp. log file */
  546.     string uloadlog[26];    /* permanent log files */
  547.     string dloadlog[26];
  548.     string ulcmd[79];       /* UL/DL command lines */
  549.     string dlcmd[79];
  550.     string ulcode[6][7];    /* UL/DL codes */
  551.     string dlcode[6][7];
  552.     string envcmd[61];      /* environment setup cmd (B) */
  553.     string dlflist[26];     /* DL file lists (B) */
  554.     integer maxchrs;        /* max chrs in cmdline */
  555.     integer logpf;          /* pos in log file for data (B) */
  556.     integer logps;
  557.     byte res[15];           /* RESERVED */
  558. }
  559. protrec;
  560.  
  561. /*---------------------------------------------------------------------------*/
  562.  
  563. typedef struct      /* SHORTMSG.DAT : One-line messages */
  564. {
  565.     string msg[161];    /* message */
  566.     integer destin;     /* destination user # (-1=deleted) */
  567. }
  568. smr;
  569.  
  570. /*---------------------------------------------------------------------------*/
  571.  
  572. typedef struct      /* STATUS.DAT archive configuration records */
  573. {
  574.     boolean active;         /* whether this archive format is active */
  575.     string ext[4];          /* 3-char file extension */
  576.     string listline[26];    /* view archive cmdline ('' for internal) */
  577.     string arcline[26];     /* compression cmdline */
  578.     string unarcline[26];   /* de-compression cmdline */
  579.     string testline[26];    /* integrity test cmdline ('' for *None*) */
  580.     string cmtline[26];     /* comment cmdline ('' for *None*) */
  581.     integer succlevel;      /* success ERRORLEVEL (-1=ignore results) */
  582. }
  583. filearcinforec;
  584.  
  585. typedef struct      /* STATUS.DAT : System configuration */
  586. {
  587.     string gfilepath[80];       /* GFILES path (data files) */
  588.     string afilepath[80];       /* AFILES path (text files) */
  589.     string menupath[80];        /* MENUS path (system menu files) */
  590.     string trappath[80];        /* LOGS path (trap/chat/log files) */
  591.     string msgpath[80];         /* MSGS path (msg base data files) */
  592.     string tfilepath[80];       /* TFILES path (Tfiles base files) */
  593.     string temppath[80];        /* TEMP path (temporary files) */
  594.  
  595.     string bbsname[81];         /* BBS name */
  596.     string bbsphone[13];        /* BBS phone number */
  597.     string sysopname[31];       /* SysOp's full name or alias */
  598.     integer maxusers;           /* max number of users system can have */
  599.     integer lowtime;            /* SysOp begin minute (in minutes) */
  600.     integer hitime;             /* SysOp end time */
  601.     integer dllowtime;          /* normal downloading hours */
  602.     integer dlhitime;
  603.     boolean shuttlelog;         /* is Shuttle Logon active? */
  604.     boolean lock300;            /* lock out 300 baud? */
  605.     string sysoppw[21];         /* SysOp PW */
  606.     string newuserpw[21];       /* newuser PW (or NULL if none) */
  607.     string shuttlepw[21];       /* Shuttle PW (if Shuttle active) */
  608.     integer b300lowtime;        /* 300 baud calling hours */
  609.     integer b300hitime;
  610.     integer b300dllowtime;      /* 300 baud DL hours */
  611.     integer b300dlhitime;
  612.     boolean closedsystem;       /* DON'T allow new users? */
  613.     boolean swapshell;          /* is swap shell function enabled? */
  614.     integer eventwarningtime;   /* time before event warning */
  615.     string tfiledate[9];        /* last date text-files were inserted */
  616.     byte swapshelltype;         /* swap shell type (0=disk,1=EMS) */
  617.  
  618.     byte res1[23];              /* RESERVED SPACE #1 */
  619.  
  620.     acstring sop;               /* SysOp */
  621.     acstring csop;              /* Co-SysOp */
  622.     acstring msop;              /* Message SysOp */
  623.     acstring fsop;              /* File SysOp */
  624.     acstring spw;               /* SysOp PW at logon */
  625.     acstring seepw;             /* see SysOp PWs remotely  */
  626.     acstring normpubpost;       /* post public messages */
  627.     acstring normprivpost;      /* post private messages */
  628.     acstring anonpubread;       /* see who posted public anon */
  629.     acstring anonprivread;      /* see who posted private anon */
  630.     acstring anonpubpost;       /* post anon public messages */
  631.     acstring anonprivpost;      /* post anon private messages */
  632.     acstring seeunval;          /* see unvalidated files */
  633.     acstring dlunval;           /* DL unvalidated files */
  634.     acstring nodlratio;         /* no UL/DL ratio */
  635.     acstring nopostratio;       /* no post/call ratio */
  636.     acstring nofilepts;         /* no file points checking */
  637.     acstring ulvalreq;          /* uploads require validation by SysOp */
  638.     acstring normnetpost;       /* post NetMail messages */
  639.  
  640.     string fsecmd[41];          /* full screen editor command */
  641.  
  642.     byte res2[38];              /* RESERVED SPACE #2 */
  643.  
  644.     byte maxprivpost;           /* max private posts per call */
  645.     byte maxnetpost;            /* max NetMail posts per call */
  646.     byte maxpubpost;            /* max public posts per call */
  647.     byte maxchat;               /* max chat-pages per call */
  648.  
  649.     byte res3[4];               /* RESERVED SPACE #3 */
  650.  
  651.     byte maxlogontries;         /* tries allowed for PW's at logon */
  652.     byte bsdelay;               /* backspacing delay */
  653.     byte sysopcolor;            /* SysOp color in chat mode */
  654.     byte usercolor;             /* user color in chat mode */
  655.     integer minspaceforpost;    /* minimum K drive space left to post */
  656.     integer minspaceforupload;  /* minimum K drive space left to upload */
  657.     byte backsysoplogs;         /* days to keep SYSOP##.LOG */
  658.     byte wfcblanktime;          /* minutes after which to blank WFC menu */
  659.     byte linelen;               /* default video line length */
  660.     byte pagelen;               /* default video page length */
  661.  
  662.     byte res4[18];              /* RESERVED SPACE #4 */
  663.  
  664.     boolean specialfx;          /* WFC menu "special effects" */
  665.     boolean logonlogoff;        /* enable LOGON.BAT & LOGOFF.BAT? */
  666.     boolean allowalias;         /* allow alias's? (handles) */
  667.     boolean phonepw;            /* use phone number password in logon? */
  668.     boolean localsec;           /* is local security ON? */
  669.     boolean localscreensec;     /* is local screen-security ON? */
  670.     boolean globaltrap;         /* trap ALL USER'S activity? */
  671.     boolean autochatopen;       /* does chat buffer auto-open? */
  672.     boolean autominlogon;       /* Auto-Message in logon? */
  673.     boolean bullinlogon;        /* bulletins in logon? */
  674.     boolean lcallinlogon;       /* "Last Few Callers" list in logon? */
  675.     boolean yourinfoinlogon;    /* "Your Info" in logon? */
  676.     boolean multitask;          /* is BBS multitasking? */
  677.     boolean offhooklocallogon;  /* take phone off-hook for local logons? */
  678.     boolean forcevoting;        /* is manditory logon voting active? */
  679.     boolean compressbases;      /* "compress" file/message base numbers? */
  680.     boolean searchdup;          /* search for dup. filenames when UL? */
  681.     byte slogtype;              /* SysOp log type: File/Printer/Both */
  682.     boolean stripclog;          /* strip colors from SysOp log output? */
  683.     integer newapp;             /* user# to send new user application to */
  684.     integer guestuser;          /* user# of guest user account */
  685.     integer timeoutbell;        /* minutes before time-out bell */
  686.     integer timeout;            /* minutes before timeout (logoff) */
  687.     boolean usewfclogo;         /* whether to use WFC menu logo */
  688.     boolean useems;             /* attempt to use EMS for overlay */
  689.     boolean usebios;            /* use ROM BIOS for local video output */
  690.     boolean cgasnow;            /* suppress snow on CGA systems */
  691.  
  692.     byte res5[16];              /* RESERVED SPACE #5 */
  693.  
  694.     filearcinforec
  695.         filearcinfo[MAXARCS];       /* archive specs */
  696.     string filearccomment[3][81];   /* BBS comments for archives */
  697.  
  698.     boolean uldlratio;          /* are UL/DL ratios active? */
  699.     boolean fileptratio;        /* is auto file-pt compensation active? */
  700.     byte fileptcomp;            /* file point compensation ratio */
  701.     byte fileptcompbasesize;    /* file point "base compensation size" */
  702.     byte ulrefund;              /* percent time refund for ULs */
  703.     byte tosysopdir;            /* "To SysOp" file base */
  704.     boolean validateallfiles;   /* validate ALL FILES automatically? */
  705.     string remdevice[11];       /* remote output device (GATEx,COMx,etc) */
  706.     integer maxintemp;          /* max K allowed in TEMP\3\ */
  707.     integer minresume;          /* min K to allow resume-later */
  708.     byte maxdbatch;             /* max files in DL batch queue */
  709.     byte maxubatch;             /* max files in UL batch queue */
  710.     byte unlistfp;              /* # of file points for unlisted DLs */
  711.  
  712.     byte res6[21];              /* RESERVED SPACE #6 */
  713.  
  714.     longint newcredit;          /* newuser NetMail credit */
  715.     longint autocredit;         /* auto-validation NetMail credit */
  716.     byte newsl;                 /* newuser SL */
  717.     byte newdsl;                /* newuser DSL */
  718.     acrq newar;                 /* newuser AR */
  719.     uflags newac;               /* newuser AC */
  720.     integer newfp;              /* newuser file points */
  721.     byte autosl;                /* auto-validation SL */
  722.     byte autodsl;               /* auto-validation DSL */
  723.     acrq autoar;                /* auto-validation AR */
  724.     uflags autoac;              /* auto-validation AC */
  725.  
  726.     string allstartmenu[9];     /* logon menu to start ALL users on */
  727.  
  728.     byte res7[22];              /* RESERVED SPACE #7 */
  729.  
  730.     string batchfileext[4];     /* batch filename extension */
  731.     string bulletprefix[9];     /* default bulletins filename prefix */
  732.  
  733.     byte res8[15];              /* RESERVED SPACE #8 */
  734.  
  735.     secrange timeallow;         /* time allowance */
  736.     secrange callallow;         /* call allowance */
  737.     secrange dlratio;           /* # ULs/# DLs ratios */
  738.     secrange dlkratio;          /* DLk/ULk ratios */
  739.     secrange postratio;         /* post/call ratios */
  740.  
  741.     string lastdate[9];         /* last system date */
  742.     byte curwindow;             /* type of SysOp window currently in use */
  743.     boolean istopwindow;        /* is SysOp window on top of screen? */
  744.     longint callernum;          /* total number of callers */
  745.     integer numusers;           /* number of users */
  746.     zlogrec todayzlog;          /* TODAY's ZLOG record */
  747.     integer postcredits;        /* file points/upload credit */
  748.                                 /* compensation for posts    */
  749.     boolean rebootforevent;     /* reboot before events? */
  750.     boolean watchdogdoor;       /* WatchDog active in doors? */
  751.     boolean windowon;           /* is SysOp window on? */
  752.     string swappath[80];        /* swap shell path */
  753.     string arcpath[41];         /* archive utility path */
  754.     string protpath[41];        /* protocol driver path */
  755.  
  756.     byte res9[35];              /* RESERVED SPACE #9 */
  757.  
  758.     word versionid;             /* version (eg 0x0270 = v2.7) */
  759. }
  760. systatrec;
  761.  
  762. /*---------------------------------------------------------------------------*/
  763.  
  764. typedef struct      /* STRING.DAT : User-definable strings */
  765. {
  766.     string ansiq[81];           /* "Do you want ANSI? " string */
  767.     string note[2][81];         /* Logon notes (L #1-2) */
  768.     string lprompt[81];         /* Logon prompt (L #3) */
  769.     string echoc;               /* Echo char for PWs */
  770.     string sysopin[81];         /* "SysOp In" (inside SysOp hours)*/
  771.     string sysopout[81];        /* "SysOp Out" */
  772.     string engage[81];          /* "Engage Chat" */
  773.     string endchat[81];         /* "End Chat" */
  774.     string wait[81];            /* "SysOp Working" */
  775.     string pause[81];           /* "Pause" */
  776.     string entermsg1[81];       /* "Enter Message" line #1 */
  777.     string entermsg2[81];       /* "Enter Message" line #2 */
  778.     string newscan1[81];        /* "NewScan begin" */
  779.     string newscan2[81];        /* "NewScan done" */
  780.     string scanmessage[81];     /* Message scanning prompt */
  781.     string automsgt[81];        /* Auto-Message title */
  782.     string autom;               /* Auto-Message border characters */
  783.  
  784.     string shelldos1[81];       /* " >> SysOp shelling to DOS ..." */
  785.     string shelldos2[81];       /* " ... thank you for waiting." */
  786.     string chatcall1[81];       /* "Paging SysOp, please wait..." */
  787.     string chatcall2[81];       /* ">>><*><<<" */
  788.     string guestline[81];       /* "To be a guest ... " */
  789.     string namenotfound[81];    /* "Name NOT found in user list." */
  790.     string bulletinline[81];    /* Bulletin line */
  791.     string thanxvote[81];       /* "Thanks for voting" */
  792.  
  793.     string listline[81];        /* "List files - P to pause" */
  794.     string newline[81];         /* "Search for new files -" */
  795.     string searchline[81];      /* "Search all dirs for file mask" */
  796.     string findline1[81];       /* "Search for descriptions... " */
  797.     string findline2[81];       /* "Enter the string to search for.." */
  798.     string downloadline[81];    /* "Download - " */
  799.     string uploadline[81];      /* "Upload - " */
  800.     string viewline[81];        /* "View interior files - " */
  801.     string nofilepts[81];       /* "Insufficient file points." */
  802.     string unbalance[81];       /* "Your UL/DL ratio is unbalanced" */
  803.  
  804.     string pninfo[81];          /* "P to Pause, N for next dir" */
  805.     string gfnline1[81];        /* "[Enter]=All files" */
  806.     string gfnline2[81];        /* "File mask: " */
  807.     string batchadd[81];        /* "File added to batch queue." */
  808.  
  809.     string quotestr1[51];       /* message quote header #1 */
  810.     string quotestr2[51];       /* message quote header #2 */
  811.  
  812.     string mtaskline[81];       /* "System Under Multi-Tasking..." */
  813. }
  814. fstringrec;
  815.  
  816. /*---------------------------------------------------------------------------*/
  817.  
  818. typedef struct      /* UPLOADS.DAT status flags */
  819. {
  820.     bit fbnoratio : 1;          /* if <No Ratio> active */
  821.     bit fbunhidden : 1;         /* whether *VISIBLE* to users w/o access */
  822.     bit fbdirdlpath : 1;        /* if *.DIR file stored in DLPATH */
  823.     bit fbreserved1 : 1;        /* RESERVED FLAG #1 */
  824.     bit fbusegifspecs : 1;      /* whether to use GifSpecs */
  825.     bit fbreserved2 : 1;        /* RESERVED FLAG #2 */
  826. }
  827. fbflags;
  828.  
  829. typedef struct      /* UPLOADS.DAT : File base records */
  830. {
  831.     string name[41];        /* area description */
  832.     string filename[13];    /* filename + ".DIR" */
  833.     string dlpath[41];      /* download path */
  834.     string ulpath[41];      /* upload path */
  835.     integer maxfiles;       /* max files allowed (1-2000) */
  836.     string password[21];    /* password required */
  837.     byte arctype;           /* wanted archive type (1..max,0=inactive) */
  838.     byte cmttype;           /* wanted comment type (1..3,0=inactive) */
  839.     byte res1[2];           /* RESERVED SPACE #1 */
  840.     fbflags fbstat;         /* file base status vars */
  841.     acstring acs;           /* access requirements */
  842.     acstring ulacs;         /* upload requirements */
  843.     acstring nameacs;       /* see-names requirements */
  844.     byte res2[10];          /* RESERVED SPACE #2 */
  845. }
  846. ulrec;
  847.  
  848. /*---------------------------------------------------------------------------*/
  849.  
  850. typedef struct      /* USER.LST status flags */
  851. {
  852.     bit lockedout : 1;          /* if locked out */
  853.     bit udeleted : 1;           /* if deleted */
  854.     bit trapactivity : 1;       /* if trapping users activity */
  855.     bit trapseperate : 1;       /* if trap to seperate TRAP file */
  856.     bit chatauto : 1;           /* if auto chat trapping */
  857.     bit chatseperate : 1;       /* if seperate chat file to trap to */
  858.     bit slogseperate : 1;       /* if seperate SysOp log */
  859.     bit clsmsg : 1;             /* if clear-screen before message */
  860.     bit avadjust : 1;           /* if AVATAR color adjust */
  861. }
  862. userflags;
  863.  
  864. typedef struct      /* USER.LST : User account records */
  865. {
  866.  
  867.     /* configuration information */
  868.  
  869.     string name[37];            /* user name */
  870.     string realname[37];        /* real name */
  871.     string street[31];          /* mailing address */
  872.     string citystate[31];       /* city, state */
  873.     string zipcode[11];         /* zipcode */
  874.     string ph[13];              /* user phone # */
  875.     string bday[9];             /* user birthdate */
  876.     string sex;                 /* user sex */
  877.  
  878.     string pw[21];              /* user password */
  879.     string firston[9];          /* firston date */
  880.     string laston[9];           /* laston date */
  881.  
  882.     string computer[31];        /* type of computer */
  883.     string occupation[41];      /* occupation */
  884.     string wherebbs[41];        /* BBS reference */
  885.     string note[40];            /* SysOp note */
  886.  
  887.     string lockedfile[9];       /* lockout msg to print */
  888.     clrs cols;                  /* user colors */
  889.     byte linelen;               /* line length (# cols) */
  890.     byte pagelen;               /* page length (# rows) */
  891.     longint mpointer;           /* pointer to entry in MACRO.LST */
  892.     string userstartmenu[9];    /* menu to start user out on */
  893.  
  894.     userflags flags;            /* flags (see above) */
  895.  
  896.     /* system access information */
  897.  
  898.     byte sl;                    /* SL */
  899.     byte dsl;                   /* DSL */
  900.     uflags ac;                  /* user flags */
  901.     acrq ar;                    /* AR flags */
  902.  
  903.     /* message system information */
  904.  
  905.     byte lastmsg;               /* last message base # */
  906.     integer pubpost;            /* # public posts */
  907.     integer privpost;           /* # private posts */
  908.     integer netpost;            /* # NetMail posts */
  909.     integer forusr;             /* forward mail to user # */
  910.     longint credit;             /* NetMail points (credit) */
  911.     longint debit;              /* NetMail points (debit) */
  912.     mhireadr mhiread;           /* NewScan high message pointers */
  913.     mzscanr mzscan;             /* NewScan message bases */
  914.     byte boardsysop[5];         /* msg board SysOp */
  915.  
  916.     /* file system information */
  917.  
  918.     byte lastfil;               /* last file base # */
  919.     integer uploads;            /* # of ULs */
  920.     integer downloads;          /* # of DLs */
  921.     longint uk;                 /* amount ULed (kilobytes) */
  922.     longint dk;                 /* amount DLed (kilobytes) */
  923.     integer filepoints;         /* # of file points */
  924.     byte flistopt;              /* type of file list type to use */
  925.     fzscanr fzscan;             /* NewScan file bases */
  926.  
  927.     /* system usage information */
  928.  
  929.     longint ttimeon;            /* total mins spent on */
  930.     integer loggedon;           /* # times logged on */
  931.     integer tltoday;            /* # min left today */
  932.     byte ontoday;               /* # times on today */
  933.     byte illegal;               /* # illegal logon attempts */
  934.  
  935.     /* miscellaneous information */
  936.  
  937.     byte vote[20];              /* voting data */
  938.     integer timebank;           /* # mins in Time Bank */
  939.     integer timebankadd;        /* time added to timebank TODAY */
  940. }
  941. userrec;
  942.  
  943. /*---------------------------------------------------------------------------*/
  944.  
  945. typedef struct      /* VERBOSE.DAT : Verbose descriptions */
  946. {
  947.     string descr[4][51];
  948. }
  949. verbrec;
  950.  
  951. /*---------------------------------------------------------------------------*/
  952.  
  953. typedef struct      /* VOTING.DAT : Voting records */
  954. {
  955.     string question[80];    /* voting question */
  956.     integer numa;           /* number of user's who have answered */
  957.     struct
  958.     {
  959.         string ans[41];     /* answer description */
  960.         integer numres;     /* # user's who picked this answer */
  961.     }
  962.     answ[NUMVOTEAS];
  963. }
  964. vdatar;
  965.  
  966. #endif
  967.  
  968.