home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / CON-004C.ZIP / CONCORD.ZIP / STRUCT.INC < prev    next >
Encoding:
Text File  |  1996-05-12  |  67.1 KB  |  1,160 lines

  1. (*****************************************************************************)
  2. (*                                                                           *)
  3. (*                            Concord BBS software                           *)
  4. (*                                                                           *)
  5. (*                  Copyright (C) 1993,96 by Pasi Talliniemi                 *)
  6. (*                                                                           *)
  7. (*****************************************************************************)
  8.  
  9. (* THIS FILE CONTAINS DATA STRUCTURES OF CONCORD DATA FILES.                 *)
  10. (* All files should be opened in Filemode 66 (Read/Write, DenyNone) mode     *)
  11. (* unless wanted to reserve them for the duration of certain processes.      *)
  12.  
  13. const
  14.  
  15.  SOFTWARE_NAME    = 'Concord';               (* Software name .............. *)
  16.  SOFTWARE_COPYRIGHT = 'Copyright ' +         (* Copyright notice of software *)
  17.    '(c) 1993,96 by Pasi Talliniemi';
  18.  ID_VER           = $00001A9E;               (* Concord data file ID ....... *)
  19.  CURRVERNUM       = 2;                       (* Version number in number fmt *)
  20.  SOFTWARE_VERSION = 'O.O1 Gamma-4';          (* Version number in string fmt *)
  21.  DEF_TEARLINE     = 'OO1C4';             (* Tear line; x+OS2,P+x+DOS,R+x+DOS *)
  22.  
  23. (* Define tear lines for each version .. *) {$IFDEF OS2}
  24. SOFTWARE_TEAR =       DEF_TEARLINE + 'OS2'; {$ELSE} {$IFDEF PROTMODE}
  25. SOFTWARE_TEAR = 'P' + DEF_TEARLINE + 'DOS'; {$ELSE}
  26. SOFTWARE_TEAR = 'R' + DEF_TEARLINE + 'DOS'; {$ENDIF} {$ENDIF}
  27.  
  28.          MAX_FLAG     = 10;
  29.          MAX_LIMITBPS =  7;
  30.          MAX_GOSUB    = 20;
  31.  
  32. type
  33.  
  34.          SmallInt     = System.Integer;               (* 16-bit   signed int *)
  35.          SmallWord    = System.Word;                  (* 16-bit unsigned int *)
  36.  
  37.          ErrorType    = LongInt;                  (* 0 = OK, 1-65535 = ERROR *)
  38.  
  39.          (* Prepare for LONG file names *)
  40.          PathStr      = String [79];
  41.          DirStr       = String [67];
  42.          ExtStr       = String [04];
  43.  
  44.          ANameStr     = String [60];
  45.          NameStr      = String [35];
  46.          CityStr      = String [25];
  47.          PhoneStr     = String [20];
  48.          PassStr      = String [15];
  49.          DefStr       = String [15];
  50.          QWKStr       = String [12];
  51.          OpenStr      = String [11];
  52.          MenuStr      = String [08];
  53.          GroupStr     = String [03];
  54.  
  55.          DateRec      = SmallWord;                    (* Packed DOS format   *)
  56.                                                       (* Bits 0 - 4  : Day   *)
  57.                                                       (* Bits 5 - 8  : Month *)
  58.                                                       (* Bits 9 - 15 : Year  *)
  59.  
  60.          TimeRec      = SmallWord;                    (* Minutes after 00:00 *)
  61.          DateTimeRec  = LongInt;                      (* UNIX time stamp     *)
  62.  
  63.          CRC32        = LongInt;
  64.  
  65.          FlagType     = Array [1..MAX_FLAG] of Byte;     (* Flags, bitmapped *)
  66.  
  67.          LimitBpsType = Array [1..MAX_LIMITBPS] of SmallWord;
  68.  
  69.          Security     = Record
  70.            Bpsrate  : SmallWord;                 (* Current BPS rate div 100 *)
  71.            Age      : Byte;                      (* Age  . . . . . . . . . . *)
  72.            SecLvl   : SmallWord;                 (* Security Level . . . . . *)
  73.            Flags    : FlagType;                  (* Flags ON . . . . . . . . *)
  74.            NotFlags : FlagType;                  (* Flags OFF  . . . . . . . *)
  75.          end;                                    (* Size 25 bytes  . . . . . *)
  76.  
  77.          AddrRec      = Record
  78.            Zone  : SmallWord;                                       (* Zone  *)
  79.            Net   : SmallWord;                                       (* Net   *)
  80.            Node  : SmallWord;                                       (* Node  *)
  81.            Point : SmallWord;                                       (* Point *)
  82.          end;
  83.  
  84.          NetRec       = Record
  85.            NetName : DefStr;                       (* Name of current net    *)
  86.            NetAddr : AddrRec;                      (* Address of current net *)
  87.          end;
  88.  
  89.          FileMaskType = Array [1..11] of Char;
  90.  
  91. const
  92.  
  93.          LimitBpsrates : LimitBpsType = (
  94.            12, 24, 96, 144, 192, 288, 1152
  95.          );
  96.  
  97. const
  98.  
  99.          ID_LOG       = ID_VER or $00010000;
  100.          ID_LOG_SYS   = ID_LOG or $01000000;
  101.          ID_LOG_CHAT  = ID_LOG or $02000000;
  102.          LOG_USERIN   = $0001;  (* User logged in (name,NEW,alias,sec,IEMSI) *)
  103.          LOG_USEROUT  = $0002;  (* User logged off (normal,nocarrier,forced) *)
  104.          LOG_EXEC     = $0003;  (* External program executed (cmdline)       *)
  105.          LOG_UPLOAD   = $0004;  (* File downloaded (protocol,cps,size,name)  *)
  106.          LOG_DOWNLOAD = $0005;  (* File uploaded (protocol,cps,size,name)    *)
  107.          LOG_WRITE    = $0006;  (* Msg written (msgnum,area,subject,towhom)  *)
  108.          LOG_PAGE     = $0007;  (* Sysop paged (reason)                      *)
  109.          LOG_SCRIPT   = $0008;  (* Script executed (scriptname)              *)
  110.          LOG_ERROR    = $0009;  (* Fatal error occurred (number, definition) *)
  111.          LOG_OTHER    = $FFFF;  (* Other command (text)                      *)
  112.  
  113. type
  114.  
  115.          SysLogIdxRec = Record   (* LOGSYS.I?? - Log index file              *)
  116.            StartPos : LongInt;   (* Absolute start position in log text file *)
  117.          end;
  118.  
  119. (*****************************************************************************)
  120. (*                                                                           *)
  121. (*                           O T H E R   F I L E S                           *)
  122. (*                                                                           *)
  123. (*****************************************************************************)
  124.  
  125. const
  126.  
  127.          ID_SYS        = ID_VER or $00020000;
  128.          ID_SYS_BBSLST = ID_SYS or $01000000;
  129.          ID_SYS_CMNT   = ID_SYS or $02000000;
  130.          ID_SYS_LAST   = ID_SYS or $03000000;
  131.  
  132.          BBSLIST_ACTIVE = $01;                            (* Bit 0 - Active? *)
  133.  
  134.          LAST_DOWNLOADED = $01;                  (* Bit 0 : Downloaded       *)
  135.          LAST_UPLOADED   = $02;                  (* Bit 1 : Uploaded         *)
  136.          LAST_READ       = $04;                  (* Bit 2 : Read messages    *)
  137.          LAST_WROTE      = $08;                  (* Bit 3 : Wrote message(s) *)
  138.          LAST_PAGED      = $10;                  (* Bit 4 : Paged SysOp      *)
  139.          LAST_NEWUSER    = $20;                  (* Bit 5 : New user         *)
  140.          LAST_QWK        = $40;                  (* Bit 6 : Used QWK system  *)
  141.          LAST_NOCARRIER  = $80;                  (* Bit 7 : No Carrier       *)
  142.  
  143.          NODES_DOWN      = $01;                  (* Bit 0 : Node is down     *)
  144.          NODES_NODISTURB = $02;                  (* Bit 1 : Do not disturb   *)
  145.  
  146.          NODESTAT_NOTHING  = $00;     (* Doing nothing special               *)
  147.          NODESTAT_DOWNLOAD = $01;     (* Downloading file(s)                 *)
  148.          NODESTAT_UPLOAD   = $02;     (* Uploading file(s)                   *)
  149.          NODESTAT_READ     = $03;     (* Reading message(s)                  *)
  150.          NODESTAT_WRITE    = $04;     (* Writing message                     *)
  151.          NODESTAT_CHAT     = $05;     (* Chatting (0=Sysop,1-255=Conference) *)
  152.          NODESTAT_DOOR     = $06;     (* Using external program              *)
  153.          NODESTAT_LOGIN    = $07;     (* Logging in                          *)
  154.          NODESTAT_QWK      = $08;     (* Using QWK/OMEN offline msg system   *)
  155.          NODESTAT_FILELIST = $09;     (* Viewing file list                   *)
  156.  
  157. type
  158.  
  159. (* .............................. BBS LIST ................................. *)
  160.  
  161.          BBSlistHdr = Record    (* BBSLIST.DAT - BBS list file - List header *)
  162.            Id       : LongInt;  (* Always ID_SYS_BBSLST                      *)
  163.            Attrib   : Byte;     (* BBS attributes                            *)
  164.            UnixDate : DateTimeRec;(* Adding date and time in UNIX fmt        *)
  165.            Verified : DateTimeRec;(* Last verifying date and time in UNIX fmt*)
  166.            AddedBy  : CRC32;    (* CRC-32 of adder's name                    *)
  167.            ShowSec  : Security; (* Security needed to view this BBS          *)
  168.            BBS      : NameStr;  (* BBS name                                  *)
  169.            Sysop    : NameStr;  (* Sysop name                                *)
  170.            Software : DefStr;   (* BBS software                              *)
  171.            Nodes    : Byte;     (* Number of nodes in system                 *)
  172.            Nets     : Byte;     (* Number of net addresses to system         *)
  173.            DataLen  : SmallWord;     (* Length of other BBS data                  *)
  174.           {Nodes}               (* Node entries                              *)
  175.           {Nets}                (* Net entries à la NetRec                   *)
  176.           {Data}                (* Other BBS data with fixed length          *)
  177.          end;
  178.  
  179.          BBSlistNodeRec = Record (* BBSLIST.DAT - BBS list file - Node entry *)
  180.            Number : PhoneStr;    (* Phone number                             *)
  181.            Bps    : SmallWord;        (* Maximum bps rate div 100                 *)
  182.            Open   : OpenStr;     (* Open time                                *)
  183.            Other  : DefStr;      (* Other information about current node     *)
  184.          end;
  185.  
  186.          BBSlistIdxRec = Record  (* BBSLIST.IDX - BBS list index file        *)
  187.            StartPos : LongInt;   (* Absolute start position in BBS list file *)
  188.            BBSCRC   : CRC32;     (* CRC-32 of BBS name; -1 if non-active     *)
  189.          end;
  190.  
  191. (* ............................ LAST CALLERS ............................... *)
  192.  
  193.          LastCallerRec = Record          (* LASTCALL.DAT - Last callers list *)
  194.            ID      : LongInt;            (* Always ID_SYS_LAST               *)
  195.            Name    : NameStr;            (* User name                        *)
  196.            Alias   : NameStr;            (* User alias                       *)
  197.            City    : CityStr;            (* User city                        *)
  198.            Bpsrate : SmallWord;               (* Bps rate div 100                 *)
  199.            Age     : Byte;               (* Age                              *)
  200.            Node    : Byte;               (* Node                             *)
  201.            LogOn   : DateTimeRec;        (* Logon time in UNIX format        *)
  202.            LogOff  : DateTimeRec;        (* Logoff time in UNIX format       *)
  203.            ShowSec : Security;           (* Min security to see user         *)
  204.            Attrib  : Byte;               (* Bitmapped attributes             *)
  205.          end;
  206.  
  207. (* .......................NODE STATUS INFORMATION .......................... *)
  208.  
  209.          NodesRecord = Record
  210.            Name     : NameStr;                 (* User name                  *)
  211.            Alias    : NameStr;                 (* User alias                 *)
  212.            City     : CityStr;                 (* User city                  *)
  213.            Bpsrate  : SmallWord;                    (* Bps rate div 100           *)
  214.            Age      : Byte;                    (* Age                        *)
  215.            LogOn    : DateTimeRec;             (* Logon time in UNIX format  *)
  216.            ShowSec  : Security;                (* Min security to see user   *)
  217.            Attrib   : Byte;                    (* Attributes (see LAST...)   *)
  218.            Status   : Byte;                    (* Currently doing            *)
  219.            Info     : ANameStr;                (* More about status          *)
  220.            NodeStat : Byte;                    (* Node attributes            *)
  221.          end;
  222.  
  223. (* ..........................SYSTEM USAGE CHART............................. *)
  224.  
  225.          UsageRec = Record                 (* USAGE<node>.DAT                *)
  226.            Date: DateRec;                  (* Date for this record           *)
  227.            Usage: Array [1..180] of Byte;  (* Bit mapped; bit / minute / day *)
  228.          end;
  229.  
  230. (* ........................VOTE QUESTIONS & ANSWERS FILE ................... *)
  231.  
  232.        const
  233.  
  234.          VOTEQUES_SELECT  = $00000001; (* Y: Vote can only be for or against *)
  235.                                        (* N: Share points between answers    *)
  236.          VOTEQUES_ADDASW  = $00000002; (* User can add answers               *)
  237.          VOTEQUES_CHGVOTE = $00000004; (* User can change his vote later     *)
  238.          VOTEQUES_TOTALS  = $00000008; (* User can see results before voting *)
  239.  
  240.        type
  241.  
  242.          VoteQuestionRecord = Record         (* VOTE QUESTION RECORD         *)
  243.            Question:            String;      (* Question string              *)
  244.            AddedBy:             NameStr;     (* Who added this question      *)
  245.            UnixDate:            DateTimeRec; (* When added this question     *)
  246.            Attrib:              LongInt;     (* Attributes (see VOTEQUES...) *)
  247.            PointsToShare:       Byte;        (* Points to share              *)
  248.            MaxAnswersToShare:   Byte;        (* Max answers to share points  *)
  249.            CurrentAnswersCount: Byte;        (* Current answers count        *)
  250.            CurrentUsersCount:   LongInt;     (* Number of users answered     *)
  251.            VoteSecurity:        Security;    (* Min security to see question *)
  252.            EmptySpace:          Array [1..168] of Byte;
  253.          end;                                (* Size 500 bytes               *)
  254.  
  255.          VoteAnswerRecord = Record           (* VOTE ANSWER RECORD           *)
  256.            Answer:        ANameStr;          (* Answer string                *)
  257.            SelectedCount: LongInt;           (* Number of votes/points       *)
  258.            Attrib:        Byte;              (* ... not yet used ...         *)
  259.            AddedBy:       LongInt;           (* CRC-32 of adder's name       *)
  260.            UnixDate:      DateTimeRec;       (* When added this answer       *)
  261.            EmptySpace:    Array [1..26] of Byte;
  262.          end;                                (* Size 100 bytes               *)
  263.  
  264.          VoteUserRecord = Record
  265.            NameCRC32:    LongInt;            (* Who answered; CRC-32 of name *)
  266.            VoteDateTime: DateTimeRec;        (* When answered                *)
  267.            Attrib:       SmallWord;               (* ... not yet used ...         *)
  268.            Points:    Array [1..99] of Byte; (* Points shared; size DYNAMIC! *)
  269.          end;                                (* Size VARIES (see later...)   *)
  270.  
  271.            (* VUR.Points field size is equal to VQR.CurrentAnswersCount but *)
  272.            (* rounded up to next tens; for example 5 answers -> 10 points.  *)
  273.            (* This makes VoteUserRecord record size dynamical.              *)
  274.            (*                                                               *)
  275.            (* Each vote question is located in file named as VOTExxxx.DAT   *)
  276.            (* where xxxx is question number. Also answers and users are     *)
  277.            (* stored in the same file.                                      *)
  278.            (*                                                               *)
  279.            (* Vote file format :                                            *)
  280.            (*    VoteQuestionRecord                                         *)
  281.            (*    VoteAnswerRecord [1]                                       *)
  282.            (*    ...                                                        *)
  283.            (*    VoteAnswerRecord [VQR.CurrentAnswersCount]                 *)
  284.            (*    VoteUserRecord [1]                                         *)
  285.            (*    ...                                                        *)
  286.            (*    VoteUserRecord [VQR.CurrentUsersCount]                     *)
  287.            (*                                                               *)
  288.            (* For example, a question file with 10 possible answers and     *)
  289.            (* 1000 voted users take disk space as the following :           *)
  290.            (* 500 + 10 * 100 + 1000 * 20 = 21500 bytes                      *)
  291.  
  292. (*****************************************************************************)
  293. (*                                                                           *)
  294. (*                     S Y S T E M   C O N F I G U R A T I O N               *)
  295. (*                                                                           *)
  296. (*****************************************************************************)
  297.  
  298.        const
  299.  
  300.          ID_CFG       = ID_VER or $00030000;
  301.          ID_CFG_HDR   = ID_CFG or $01000000;
  302.          ID_CFG_REC   = ID_CFG or $02000000;
  303.          ID_CFG_DOOR  = ID_CFG or $03000000;
  304.          ID_CFG_FAREA = ID_CFG or $04000000;
  305.          ID_CFG_MAREA = ID_CFG or $05000000;
  306.          ID_CFG_LIMIT = ID_CFG or $06000000;
  307.          ID_CFG_EVENT = ID_CFG or $07000000;
  308.          ID_CFG_PROTO = ID_CFG or $08000000;
  309.          ID_CFG_ARC   = ID_CFG or $09000000;
  310.          ID_CFG_EDIT  = ID_CFG or $0A000000;
  311.          ID_CFG_VIEW  = ID_CFG or $0B000000;
  312.          ID_CFG_CHSET = ID_CFG or $0C000000;
  313.  
  314.          ID_LNG_HDR   = ID_CFG or $10000000;
  315.  
  316.          MODEM_ANSWER_MANUAL   = $01; (* Bit 0 - Force manual answer to call *)
  317.          MODEM_LOWERDTR_BUSY   = $02; (* Bit 1 - Lower DTR when busy         *)
  318.          MODEM_LOWERDTR_HANGUP = $04; (* Bit 2 - Lower DTR to terminate call *)
  319.          MODEM_LOCKED          = $08; (* Bit 3 - Locked BPS rate             *)
  320.          MODEM_NOHANGUP        = $10; (* Bit 4 - Force no hangup             *)
  321.          MODEM_WAIT_EACH_WRITE = $20; (* Bit 5 - Flush after write at 2400<  *)
  322.  
  323.          MSG_LOCAL_CHECK_WHOTO = $01; (* Bit 0 - Local msgs, local userbase  *)
  324.          MSG_QUICKSCAN_CURSOR  = $02; (* Bit 1 - Msg header needed in cursor *)
  325.          MSG_QUICKSCAN_FASTEND = $04; (* Bit 2 - Fast jump to end of msgs    *)
  326.          MSG_ALLOW_MACROS      = $08; (* Bit 3 - Allow macro strings in msgs *)
  327.          MSG_UPDOWN_NOCHGMSG   = $10; (* Bit 4 - Up/Down does not change msg *)
  328.          MSG_REDRAW_HDRLINES   = $20; (* Bit 5 - Redraw headers in msg read  *)
  329.          MSG_REMOVE_AFTER_TAG  = $40; (* Bit 6 - Remove empty lines after tag*)
  330.          MSG_GROUP_MAIL_DATE   = $80; (* Bit 7 - Group mail date check       *)
  331.          MSG_CREATE_PID_TEAR   =$100; (* Bit 8 - Create both PID & Tear line *)
  332.          MSG_IGNORE_SOFTCR     =$200; (* Bit 9 - Do not touch to ASCII141    *)
  333.          MSG_ADD_NEW_AREAS     =$400; (* Bit10 - Auto add new areas for user *)
  334.  
  335.          FILE_CHECK_OFFLINE    = $01; (* Bit 0 - Check if files are offline  *)
  336.          FILE_IMPORT_DIZ       = $02; (* Bit 1 - Import FILE_ID.DIZ etc      *)
  337.          FILE_SPARE_MEMORY     = $04; (* Bit 2 - With FILES.BBS files,       *)
  338.                                       (*         pre-scan download directory *)
  339.                                       (*         before displaying file list *)
  340.          FILE_SPLIT_DESC       = $08; (* Bit 3 - Allow splitting filedescs   *)
  341.          FILE_NO_UNPACK        = $10; (* Bit 4 - Don't unpack uploaded files *)
  342.          FILE_SCANCDROM        = $20; (* Bit 5 - Use FindFirst to CDROMs?    *)
  343.          FILE_DL_FILEDESC      = $40; (* Bit 6 - Allow download file descs   *)
  344.          FILE_NOUPDDLCNTR      = $80; (* Bit 7 - Don't update dl cntrl in FILES.BBS *)
  345.          FILE_STAMP_UPLOADS    =$100; (* Bit 8 - Touch uploaded files date   *)
  346.          FILE_DUPE_NO_EXT      =$200; (* Bit 9 - No file exts in dupe check  *)
  347.          FILE_NO_DUPE_KILL     =$400; (* Bit10 - Don't kill dupe uploads     *)
  348.          FILE_KEEP_TAGGED_LIST =$800; (* Bit11 - Keep user's tagged files in *)
  349.                                       (*         UserTagsPath after logoff   *)
  350.          FILE_CHK_DUPE_ALLAREA=$1000; (* Bit12 - Dupe check areas where user *)
  351.                                       (*         doesn't have any rights too *)
  352.          FILE_ASKBEFOREUPLOAD =$2000; (* Bit13 - Ask filenames&descriptions  *)
  353.                                       (*         in upload before transfer   *)
  354.          FILE_ADD_NEW_AREAS   =$4000; (* Bit14 - Auto add new areas for user *)
  355.  
  356.          OTHERS_DORINFONDEF    = $0001; (* Bit 0-Use node number in DORINFO? *)
  357.          OTHERS_SCREENLEN      = $0002; (* Bit 1-Try to detect screen len    *)
  358.          OTHERS_ERASEMULCHAT   = $0004; (* Bit 2-Erase MULCHAT.DAT after use *)
  359.          OTHERS_FORCEANSI      = $0008; (* Bit 3-Force ANSI if ASCII detected*)
  360.          OTHERS_NODETECTVIDEO  = $0010; (* Bit 4-Do not detect user termemul *)
  361.          OTHERS_NOCHATLOG      = $0020; (* Bit 5-Do not keep CHAT.LOG        *)
  362.          OTHERS_NOUSERCHATEXIT = $0040; (* Bit 6-User cannot exit chat       *)
  363.          OTHERS_ENVVAR_PATHS   = $0080; (* Bit 7-Convert $ENVVAR in paths    *)
  364.          OTHERS_NOLOCALCALL    = $0100; (* Bit 8-Exclude local in system calls *)
  365.          OTHERS_ECHOCHAR       = $0200; (* Bit 9-Echo pressed char in ^W;    *)
  366.          OTHERS_CMDLINE_CTRLX  = $0400; (* Bit10-Accept Ctrl-x hotkey codes in cmdline mode *)
  367.          OTHERS_CMNTTONEXTUSER = $0800; (* Bit11-If set, comment to next user will be shared between all nodes *)
  368.          OTHERS_CHATLOGTOMAIN  = $1000; (* Bit12-Create chat log to system path instead of node path *)
  369.          OTHERS_ALLOWMACROEDIT = $2000; (* Bit13-Allow ^]! sequences in ANSI files *)
  370.          OTHERS_AUTOSETCURSOR  = $4000; (* Bit14-Automatic set cursor pos in menu to end of screen *)
  371.  
  372.          DOOR_ACTIVE     = $0001;        (* Bit 0 - Active?                  *)
  373.          DOOR_JUMP       = $0002;        (* Bit 1 - CmdLine = New area list! *)
  374.  
  375. {ok}     FAREA_ACTIVE    = $0001; (* Bit 0 - Active?                         *)
  376. {ok}     FAREA_NEWFILES  = $0002; (* Bit 1 - Include in new files check      *)
  377.          FAREA_DEFAULT   = $0004; (* Bit 2 - Tagged by default               *)
  378. {ok}     FAREA_DUPECHK   = $0008; (* Bit 3 - Include upload dupe check       *)
  379. {ok}     FAREA_VIRUSCHK  = $0010; (* Bit 4 - Include upload virus check      *)
  380.          FAREA_FREE      = $0020; (* Bit 5 - All files are free              *)
  381. {ok}     FAREA_CDROM     = $0040; (* Bit 6 - CD-ROM area (ie. READONLY)      *)
  382.          FAREA_NOLISTREQ = $0080; (* Bit 7 - Allow dl files not in file list *)
  383. {ok}     FAREA_JUMP      = $0100; (* Bit 8 - Link to another area list       *)
  384. {ok}     FAREA_FILESBBS  = $0200; (* Bit 9 - Force FILES.BBS                 *)
  385. {ok}     FAREA_OFFLINE   = $0400; (* Bit10 - Force all files offline         *)
  386.  
  387. {ok}     MAREA_ACTIVE    = $0001;       (* Bit 0 - Active?                   *)
  388. {ok}     MAREA_DELETE    = $0002;       (* Bit 1 - Allow deleting messages   *)
  389.          MAREA_TAGLINE   = $0004;       (* Bit 2 - Allow tag lines           *)
  390.          MAREA_FATTACH   = $0008;       (* Bit 3 - Allow file attaches       *)
  391.          MAREA_SELECT    = $0010;       (* Bit 4 - Allow selecting from list *)
  392.          MAREA_CTRLCHAR  = $0020;       (* Bit 5 - Allow control chars       *)
  393.          MAREA_DEFAULT   = $0040;       (* Bit 6 - Tagged by default         *)
  394.          MAREA_MAILCHK   = $0080;       (* Bit 7 - Force mail check          *)
  395.          MAREA_ORIGIN    = $0100;       (* Bit 8 -                           *)
  396. {ok}     MAREA_JUMP      = $0200;       (* Bit 9 - PathName = New area list! *)
  397.          MAREA_FORCEQUOTECR = $0400;    (* Bit10 - ..temporal..              *)
  398.          MAREA_FOLLOWAREA = $0800;      (* Bit11 - Force combined area       *)
  399.          MAREA_RECEIPT   = $1000;       (* Bit12 - Ask if user wants receipt *)
  400.  
  401.          MAREAFMT_HMB    = $0000;                                 (* Hudson  *)
  402.          MAREAFMT_JAM    = $0001;                                 (* JAM     *)
  403.          MAREAFMT_MSG    = $0002;                                 (* .MSG    *)
  404.          MAREAFMT_SQUISH = $0003;                                 (* Squish  *)
  405.  
  406.          MAREATYPE_LOCAL = $0000;                              (* Local area *)
  407.          MAREATYPE_ECHO  = $0001;                              (* Echo area  *)
  408.          MAREATYPE_NET   = $0002;                              (* Net mail   *)
  409.  
  410.          MAREAKIND_BOTH  = $0000;        (* Both public and private messages *)
  411.          MAREAKIND_PRIV  = $0001;        (* Only private messages            *)
  412.          MAREAKIND_PUB   = $0002;        (* Only public messages             *)
  413.          MAREAKIND_RO    = $0003;        (* Read-only                        *)
  414.  
  415.          MAREAREPLY_BOTH = $0000;                   (* Net or normal replies *)
  416.          MAREAREPLY_NET  = $0001;                   (* Only net replies      *)
  417.          MAREAREPLY_NORM = $0002;                   (* Only normal replies   *)
  418.          MAREAREPLY_NONE = $0003;                   (* No replies            *)
  419.  
  420.          MAREAALIAS_BOTH = $0000;                      (* Real name or alias *)
  421.          MAREAALIAS_YES  = $0001;                      (* Only aliases       *)
  422.          MAREAALIAS_NO   = $0002;                      (* Only real names    *)
  423.          MAREAALIAS_ASK  = $0003;                      (* Ask for alias      *)
  424.  
  425.          LIMIT_ACTIVE    = $0001;                         (* Bit 0 - Active? *)
  426.  
  427.          EVENT_ACTIVE    = $0001;                       (* Bit 0 - Active?   *)
  428.          EVENT_FORCED    = $0002;                       (* Bit 1 - Forced?   *)
  429.          EVENT_TODAY     = $0004;                       (* Internal flag     *)
  430.  
  431.          EVENTDAY_SUN    = $0001;                       (* Bit 0 - Sunday    *)
  432.          EVENTDAY_MON    = $0002;                       (* Bit 1 - Monday    *)
  433.          EVENTDAY_TUE    = $0004;                       (* Bit 2 - Tuesday   *)
  434.          EVENTDAY_WED    = $0008;                       (* Bit 3 - Wednesday *)
  435.          EVENTDAY_THU    = $0010;                       (* Bit 4 - Thursday  *)
  436.          EVENTDAY_FRI    = $0020;                       (* Bit 5 - Friday    *)
  437.          EVENTDAY_SAT    = $0040;                       (* Bit 6 - Saturday  *)
  438.  
  439.          PROTOCOL_NONE   =    #0;
  440.  
  441.          PROTOCOL_ACTIVE = $0001;        (* Bit 0 - Active?                  *)
  442.          PROTOCOL_BATCH  = $0002;        (* Bit 1 - Batch transfers?         *)
  443.          PROTOCOL_BIDIR  = $0004;        (* Bit 2 - Bidirectional transfers? *)
  444.          PROTOCOL_ALLLOG = $0008;        (* Bit 3 - Read DSZ.LOG from start  *)
  445.  
  446.          ARCHIVE_ACTIVE  = $0001;                         (* Bit 0 - Active? *)
  447.  
  448.          EDITOR_ACTIVE   = $0001;                         (* Bit 0 - Active? *)
  449.  
  450.          CHARSET_ACTIVE  = $0001;              (* Bit 0 - Active?            *)
  451.          CHARSET_INPUT   = $0002;              (* Bit 1 - Also modify input? *)
  452.  
  453.          FILELIST_DELETED   = $01;
  454.          FILELIST_SYSOPONLY = $02;
  455.          FILELIST_OFFLINE   = $04;
  456.          FILELIST_UNLISTED  = $08;
  457.  
  458.          USERCFG_ONEWORDNAMES = $01;   (* allow one word names for new users *)
  459.          USERCFG_INCLUDESYSOP = $02;   (* in "last callers" list             *)
  460.          USERCFG_HIDEUPPERSEC = $04;   (* in "who is on" list                *)
  461.  
  462.          (* The following flags are only used by CSETUP internally. If flag  *)
  463.          (* is turned on, equivalent information is copied from common       *)
  464.          (* config file when saving node config file and editing such        *)
  465.          (* information is not possible.                                     *)
  466.  
  467.          COMMON_SYSINFO = $0001;      (* Bit 0 - System information          *)
  468.          COMMON_MODEM   = $0002;      (* Bit 1 - Special modem settings      *)
  469.          COMMON_PATH    = $0004;      (* Bit 2 - Paths                       *)
  470.          COMMON_MSG     = $0008;      (* Bit 3 - Msg system                  *)
  471.          COMMON_FILE    = $0010;      (* Bit 4 - File system                 *)
  472.          COMMON_USER    = $0020;      (* Bit 5 - User config                 *)
  473.          COMMON_NETADDR = $0040;      (* Bit 6 - Net addresses               *)
  474.          COMMON_LIMIT   = $0080;      (* Bit 7 - Limits                      *)
  475.          COMMON_EVENT   = $0100;      (* Bit 8 - Events                      *)
  476.          COMMON_PROTO   = $0200;      (* Bit 9 - Transfer protocols          *)
  477.          COMMON_ARCHIVE = $0400;      (* Bit10 - File archivers              *)
  478.          COMMON_EDITOR  = $0800;      (* Bit11 - Full screen message editors *)
  479.          COMMON_CHARSET = $1000;      (* Bit12 - Charsets                    *)
  480.          COMMON_OTHER   = $2000;      (* Bit13 - Macros + Other settings     *)
  481.  
  482.        type
  483.  
  484.          ConfigHdr = Record      (* CONFIG.DAT - Config file - Main header   *)
  485.            Id        : LongInt;  (* Always ID_CFG_HDR                        *)
  486.            Version   : LongInt;  (* Version number                           *)
  487.            CfgSize   : SmallWord;(* Size of config record in bytes           *)
  488.            Cfg2Size  : SmallWord;(* Size of config record additions in bytes *)
  489.            DoorSize  : SmallWord;(* Size of door record in bytes             *)
  490.            FAreaSize : SmallWord;(* Size of file area record in bytes        *)
  491.            MAreaSize : SmallWord;(* Size of message area record in bytes     *)
  492.            LimitSize : SmallWord;(* Size of security limit record in bytes   *)
  493.            EventSize : SmallWord;(* Size of event record in bytes            *)
  494.            ProtoSize : SmallWord;(* Size of transfer protocol record in bytes*)
  495.            ArcSize   : SmallWord;(* Size of archive record in bytes          *)
  496.            EditSize  : SmallWord;(* Size of FS editor record in bytes        *)
  497.            ChSetSize : SmallWord;(* Size of char set record                  *)
  498.            Doors     : LongInt;  (* Number of doors in system                *) (* RESERVED *)
  499.            FAreas    : LongInt;  (* Number of file areas in system           *) (* RESERVED *)
  500.            MAreas    : LongInt;  (* Number of message areas in system        *) (* RESERVED *)
  501.            Limits    : LongInt;  (* Number of security limits in system      *) (* RESERVED *)
  502.            Events    : LongInt;  (* Number of events in system               *) (* RESERVED *)
  503.            Protos    : LongInt;  (* Number of transfer protocols in system   *) (* RESERVED *)
  504.            Archives  : LongInt;  (* Number of archivers in system            *) (* RESERVED *)
  505.            Editors   : LongInt;  (* Number of FS editors in system           *) (* RESERVED *)
  506.            CharSets  : LongInt;  (* Number of possible char sets             *) (* RESERVED *)
  507.          end;
  508.  
  509.          NetAddrRec = Record
  510.            Addr        : NetRec;
  511.            NetmailArea : LongInt;
  512.          end;
  513.  
  514.          RegInfoCfg = Record
  515.            BBS         : NameStr;
  516.            Sysop       : NameStr;
  517.            Empty       : Array [1..8] of Byte;
  518.            Location    : NameStr;                 (* BBS location            *)
  519.            PhoneNumber : PhoneStr;                (* BBS phone number        *)
  520.            BBSID       : String [8];              (* BBS ID - QWK file name  *)
  521.            BBSID2      : String [2];              (* BBS ID - OMEN file name *)
  522.          end;
  523.  
  524. {#chgd#} ModemCfg = Record
  525.            ModemPort    : Byte;
  526.            InitRate     : SmallWord;
  527.            InitTimes    : Byte;
  528. {#ANameStr}InitStr      : String;   (* ATZ|~~~     *)
  529.            OnHookStr    : DefStr;   (* ATH0|       *)
  530.            OffhookStr   : DefStr;   (* ATH1|       *)
  531.            ResetStr     : DefStr;   (* AT|         *)
  532.            NoCarrierStr : DefStr;   (* NO CARRIER| *)
  533.            OkStr        : MenuStr;  (* OK|         *)
  534.            RingStr      : MenuStr;  (* RING|       *)
  535.            EscapeCode   : MenuStr;  (* +++         *)
  536.            Attrib       : Byte;
  537. {#NameStr} AswStr       : String;   (* ATA|        *)
  538.            InitDelay    : Byte;
  539.            EscapeDelay  : Byte;
  540.            DialTimes    : Byte;
  541.            DialLength   : Byte;
  542.            DialStr      : DefStr;
  543.            HiSpeedRep   : Byte;     (* Wait n*0.1s after ANSI req (9600>) *)
  544.            LoSpeedRep   : Byte;     (* Wait n*0.1s after ANSI req (9600<) *)
  545.            AswTimeFrom  : TimeRec;
  546.            AswTimeTo    : TimeRec;
  547.            ResponseCnt  : Byte;
  548.           {n x ModemResponseRec}
  549.          end;
  550.  
  551.          ModemResponseRec = Record     (* 300, 1200, 2400, 4800, 7200, 9600, *)
  552.            Speed    : SmallWord;       (* 12000, 14400, 16800, 19200, 21600, *)
  553.            Response : ANameStr;        (* 24000, 26400, 28800, ..., 115200   *)
  554.            ErrLvl   : Byte;            (* If nonzero, exit with this errlvl  *)
  555.          end;
  556.  
  557.          PathCfg = Record
  558.            Chat            : PathStr;        (* External chat utility        *)
  559.            FileViewer      : PathStr;        (* External file viewer         *)
  560.            VirusScanner    : PathStr;        (* External virus scanner       *)
  561.            CommonPath      : DirStr;         (* Multinode common directory   *)
  562.            SwapPath        : DirStr;         (* Swap directory               *)
  563.            TempPath        : DirStr;         (* Temp directory               *)
  564.            WorkPath        : DirStr;         (* Work directory               *)
  565.            NodeListPath    : DirStr;         (* Nodelist directory           *)
  566.            LocalAttachPath : DirStr;         (* Local file attach directory  *)
  567.            FilebasePath    : DirStr;         (* Filebase directory           *)
  568.           {SystemPath      : DirStr;}        (* SET BBS=                     *)
  569.           {MenuPath        : DirStr;}        (* Language File                *)
  570.           {TextPath        : DirStr;}        (* Language File                *)
  571.          end;
  572.  
  573.          MsgCfg = Record
  574.            QuoteStr : GroupStr;              (* "PT>"                        *)
  575.            Attrib   : LongInt;               (* Msg configuration attributes *)
  576.            GroupSec : SmallWord;             (* Sec to send group messages   *)
  577.            BadMsgs  : LongInt;               (* Bad msgs board               *)
  578.            MinSpace : SmallWord;             (* Min space to export msgs     *)
  579.            DefOrigin: ANameStr;              (* Default origin line          *)
  580.            MaxMsgs  : SmallWord;             (* Max msgs to export           *)
  581.            MaxLines : SmallWord;             (* Max lines in offline msg     *)
  582.            DupeSize : SmallWord;             (* Max size of dupe msg list    *)
  583.            ReadMarg : Byte;                  (* 0=default marginal           *)
  584.            QuoteMarg: Byte;                  (* 0=default marginal           *)
  585.            OfflineSec : Security;            (* Min sec to pack msgs offline *)
  586.            NetArea  : LongInt;               (* Net mail area number         *)
  587.            Empty    : Array [1..394] of Byte;
  588.          end;
  589.  
  590.          FileCfg = Record
  591.            Attrib   : LongInt;              (* File configuration attributes *)
  592.            CheckRatioFiles : Byte;          (* Start checking ratio after n downloaded files *)
  593.            DLcounter: Byte;                 (* Bit 0,1: 00=(, 01=[, 10=<     *)
  594.                                             (* Bit 2,3: counter length       *)
  595.                                             (*     00=none, 01=2, 02=3, 03=4 *)
  596.            FiledescLines: Byte;             (* Max num of file desc lines    *)
  597.            NukedPath: DirStr;               (* Where to move unwanted files; empty=kill file *)
  598.            MinSpace : SmallWord;            (* Min space to allow uploads    *)
  599.            CheckRatioFiles2 : Byte;         (* Check after every n files if  *)
  600.                                             (* user can still DL more files  *)
  601.                                             (* in download menutype prompt   *)
  602.            Empty    : Array [1..422] of Byte;
  603.          end;
  604.  
  605.          UserCfg = Record
  606.            FlagDesc   : Array [1..MAX_FLAG, 1..8] of String [40];
  607.            Attrib     : LongInt;
  608.            ExpireDays : SmallWord;
  609.            VerifyCalls: Byte;
  610.            PasswdTries: Byte;
  611.            Empty      : Array [1..492] of Byte;
  612.          end;
  613.  
  614.          ColorCfg = Record
  615.            DefaultColor: Byte;
  616.            ChatHeader:   Byte;
  617.            ChatSysop:    Byte;
  618.            ChatUser:     Byte;
  619.            Bottomline:   Byte;
  620.            Empty    : Array [1..499] of Byte;
  621.          end;
  622.  
  623.          OtherCfg = Record
  624.            LocalColors   : Boolean;    (* TRUE if colors are shown locally . *)
  625.            SysopSecurity : Security;   (* To access Sysop filebase functions *)
  626.            ShellToDos    : PathStr;    (* Cmd line to shell to DOS ......... *)
  627.            YellDevice    : Byte;       (* Yelling device, 0=none ........... *)
  628.            MaxYellTimes  : Byte;       (* Max yell times per day ........... *)
  629.            MaxYellLen    : Byte;       (* Max yell sound length ............ *)
  630.            YellStart     : Array [0..6] of SmallWord; (* Yell start time ... *)
  631.            YellStop      : Array [0..6] of SmallWord; (* Yell stop time .... *)
  632.            LocalPassword : PassStr;    (* Local keyboard password .......... *)
  633.            FrontEndExec  : Array [1..10] of PathStr; (* Ctrl-F1..F10 execs . *)
  634.            TimeOut       : SmallWord;  (* Keyboard time out in seconds ..... *)
  635.            MaxLogInTime  : Byte;       (* Max login time in minutes ........ *)
  636.            ScrBackSize   : SmallWord;  (* Scroll back buffer size in KB .... *)
  637.            OnlineMsgChk  : Byte;       (* Check online msgs every n seconds  *)
  638.            NodeNumber    : Byte;       (* Current node number .............. *)
  639.            MinLastCaller : SmallWord;  (* Minimum size of LASTCALL.DAT ..... *)
  640.            KeyboardMacro : Array [1..10] of ANameStr; (* Sh-F1..F10 macros . *)
  641.            AsstSysopName : NameStr;
  642.            VerifyBBSdays : SmallWord;  (* Verify BBS every n days .......... *)
  643.            Attrib        : LongInt;
  644.            JAMbasePath   : DirStr;     (* Where to hold ECHO/NETMAIL.JAM ... *)
  645.            DefLocalMovePath: DirStr;
  646.            LoginCharSet  : Byte;
  647.            ChkMulchatTime: Byte; (* How often check MULCHAT.DAT, 0=when chgd *)
  648.            HiddenChar    : Char;       (* Char used in hidden fields ("*")   *)
  649.            AnsiStopChars : MenuStr;    (* Chars to abort displaying ANSI scr *)
  650.            LngPath       : DirStr;
  651.            CtlPath       : DirStr;
  652.            Own_Com_Base  : SmallWord;
  653.            Own_Com_Irq   : SmallInt;
  654.            Own_Com_Int   : SmallInt;
  655.            VotePath      : DirStr;
  656.            CheckEventCounter: Byte;
  657.            ModemANSIbufsize: SmallWord;
  658.            StatusLine    : Array [1..6] of String [100];
  659.            ModemResetCnt : Byte;
  660.            ScrSaverCnt   : Byte;
  661.            UserTagsPath  : DirStr;
  662.            WaitAswTime   : Byte;       (* Secs to wait for CONNECT response  *)
  663.            CommonSetup   : LongInt;    (* bitmapped, see COMMON_xxx          *)
  664.            Empty         : Array [1..916] of Byte;
  665.          end;
  666.  
  667.          ConfigRec = Record                    (* CONFIG.DAT - Config record *)
  668.            Id        : LongInt;                (* Always ID_CFG_REC          *)
  669.            RegInfos  : RegInfoCfg;
  670.            Modems    : ModemCfg;
  671.            Paths     : PathCfg;
  672.            Msgs      : MsgCfg;
  673.            Files     : FileCfg;
  674.            Users     : UserCfg;
  675.            Colors    : ColorCfg;
  676.            Others    : OtherCfg;
  677.            NetCnt    : Byte;
  678.           {n x NetAddrRec}             (* Size included in ConfigHdr.CfgSize *)
  679.          end;
  680.  
  681.          LimitRecord = Record        (* CONFIG.DAT - Sec limit entry         *)
  682.            Id        : LongInt;      (* Always ID_CFG_LIMIT                  *)
  683.            Attrib    : Byte;         (* Limits attributes                    *)
  684.            SecLvl    : SmallWord;    (* Current security level               *)
  685.            Name      : ANameStr;     (* Security limit description           *)
  686.            ValidFrom : TimeRec;      (* Starting time in minutes after 00:00 *)
  687.            ValidTo   : TimeRec;      (* Ending time in minutes after 00:00   *)
  688.            RatioK    : SmallWord;    (* Maximum DL/UL KB ratio               *)
  689.            Ratio     : SmallWord;    (* Maximum DL/UL files ratio            *)
  690.            TmLimit   : SmallWord;    (* Time limit in minutes                *)
  691.            ClLimit   : Byte;         (* Call limit                           *)
  692.            Downlimit : LimitBpsType; (* Download limit in kilobytes          *)
  693.            Filelimit : LimitBpsType; (* Download limit in files              *)
  694.          end;
  695.  
  696.          EventRecord = Record        (* CONFIG.DAT - Event entry             *)
  697.            Id          : LongInt;    (* Always ID_CFG_EVENT                  *)
  698.            Attrib      : Byte;       (* Event attributes                     *)
  699.            Days        : Byte;       (* Days to run, bitmapped               *)
  700.            RunTime     : TimeRec;    (* Running time in minutes after 00:00  *)
  701.            ErrorLevel  : Byte;       (* Drop to DOS with error level         *)
  702.            LastRun     : DateRec;    (* Last run time                        *)
  703.          End;
  704.  
  705. {#chgd#} ProtocolRecord = Record         (* CONFIG.DAT - Protocol entry      *)
  706.            Id           : LongInt;       (* Always ID_CFG_PROTO              *)
  707.            Attrib       : Byte;          (* Protocol attributes              *)
  708.            Name         : DefStr;        (* Short definition for protocol    *)
  709.            Key          : Char;          (* Key to select protocol           *)
  710. {#PathStr} DownloadCmd  : String;        (* Cmd line needed to transmit file *)
  711. {#PathStr} UploadCmd    : String;        (* Cmd line needed to receive file  *)
  712.            ListChar     : Char;          (* List indicator                   *)
  713.            Efficiency   : Byte;          (* Transfer efficiency in percents  *)
  714.            LogFileType  : Byte;          { 0=OTHER,1=ICOM,2=DSZ               }
  715.            ProtocolType : Byte;          { 0=other,1=opus,2=BIMODEM           }
  716.            LogFileName  : PathStr;
  717.            CtlFileName  : PathStr;
  718.            UpLogKeyword : DefStr;
  719.            DnLogKeyword : DefStr;
  720.            DescWordNr   : Byte;
  721.            NameWordNr   : Byte;
  722.            DnCtlString  : ANameStr;
  723.            UpCtlString  : ANameStr;
  724.          end;
  725.  
  726.          ArchiveRecord = Record          (* CONFIG.DAT - Archive entry       *)
  727.            Id           : LongInt;       (* Always ID_CFG_ARC                *)
  728.            Attrib       : Byte;          (* Archive attributes               *)
  729.            Extension    : ExtStr;        (* File extension for this archive  *)
  730.            Name         : DefStr;        (* Short definition for archive     *)
  731.            Key          : Char;          (* Key to select this archive       *)
  732.            Compress     : PathStr;       (* Cmd line to compress file        *)
  733.            Uncompress   : PathStr;       (* Cmd line to uncompress file      *)
  734.            ListChar     : Char;          (* List indicator                   *)
  735.            Efficiency   : Byte;          (* (PackedSize/OrigSize) %          *)
  736.            ArchiveId    : NameStr;       (* Archive ID                       *)
  737.          end;
  738.  
  739.          EditorRecord = Record           (* CONFIG.DAT - FS Editor entry     *)
  740.            Id           : LongInt;       (* Always ID_CFG_EDIT               *)
  741.            Attrib       : Byte;          (* Editor attributes                *)
  742.            Name         : DefStr;        (* Short definition for editor      *)
  743.            Key          : Char;          (* Key to select this editor        *)
  744.            CmdLine      : PathStr;       (* Cmd line to start editor         *)
  745.          end;
  746.  
  747.          CharSetRecord = Record                   (* CONFIG.DAT - Char set   *)
  748.            Id           : LongInt;                (* Always ID_CFG_CHSET     *)
  749.            Attrib       : Byte;                   (* Char set attributes     *)
  750.            Name         : DefStr;                 (* Short definition        *)
  751.            Key          : Char;                   (* Key to select           *)
  752.            Table        : Array [0..255] of Char; (* Char Convertion Table   *)
  753.            KludgeLabel  : DefStr;                 (* Label to CHARSET kludge *)
  754.          end;
  755.  
  756. {#chgd#} MenuRecord = Record
  757.            Cmd   : SmallWord;                 (* Menu command                *)
  758.            Sec   : Security;                  (* Security required           *)
  759.            Key   : SmallInt;                  (* Hot key to run command      *)
  760.            Input : DefStr;                    (* Input string to run command *)
  761. {#PathStr} Data  : String;                    (* Command parameters          *)
  762.          End;
  763.  
  764.          GosubRecord = Array [1..MAX_GOSUB] of MenuStr;   (* Gosub menu list *)
  765.  
  766.          DoorRec = Record        (* Door entry                               *)
  767.     {000}  Id       : LongInt;   (* Always ID_CFG_DOOR                       *)
  768.     {004}  Attrib   : Byte;      (* Door attributes                          *)
  769.     {005}  Name     : ANameStr;  (* Door name                                *)
  770.     {066}  Group    : GroupStr;  (* Door group                               *)
  771.     {070}  CmdLine  : PathStr;   (* Command line to run door                 *)
  772.     {150}  Sec      : Security;  (* Security required to select and run door *)
  773.     {175}  PassWord : PassStr;   (* Password required to enter door          *)
  774.     {191}  OpenFrom : TimeRec;   (* Door opening time in minutes after 00:00 *)
  775.     {193}  OpenTo   : TimeRec;   (* Door closing time in minutes after 00:00 *)
  776.     {195}  SubDirNum: SmallWord; (* Current subdirectory number              *)
  777.     {197}  JumpDirNum:SmallWord; (* If DOOR_JUMP, where to jump              *)
  778.          end;
  779.  
  780.          FAreaRec = Record          (* File area entry                       *)
  781.     {000}  Id           : LongInt;  (* Always ID_CFG_FAREA                   *)
  782.     {004}  Attrib       : LongInt;  (* File area attributes.                 *)
  783.     {008}  Name         : ANameStr; (* File area name.                       *)
  784.     {069}  DownloadSec  : Security; (* Sec needed to download files.         *)
  785.     {094}  UploadSec    : Security; (* Sec needed to upload files.           *)
  786.     {119}  FileListSec  : Security; (* Sec needed to list files.             *)
  787.     {144}  Password     : PassStr;  (* Password needed to enter file area.   *)
  788.     {160}  DownloadPath : DirStr;   (* Download path.                        *)
  789.     {228}  Basename     : MenuStr;  (* Filebase file name w/out extension    *)
  790.     {237}  EmptySpace   : Array [1..51] of Byte;
  791.     {288}  SubDirNum    : SmallWord;(* Current subdirectory number           *)
  792.     {290}  JumpDirNum   : SmallWord;(* If FAREA_JUMP, where to jump          *)
  793.     {292}  UploadArea   : LongInt;  (* If empty : Current area               *)
  794.     {296}  Group        : GroupStr; (* Filearea group                        *)
  795.     {300}  ArchiveFmt   : Byte;     (* Convert files to this archive format. *)
  796.     {301}  KillDaysDL   : SmallWord;(* Kill file if not dl'd in last n days. *)
  797.     {303}  KillDaysFD   : SmallWord;(* Kill file if older than n days.       *)
  798.     {305}  FilePoints   : SmallWord;(* Default file points per file dl'd.    *)
  799.     {307}  OpenFrom     : TimeRec;  (* Opening time in minutes after 00:00   *)
  800.     {309}  OpenTo       : TimeRec;  (* Closing time in minutes after 00:00   *)
  801.     {311}  FILESBBS     : PathStr;  (* Name of FILES.BBS                     *)
  802.     {391}
  803.          end;
  804.  
  805.          MAreaRec = Record            (* Message area entry                  *)
  806.     {000}  Id           : LongInt;    (* Always ID_CFG_MAREA                 *)
  807.     {004}  Attrib       : LongInt;    (* Area attributes, see below          *)
  808.     {008}  Format       : Byte;       (* Message base format                 *)
  809.     {009}  Pathname     : PathStr;    (* File path name w/o extension        *)
  810.     {089}  Name         : ANameStr;   (* Message area name                   *)
  811.     {150}  ShortName    : QWKStr;     (* Short message area name             *)
  812.     {163}  Group        : GroupStr;   (* Message area group                  *)
  813.     {167}  PassWord     : PassStr;    (* Password required to enter area     *)
  814.     {183}  OwnBoard     : Byte;       (* Virtual area number in HMB system   *)
  815.     {184}  Typ          : Byte;       (* Area type                           *)
  816.     {185}  Kinds        : Byte;       (* Area status                         *)
  817.     {186}  ReplyStatus  : Byte;       (* Reply status                        *)
  818.     {187}  UseAlias     : Byte;       (* Use alias                           *)
  819.     {188}  ReadRights   : Security;   (* Read rights                         *)
  820.     {213}  WriteRights  : Security;   (* Write rights                        *)
  821.     {238}  SysopRights  : Security;   (* Sysop rights                        *)
  822.     {263}  DaysKill     : SmallWord;  (* Kill older than n days              *)
  823.     {265}  ReceiveKill  : SmallWord;  (* Kill more than n days received msgs *)
  824.     {267}  CountKill    : SmallWord;  (* Keep only n newest messages         *)
  825.     {269}  SubDirNum    : SmallWord;  (* Current subdirectory number         *)
  826.     {271}  UseAka       : Byte;       (* Which AKA to use                    *)
  827.     {272}  CharTable    : Byte;       (* Which char convertion table to use  *)
  828.     {273}  OriginLine   : ANameStr;   (* Origin line for echo areas          *)
  829.     {334}  OpenFrom     : TimeRec;    (* Opening time in minutes after 00:00 *)
  830.     {336}  OpenTo       : TimeRec;    (* Closing time in minutes after 00:00 *)
  831.     {338}  JumpDirNum   : SmallWord;  (* If MAREA_JUMP, where to jump        *)
  832.     {340} {CommentLen   : SmallWord;} (* If nonzero, area has a comment      *)
  833.     {340}  ReplyArea    : LongInt;    (* If nonzero, move replies here       *)
  834.          end;
  835.  
  836.          LanguageHeader = Record             (* LNG?????.DAT - Header       *)
  837.            Id            : LongInt;          (* Always ID_LNG_HDR           *)
  838.            Version       : LongInt;          (* Version number              *)
  839.            Description   : String [254];     (* Language description        *)
  840.            Key           : Char;             (* Selection key               *)
  841.            MenuPath      : DirStr;           (* Menu files path             *)
  842.            TextPath      : DirStr;           (* Text files path             *)
  843.            TopMenu       : QWKStr;           (* Top menu filename           *)
  844.            FileListFirst : LongInt;          (* First filelist string num   *)
  845.            FileListCnt   : Byte;             (* Different filelists         *)
  846.            FileListSize  : Byte;             (* Number of strings           *)
  847.            ReadMsgFirst  : LongInt;          (* First readmsg string num    *)
  848.            ReadMsgCnt    : Byte;             (* Different readmsg types     *)
  849.            ReadMsgSize   : Byte;             (* Number of strings           *)
  850.            ScriptPath    : DirStr;           (* Scripts (*.SCR) path        *)
  851.          end;
  852.  
  853.          LanguageRecord = PChar;             (* NULL terminated strings     *)
  854.  
  855.          LngIdxRec = Record                  (* LNG?????.IDX - Record       *)
  856.            Pos : LongInt;                    (* Pointer to LNG?????.DAT     *)
  857.            Len : SmallWord;                  (* String length               *)
  858.          end;
  859.  
  860.          ScriptHeader = Record
  861.            Id      : LongInt;
  862.            Attrib  : LongInt;
  863.            RecSize : SmallWord;
  864.          end;
  865.  
  866.          ScriptRecord = Record
  867.            Cmd     : SmallWord;
  868.            Param   : LongInt;
  869.          end;
  870.  
  871.          StatisticRecord = Record
  872.            Calls       : Array [1..MAX_LIMITBPS] of LongInt;
  873.            Failed      : LongInt;
  874.            NewUsers    : LongInt;
  875.            PublicMsgs  : LongInt;
  876.            PrivateMsgs : LongInt;
  877.            UpK         : LongInt;
  878.            UpTimes     : LongInt;
  879.            DownK       : LongInt;
  880.            DownTimes   : LongInt;
  881.            Yells       : LongInt;
  882.          end; (* 64 bytes *)
  883.  
  884.          SystemStatRecord = Record (* SYSSTAT.DAT *)
  885.            Total     : StatisticRecord;
  886.            Yesterday : StatisticRecord;
  887.            Today     : StatisticRecord;
  888.            FirstDate : DateRec;
  889.            TodayDate : DateRec;
  890.           {LastCaller: NameStr;}
  891.          end;
  892.  
  893.   FileListRec = Record                                (* ????????.HDR *)
  894.     Name:        FileMaskType; {spaces mean description line}
  895.     Size:        Longint;
  896.     UploadDate:  Longint;
  897.     Downloads:   SmallWord;
  898.     Attribute:   SmallWord;
  899.     DescPtr:     Longint;
  900.     DescRecLen:  SmallWord;
  901.     UpLdrLen:    Byte;
  902.  
  903.  { Attributes
  904.    bit        description
  905.      0         Deleted
  906.      1         For Sysop
  907.      2         OFFLINE
  908.      3         Unlisted
  909.  
  910.      4         No-kill   NOT YET IMPLEMENTED
  911.      5         Checked   NOT YET IMPLEMENTED
  912.     LastDL:      DateRec; NOT YET IMPLEMENTED
  913.     Cost:        SmallWord;    NOT YET IMPLEMENTED
  914.   }
  915.   end;  { Size = 30 bytes}
  916.  
  917.   {
  918.   DescriptionRec = record                             (* ????????.TXT *)
  919.     Desc:        array[1..desclen] of char; (max. length 1024 bytes)
  920.     Uploader:    array[1..namelen] of char;
  921.   end;
  922.   }
  923.  
  924. (* The file names are 32 bit CRCs counted from UPPERCASE (capital letters)
  925.    filearea name converted to hexa decimals specified in FAREAS.DAT and
  926.    stored in the filebase path *)
  927.  
  928.  
  929.   (* FILEBASEPATH\DELSUGG.TXT :                               *)
  930.   (* DeleteCounter:09 PointerToDELSUGGDAT:09 FullFilePathName *)
  931.   (* FILEBASEPATH\DELSUGG.DAT :                               *)
  932.   FileDeleteSuggRec = Record
  933.     UserNameCRC32: CRC32; (* CRC32 of user name who suggested delete *)
  934.     Next: LongInt;        (* Pointer to next record                  *)
  935.   end;
  936.  
  937.  
  938. (*****************************************************************************)
  939. (*                                                                           *)
  940. (*                          U S E R   F I L E S                              *)
  941. (*                                                                           *)
  942. (*****************************************************************************)
  943.  
  944.        const
  945.  
  946.          ID_USR       = ID_VER or $00040000;
  947.          ID_USR_HDR   = ID_USR or $01000000;
  948.          ID_USR_REC   = ID_USR or $02000000;
  949.  
  950.          USER_DELETED      = $00000001; (* Bit  0 - User deleted             *)
  951.          USER_MAILCHK      = $00000002; (* Bit  1 - Mail check               *)
  952.          USER_FILECHK      = $00000004; (* Bit  2 - New files check          *)
  953.          USER_NORATIO      = $00000008; (* Bit  3 - No DL ratios             *)
  954.          USER_FEMALE       = $00000010; (* Bit  4 - Female                   *)
  955.          USER_CLRSCR       = $00000020; (* Bit  5 - Clear screen             *)
  956.          USER_MORE         = $00000040; (* Bit  6 - More prompts             *)
  957.          USER_NOKILL       = $00000080; (* Bit  7 - User cannot be removed   *)
  958.          USER_COLORS       = $00000100; (* Bit  8 - Colors                   *)
  959.          USER_NODISTURB    = $00000200; (* Bit  9 - Do not disturb           *)
  960.          USER_HOTKEYS      = $00000400; (* Bit 10 - Hot keys                 *)
  961.          USER_IGNDLHOURS   = $00000800; (* Bit 11 - Ignore download hours    *)
  962.          USER_DELAFTERVIEW = $00001000; (* Bit 12 - Delete file after viewed *)
  963.          USER_VIEWED       = $00002000; (* Bit 13 - File viewed              *)
  964.          USER_VIEWONLYONCE = $00004000; (* Bit 14 - View file only once      *)
  965.          USER_SYSOP        = $00008000; (* Bit 15 - Added BBS to BBS list    *)
  966.          USER_VIP          = $00010000; (* Bit 16 - VIP member               *)
  967.          USER_BULLETCHK    = $00020000; (* Bit 17 - New bulletins check      *)
  968.          USER_WSCURSORS    = $00040000; (* Bit 18 - Use Wordstar cursor keys *)
  969.          USER_DL_FILEDESC  = $00080000; (* Bit 19 - Download file descs      *)
  970.          USER_FILEDESC_FMT = $00100000; (* Bit 20 - 0=FILES.BBS, 1=DESCRIPT.ION *)
  971.  
  972.                                                  (* OfflineAttrib :          *)
  973.          OFFLINE_WELCOME   = $00000001;          (* Include WELCOME.ANS      *)
  974.          OFFLINE_NEWS      = $00000002;          (* Include NEWS.ANS         *)
  975.          OFFLINE_GOODBYE   = $00000004;          (* Include GOODBYE.ANS      *)
  976.          OFFLINE_NEWFILES  = $00000008;          (* Include new files list   *)
  977.          OFFLINE_NEWBULLET = $00000010;          (* Include new bulletins    *)
  978. {}       OFFLINE_LASTREAD  = $00000020;          (* Include last read ptrs   *)
  979. {}       OFFLINE_ALLMAIL   = $00000040;          (* 'All' msgs as personal?  *)
  980. {}       OFFLINE_AUTOMATIC = $00000080;          (* Offline packing used     *)
  981.          OFFLINE_RECEIVED  = $00000100;          (* Mark personal msgs read  *)
  982.          OFFLINE_OWNMSGS   = $00000200;          (* Include own msgs         *)
  983.          OFFLINE_COMBAREAS = $00000400;          (* Only comb.areas to list  *)
  984.          OFFLINE_NORE      = $00000800;          (* Remove RE: from subject  *)
  985.  
  986.          OFFLINEPKT_NONE  = $00;                 (* No offline packet format *)
  987.          OFFLINEPKT_ASCII = $01;                 (* ASCII format             *)
  988.          OFFLINEPKT_QWK   = $02;                 (* QWK format               *)
  989.          OFFLINEPKT_OMEN  = $03;                 (* OMEN format              *)
  990.          OFFLINEPKT_BWAVE = $04;                 (* Bluewave format          *)
  991.  
  992.      type
  993.  
  994.        NameIdxRec = Record                            (* USERINFO.IDX        *)
  995.          NameCRC32   : CRC32;                         (* CRC-32 of real name *)
  996.          AliasCRC32  : CRC32;                         (* CRC-32 of alias     *)
  997.        end;
  998.  
  999.       (* !First record in user file is default user info! *)
  1000.  
  1001.        UserFileHeader = Record               (* USERINFO.DAT - Header        *)
  1002.          Id       : LongInt;                 (* Always ID_USR_HDR            *)
  1003.          Version  : LongInt;                 (* Version number               *)
  1004.          UserSize : SmallWord;               (* Size of user record in bytes *)
  1005.        end;
  1006.  
  1007.        UserRec = Record                               (* USERINFO.DAT Record *)
  1008.          Id            : LongInt;               {  0} (* Always ID_USR_REC   *)
  1009.          Name          : NameStr;               {  4} (* Real name           *)
  1010.          Alias         : NameStr;               { 40} (* Alias               *)
  1011.          City          : CityStr;               { 76} (* City                *)
  1012.          Voice         : PhoneStr;              {102} (* Voice number        *)
  1013.          Data          : PhoneStr;              {123} (* Data number         *)
  1014.          Birthday      : DateRec;               {144} (* Birthday            *)
  1015.          Password      : PassStr;               {146} (* Password            *)
  1016.          Sec           : Security;              {162} (* Security            *)
  1017.          ScreenLen     : Byte;                  {187} (* Screen length       *)
  1018.          Attrib1       : LongInt;               {188} (* User attributes I   *)
  1019.          Attrib2       : LongInt;               {192} (* User attributes II  *)
  1020.          FirstTime     : DateTimeRec;           {196} (* First logon date    *)
  1021.          LastTime      : DateTimeRec;           {200} (* Last logon date     *)
  1022.          TimesCalled   : LongInt;               {204} (* Total times called  *)
  1023.          TotalMinutes  : LongInt;               {208} (* Total minutes used  *)
  1024.          Pages         : LongInt;               {212} (* Total times paged   *)
  1025.          PublicMsgs    : LongInt;               {216} (* Messages posted I   *)
  1026.          PrivateMsgs   : LongInt;               {220} (* Messages posted II  *)
  1027.          UpK           : LongInt;               {224} (* Upload kilobytes    *)
  1028.          UpTimes       : LongInt;               {228} (* Upload times        *)
  1029.          DownK         : LongInt;               {232} (* Download kilobytes  *)
  1030.          DownTimes     : LongInt;               {236} (* Download times      *)
  1031.          SysopCmnt     : ANameStr;              {240} (* Sysop comment       *)
  1032.          Protocol      : Byte;                  {301} (* Protocol number     *)
  1033.          Editor        : Byte;                  {302} (* Editor number       *)
  1034.          Viewer        : Byte;                  {303} (* Viewer number       *)
  1035.          Packer        : Byte;                  {304} (* Packer number       *)
  1036.          CharSet       : Byte;                  {305} (* Char set number     *)
  1037.          LastFileChk   : DateRec;               {306} (* Last new files chk  *)
  1038.          LastBullChk   : DateRec;               {308} (* Last new bullet chk *)
  1039.          Expiration    : DateRec;               {310} (* Expiration date     *)
  1040.          FirstMenu     : MenuStr;               {312} (* First menu to enter *)
  1041.          Language      : MenuStr;               {321} (* Language file       *)
  1042.          MessageArea   : LongInt;               {330} (* Msg area number     *)
  1043.          MAreaExt      : GroupStr;              {334} (* N/A                 *)
  1044.          FileArea      : LongInt;               {338} (* File area number    *)
  1045.          FAreaExt      : GroupStr;              {342} (* N/A                 *)
  1046.          Door          : LongInt;               {346} (* Door number         *)
  1047.          DoorExt       : GroupStr;              {350} (* N/A                 *)
  1048.          ChatChannel   : LongInt;               {354} (* Chat channel number *)
  1049.          TodayCalls    : Byte;                  {358} (* Today times called  *)
  1050.          TodayElapsed  : SmallInt;              {359} (* Today minutes used  *)
  1051.          TodayDownK    : LongInt;               {361} (* Today download kB   *)
  1052.          TodayDowns    : LongInt;               {365} (* Today DL times      *)
  1053.          TimeInBank    : LongInt;               {369} (* Total time in bank  *)
  1054.          DLLimitInBank : LongInt;               {373} (* Total limit in bank *)
  1055.          ViewFileName  : QWKStr;                {377} (* View file name      *)
  1056.          OfflineFmt    : Byte;                  {390} (* Offline packet fmt  *)
  1057.          OfflineDays   : Byte;                  {391} (* Automatic pack days *)
  1058.          OfflineAttrib : LongInt;               {392} (* Offline attributes  *)
  1059.          ReadMsgNum    : Byte;                  {396}
  1060.          FileListNum   : Byte;                  {397}
  1061.          TodayLastPkt  : Byte;                  {398} (* Today last pkt num  *)
  1062.          VerifyCalls   : Byte; (* Calls since last birthday verify, 255 = verify failed *)
  1063.          PasswordTries : Byte; (* Number of wrong passwords entered since last call *)
  1064.          OfflineMaxNum : SmallWord;             {401} (* Max msgs to pack *)
  1065.          FlexPos       : LongInt;               {403} (* Flex record number *)
  1066.          LastPktDl     : DateRec;               {407}
  1067.          BBSCRC        : LongInt;               {409}
  1068.          Emulation     : Byte;                  {413} (* 1=ANSI, 2=AVATAR, 4=ASCII *)
  1069.          TextFileType  : Byte;                  {414} (* 0=.ANS, 1->=others *)
  1070.          DateFormat    : Byte;                  {415} (* See later *)
  1071.          PasswordCRC   : LongInt;               {416} (* CRC password field *)
  1072.          UserDefNum    : Array [1..10] of LongInt;    (* User definable number variables *)
  1073.          LastVoteChk   : DateRec;               {460}
  1074.          TodayLastDesc : Byte;                  {462} (* Last DESCRIPT.xxx downloaded *)
  1075.          TimeUnits     : LongInt;                     (* 0=not used, -1=none left, >0=n units left *)
  1076.          KBUnits       : LongInt;                     (* 0=not used, -1=none left, >0=n units left *)
  1077.          Empty         : Array [1..29] of Byte; {463}
  1078.        end;
  1079.  
  1080.        (*
  1081.  
  1082.           Date format:
  1083.  
  1084.           Bits 0-1: 00 = MMDDYY
  1085.                     01 = DDMMYY
  1086.                     10 = YYMMDD
  1087.  
  1088.           Bits 2-3: 00 = "-"
  1089.                     01 = "."
  1090.                     10 = "/"
  1091.                     11 = " "
  1092.  
  1093.           Time format:
  1094.  
  1095.           Bit 4:     0 = ":"
  1096.                      1 = "."
  1097.  
  1098.           eg. 00000000 = MM-DD-YY HH:MM
  1099.               00010101 = DD.MM.YY HH.MM
  1100.  
  1101.        *)
  1102.  
  1103.        FlexUserIdxRec = Record (* USERINF2.IDX *)
  1104.          NameCRC32: LongInt;   (* CRC & FilePos -1 if record not used *)
  1105.          FilePos:   LongInt;
  1106.          AddrLen:   SmallWord;
  1107.          CmntLen:   SmallWord;
  1108.          MailLen:   SmallWord;
  1109.          MAreaCnt:  LongInt;
  1110.          FAreaCnt:  LongInt;
  1111.        end;
  1112.  
  1113.        (*
  1114.        FIXED LENGTH DATA (USERINF2.DAT) :
  1115.        Address
  1116.        UserComment
  1117.        Comb. msg areas
  1118.        Msg pkt msg areas
  1119.        Mail scan areas
  1120.        Comb. file areas
  1121.        Message to those who write mail
  1122.        *)
  1123.  
  1124.        ExitRecord = Record                  (* EXITINFO.DAT                  *)
  1125.          BpsRate     : SmallWord;           (* Bps rate div 100              *)
  1126.          COMport     : Byte;                (* COM port                      *)
  1127.          NodeNumber  : Byte;                (* Node number                   *)
  1128.          UserInfo    : UserRec;             (* User information              *)
  1129.          UserRecNum  : LongInt;             (* Record number in USERINFO.*   *)
  1130.          LogonTime   : DateTimeRec;         (* Current logon time            *)
  1131.          PageTimes   : Byte;                (* Times paged SysOp             *)
  1132.          PageReason  : ANameStr;            (* Page reason                   *)
  1133.          TimeLeft    : SmallInt;            (* Time left on this call        *)
  1134.          LimitLeft   : LongInt;             (* DL-limit left on this call    *)
  1135.          NextEvent   : EventRecord;         (* Time of next system event     *)
  1136.          NewNetmail  : Boolean;             (* User has entered new netmail  *)
  1137.          NewEchomail : Boolean;             (* User has entered new echomail *)
  1138.          LastMenu    : MenuStr;             (* Name of last menu entered     *)
  1139.          GosubLevel  : Byte;                (* Level of gosubs               *)
  1140.          GosubMenus  : GosubRecord;         (* Gosub menu name list          *)
  1141.          FlexInfo    : FlexUserIdxRec;      (* USERINF2.DAT index            *)
  1142.          LastInfo    : Byte;                (* Last caller attribute         *)
  1143.          CurrStat    : StatisticRecord;     (* Current call stats            *)
  1144.          LastTimeChk : SmallWord;           (* Last time check [internaluse] *)
  1145.          FilesLeft   : LongInt;             (* DL-files left on this call    *)
  1146.          EventRecNum : SmallWord;           (* NextEvent recnum, 0=misc.event*)
  1147.          GosubCursor : Array [1..MAX_GOSUB] of Byte; (* Gosub menu cursors   *)
  1148.          Empty: Array [1..407] of Byte;     (* Reserved for future expansion *)
  1149.        end;                                 (* USERINF2.DAT information      *)
  1150.  
  1151. (* MAJOR CHANGES :                                                           *)
  1152. (*                                                                           *)
  1153. (* Beta-7: Size of MAreaRec and DoorRec increased by 2 bytes                 *)
  1154. (* Beta-8: String lengths expanded in ModemCfg and ProtocolRecord            *)
  1155. (* Beta-10: File database naming system from CRC-32 to sysop selectable,     *)
  1156. (*          LimitRec expanded by FileLimit variable,                         *)
  1157. (*          EventRec expanded by LastRunTime variable                        *)
  1158. (* Beta-11: Script path to LanguageHeader                                    *)
  1159. (* Beta-18: Better multinode support; COMMON_xxx flags in cfg other settings *)
  1160.