home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / BBS / CEL141.ZIP / CEL141C.ZIP / TOOLKIT.ZIP / RECORDS.PAS < prev    next >
Pascal/Delphi Source File  |  1992-08-14  |  16KB  |  470 lines

  1. const ver='1.41';                           {Version number}
  2.     Mailer='CelMail v1.1';
  3.         NetVer='1.5';                           {Network Version}
  4.         MailVer=1;
  5.         maxconf=5;                              {Number of conferences}
  6.         mailversion=1;                          {CelerityNet Mail Version}
  7.         postversion=1;                          {CelerityNet Bulletin Version}
  8.         maxbatch=30;                            {Maximum number of files to batch}
  9.         maxmessagesize=100;                     {Maxiumum # of lines in a post}
  10.         maxlastcallers=250;                     {Length of last caller list}
  11.         sectorsize=512;
  12.         numsectors=20000;
  13.         maxcatalogsize=100;
  14.         maxgroupsize=50;
  15.         maxsyslogsize=1000;
  16.  
  17. type anystr=string[128];
  18.      lstr=string[80];
  19.      mstr=string[30];
  20.      sstr=string[15];
  21.        cstr=string[45];
  22.  
  23.     accesstype=(bylevel,keepout,letin,invalid);     {Post access}
  24.     availtype=(available,bytime,notavailable);      {Sysop available}
  25.       configtype=(linefeeds,postprompts,moreprompts,asciigraphics,
  26.        fudsysop,fbulletinsysop,fvotingsysop,femailsysop,fdoorsysop,fmainsysop,
  27.        fdatabasesysop,fNewUserSysop,fgfsysop    );
  28.     boardorder=array [0..255,1..maxconf] of byte;            {Order of subs}
  29.     filelisttype=(ffname,ffext,fffulnam,ffofwhat,ffsize,ffpoints,ffuploader,
  30.                    ffuploaded,ffdown,ffdescript);   {Configurable file listings}
  31.     NuvSet=set of 1..255;
  32.  
  33. type userrec=record          {Version 1.40}
  34.      UserID:longint;         {User identification number}
  35.      handle:mstr;            {User's handle}
  36.      realname:mstr;          {User's real first/last name}
  37.      InterNetName:sstr;      {name for internet mail}
  38.      Signature:lstr;         {User's signature}
  39.      Address:array[1..2] of mstr; {Street Address}
  40.      macro:array[1..3] of mstr;  {Macros}
  41.          note:mstr;              {User note:  'Sysop of XXX' etc.}
  42.      PrivNote:lstr;          {Sysop note}
  43.          password:sstr;          {Password}
  44.          phonenum:string[12];    {Phone #.  If blank, user will be prompted}
  45.          laston:longint;         {Last time on in PackTime format}
  46.      NumCalls,               {Number of calls to system}
  47.          temp1:integer;
  48.          totaltime:real;         {Total time spent on board}
  49.          udlevel,                            {Xfer section access level}
  50.          level,                  {Main BBS access level  -5 through 100}
  51.          HelpLevel:integer;      {Novice / Expert Mode}
  52.          udpoints:longint;       {Current file points}
  53.      Access:Longint;         {Access flags} {for next ver}
  54.  
  55.      SpareLongs:array[1..8] of longint;  {unused}
  56.  
  57.      AutoChatCall:boolean;   {Call chat upon login}
  58.          infoforms:array[1..5] of integer;
  59.                                          {Location values for Infoforms.  Set to -1}
  60.          regularcolor,           {User's color values.  Setting to 0 will}
  61.          promptcolor,            {cause system to remap them to the current}
  62.          statcolor,              {defaults, as set in config.}
  63.          inputcolor,
  64.          fifthcolor,
  65.          sixthcolor,
  66.          seventhcolor,
  67.          eighthcolor,
  68.  
  69.          displaylen:byte;        {User's display length.  20-50 lines.}
  70.          lastmessages,           {Used for determining "how many new posts"}
  71.          lastups:integer;        {'' "new uploads"}
  72.      SingleKey:boolean;      {use single key input}
  73.          defproto:char;           {Default xfer protocol.  Character.}
  74.          hack:byte;              {Hack attempts since last call.  If >5, ask for phone #}
  75.      config:set of configtype;
  76.                                {Certain configuration options for user/access}
  77.      newscanconfig,          {User subboard newscan data}
  78.      access1,                {User access flags for subs}
  79.      access2:set of byte;    {Second access flag set for subs}
  80.          lastread:array [0..40,1..maxconf] of word;
  81.                                          {Last post read on each sub}
  82.      confaccess: array [0..maxconf] of boolean;
  83.                                          {Conference access flags}
  84.      XferConfAccess:array[0..maxconf] of boolean;
  85.      XferScan:array[0..50,0..maxconf] of boolean; {xfer scan flags}
  86.          lastcps,                {Average cps rate for downloading}
  87.          cpstimes:word;          {Times counted for average}
  88.          filelister:array[1..3] of set of filelisttype;
  89.                                          {File listing configuration}
  90.      CurList:byte;           {Which list currently in use?}
  91.          commpoints,             {Points gained via commission since last call}
  92.          valpoints:integer;      {Points gained from validation since last call}
  93.          ScanNet:boolean;        {Flag to scan CelerityNet subs or not}
  94.          quikconf:array[1..maxconf] of boolean;
  95.                                          {Quickscan conferences flags}
  96.      QuikXferConf:array[1..maxconf] of boolean;
  97.                      {Quickscan xfer conferences}
  98.          userpcr,                {Individual post/call ratio.  0=use default}
  99.          userudr,                {Individual upload/download ratio.  0=default}
  100.          usergenr,               {General ratio}
  101.          age:byte;               {User's age.  6-89.  If less than 0, user will
  102.                                                 be prompted for both age and sex}
  103.      usersex:boolean;        {True=female.  Approved by Deanna Elizalda, Feminist}
  104.          Expiration,             {Date of account expiration}
  105.          birthdate:longint;      {date of birth}
  106.          voteyes,                {Number of votes cast for validation in NUV}
  107.          voteno:byte;            {Number against user in NUV}
  108.          timeperday:byte;        {Individual user's time per day.  0=default by lvl}
  109.          Posts_Month,
  110.          Posts_all,
  111.          Uploads_Month,
  112.          Uploads_All,
  113.          Dnloads_Month,
  114.          Dnloads_all:integer;
  115.          UpBytes_Month,
  116.          UpBytes_All,
  117.          DnBytes_Month,
  118.          DnBytes_All:longint;
  119.          PBytes_All,
  120.          PBytes_Month:longint;
  121.          KperDay,
  122.          KToday:Word;
  123.          NoNet:boolean;          {Deny net access}
  124.          Exempt:array[1..5] of boolean;
  125.                      {1-pcr, 2=udr, 3=genr, 4=, 5=xfer}
  126.          SpecialAccess:boolean;
  127.      AutoQwk:boolean;        {Auto-create QWK Packet}
  128.      QwkUpdate:boolean;      {Update Pointers in QWK packet}
  129.      QwkPacker:char;         {code for QWK packer}
  130.      UseYesNo,
  131.      UseFloatPrompt,
  132.      UseColor:boolean;
  133.      UseSignature:boolean;
  134.      UseFSE:boolean;
  135.      PermitPaging:boolean;
  136.      SkipTopTen:boolean;{unused}
  137.      TermEmul:byte;          {0=none, 1=vt52, 2=vt52 Atari, 3=vt100, 4=ANSI,
  138.                               5=Avatar level 0}
  139.      SysopFlags:longint;     {sysop flags #1 to 32}
  140.      AreaAccess:longint;
  141.      VoteData:array[1..8] of byte;   {vote data - nybbles}
  142.      TimeCredit:longint;     {Time credit remaining today}
  143.      temp4,
  144.      temp5,
  145.      temp6:longint;
  146.       end;
  147.  
  148.     newBBSrec=record
  149.             name:string[24];
  150.             Descript:string[60];
  151.             Number:string[20];
  152.             DeviceType:byte;      {0=bbs, 1=VMB, 2=NUA}
  153.             software:string[8];
  154.             megs:word;
  155.             maxbaud:string[4];
  156.       lines:byte;
  157.       mnp:boolean;
  158.             HST:boolean;
  159.             V32:boolean;
  160.             V42:boolean;
  161.             V42bis:boolean;
  162.             V32bis:boolean;
  163.       Allow24k:boolean;
  164.       Allow2200:boolean;
  165.       Allow1920:boolean;
  166.       Allow1680:boolean;
  167.             Allow1440:boolean;
  168.             Allow9600:boolean;
  169.             Allow2400:boolean;
  170.             Allow1200:boolean;
  171.             leftby:mstr;
  172.             when:longint;
  173.             end;
  174.  
  175.         TopTenRec=record
  176.             name:mstr;
  177.             kup,kdn:longint;
  178.             numup,numdn:word;
  179.             posts:word;
  180.             code:byte;
  181.             end;
  182.  
  183.       NewUserVoteRec=record
  184.          handle:mstr;
  185.          usernum:integer;
  186.          voteyes,voteno:NuvSet;
  187.          Comment:array[1..10] of string[84];
  188.       end;
  189.  
  190.       userspecsrec=record                     {quick-lookup user file}
  191.          name:mstr;
  192.          minlevel,maxlevel,minlaston,maxlaston:integer;
  193.          minpcr,maxpcr:real
  194.         end;
  195.  
  196.      boardrec=record                         {Description of sub-board}
  197.        boardname :mstr;        {Name of sub}
  198.        sponsor   :mstr;        {Name of sub-sysop}
  199.        entrypw   :mstr;        {Unused}
  200.        netidnum  :word;        {Network ID number}
  201.        netpwd    :sstr;
  202.        level     :integer;     {Level required for access}
  203.        autodel   :integer;     {Maximum posts on sub}
  204.        anonymous :boolean;     {Allow anonymous posts}
  205.        RealNames :boolean;     {Require real names rather than handles}
  206.        AllowANSI :boolean;     {unused.}
  207.        shortname :sstr;        {Access code for sub.  Usually numeric}
  208.        fidopath  :lstr;        {Fido pathname.  Not currently used.}
  209.        DataName  :lstr;        {Date file pathname.  Not used.}
  210.        OriginLine:lstr;        {Individual sub origin line}
  211.        Zone,
  212.        Net,
  213.        Node,
  214.        Point:word;             {For Fido path}
  215.        AreaName  :lstr;        {MercuryNet}
  216.        MercNode  :string[12];  {MercuryNet Node #}
  217.       end;
  218.  
  219.      bulrec=record                           {Post data}
  220.        leftby,                 {Author of post}
  221.        leftto:mstr;            {Addressed to..}
  222.        title,                  {Title of post}
  223.        status:mstr;            {User's note}
  224.        when:longint;           {When posted.  Packtime format.}
  225.        where:lstr;             {First net origin line}
  226.        where2:lstr;            {Second net origin line}
  227.        version:byte;           {Network version}
  228.        anon,                   {Anonymous post}
  229.        recieved:boolean;       {Received by recipient}
  230.        line,                   {Lines in post}
  231.        plevel:integer;         {Access level of poster}
  232.        id:word;                {Data file address}
  233.        cnet,                   {All unused flags}
  234.        fidonet,
  235.        flag3,
  236.        flag4,
  237.        flag5,
  238.        flag6,
  239.        flag7,
  240.        flag8:boolean;
  241.        realname:mstr;          {Real name of poster}
  242.      end;
  243.  
  244.      message=record
  245.        text:array [1..maxmessagesize] of lstr;
  246.        leftto:mstr;
  247.        title:lstr;
  248.        anon:boolean;
  249.        numlines:integer
  250.      end;
  251.  
  252.       NetPostRec=record    {Record for networked posts}
  253.             NetIdNum: byte;
  254.             BulletinRec: bulrec;
  255.             MessageRec: message;
  256.             end;
  257.  
  258.  
  259.    nodelistrec=record                      {Node list record}
  260.          nodenum:string[7];
  261.          nodepass:string[15];
  262.          bbsname:string[30];
  263.          bbsnumber:string[12];
  264.          firstdate:longint;
  265.          lastdate:longint;
  266.          numconnects:word;
  267.       end;
  268.  
  269.     MailIndexRec=record
  270.          offset            : longint;
  271.          size                : word;
  272.          deleted        : boolean;        {indication if record has been deleted}
  273.          version        : byte;
  274.  
  275.          Title            : mstr;
  276.          LeftTo            : mstr;
  277.          LeftAddr        : word;   {Node to be sent to}
  278.          Sender            : mstr;
  279.          SenderAddr    : sstr;   {User address mail sent from}
  280.          ForwardBy    : mstr;        {was forwarded by}
  281.  
  282.          When                : longint;
  283.          Where1,
  284.          Where2            : lstr;
  285.          return,                                {Send a return receipt}
  286.          anon,
  287.          read                : boolean;  {Anonymous / has read mail}
  288.          filename      : string[12];    {Attached file}
  289.          end;
  290.  
  291.  
  292.       NetSubRec=record
  293.             NetIdNum:byte;
  294.             Conference:lstr;
  295.             Comment:lstr;
  296.             end;
  297.  
  298.      Newsrec=Record                 {record for news}
  299.         Location:Integer;
  300.         Level:Integer;
  301.         From:mstr;
  302.         where:lstr;
  303.         When:longint;
  304.         Title:String[28];
  305.         MaxLevel:Integer;
  306.       End;
  307.  
  308.      lastrec=record                      {last callers}
  309.        name:mstr;
  310.        callnum:longint;
  311.        when:longint;
  312.        speed:mstr;
  313.      end;
  314.  
  315.       XferListRec=record
  316.             Username:mstr;
  317.             Filename:mstr;
  318.             Size:longint;
  319.             When:longint;
  320.             cps:word;
  321.             end;
  322.  
  323.      buffer=array [1..sectorsize] of char;
  324.  
  325.       parsedentry=array [1..maxcats] of anystr;
  326.  
  327.      udrec=record
  328.        sentby:mstr;                 { Who uploaded the file}
  329.        when,                        { When was it uploaded}
  330.        whenrated:longint;           { When was it validated}
  331.        filename,                    { DOS filename}
  332.        dlpw:sstr;                   { Password to download it}
  333.        path:string[50];             { Full pathname pointing to location}
  334.        points:integer;              { Cost to download}
  335.        filesize:longint;            { Size (in bytes)}
  336.        descrip:lstr;                { 44 character description}
  337.        downloaded:integer;          { Number of times downloaded}
  338.        newfile,                     { Unvalidated file}
  339.        specialfile:boolean;         { Special request}
  340.        progname:string[20];         { This is the full name of the program}
  341.        ofwhat1,ofwhat2:byte;        { These are for "disk x of y"}
  342.        ptsgiven:integer;            { How many validation points awarded}
  343.        private:mstr;                { Who is a private file for}
  344.      end;
  345.  
  346.  
  347.      arearec=record                      {Transfer Area}
  348.        name,                        { Name of xfer volume}
  349.        xmodemdir:lstr;              { Pathname of xfer section}
  350.        sponsor,                     { Cosysop for xfer section}
  351.        areapw:mstr;                 { Password to enter area.  Unused.}
  352.        slowdrive:boolean;           { If "Slow drive", like a WORM, the system
  353.                                       wont check for existance of file when
  354.                                       listing files}
  355.        level:integer;               { Level required to enter section}
  356.        upload,                      { Allow uploads to section}
  357.        download:boolean;            { Allow downloads from section}
  358.        dataname:lstr;               { A path for the data file, to facilitate
  359.                                       multiple conference access to the area}
  360.      end;
  361.  
  362.  
  363.     OneLinerRec=record
  364.         author:mstr;
  365.         origin:mstr;
  366.         when  :longint;
  367.         Line  :lstr;
  368.         end;
  369.  
  370.   ArtRecord=record
  371.     author:mstr;
  372.     origin:mstr;
  373.     when:longint;
  374.     filename:sstr;
  375.     Descript:lstr;
  376.     end;
  377.  
  378.  
  379.     doorRecord=record
  380.         name:mstr;
  381.         level:byte;
  382.         numused:word;
  383.         Commandline:lstr;
  384.         doortype:byte;
  385.       {0=Celerity, 1=Door.sys, 2=dorinfo.def, 3=chain.txt}
  386.         Collapse:boolean;
  387.         end;
  388.  
  389.  
  390.      logrec=record                        {Sysop log}
  391.        menu,subcommand:integer;
  392.        param:string[41];
  393.        when:longint
  394.      end;
  395.  
  396.      syslogdatrec=record
  397.        menu,subcommand:integer;
  398.        text:mstr
  399.      end;
  400.  
  401.       ModemLogRec=record
  402.          ConnectString:lstr;
  403.          speed:word;
  404.          result:byte;
  405.          end;
  406.  
  407.       protorec=record                      {Protocol choice record}
  408.                           letter:char;
  409.                           desc:string[30];
  410.                           progname:string[12];
  411.                           commfmt:string[60];
  412.               end;
  413.  
  414.      SystemHistoryRec=record
  415.         calls,posts,feedback,email,newusers,uploads,downloads,daynumber:integer;
  416.         netmaid:boolean;
  417.         date:sstr;
  418.         temp1,temp2,temp3,temp4,temp5:integer;
  419.       end;
  420.  
  421.         NodeIDRec=record
  422.             Username:sstr;
  423.             ChatAvail:boolean;
  424.             ChatRequest:byte;
  425.             Activity:byte;
  426.             Update:longint;
  427.             end;
  428.  
  429.  
  430.       {Activities in NodeIDRec:
  431.                 0:nothing
  432.                 1:down
  433.                 2:waiting for call
  434.         3:in login shell
  435.                 4:main menu
  436.                 5:in newscan
  437.                 6:in xfers
  438.         7:xfering files
  439.         8:multinode chat
  440.         9:sysop chat
  441.         10:new user applying
  442.         11:qwk processor
  443.         12:using a door
  444.         13:in login sequence
  445.                 }
  446.  
  447. (*
  448.  
  449.   These are the basic pascal record types used for Celerity v1.40.  Most data
  450.   files are random-access files consisting of equal records, and described
  451.   below.  If you are writing in another language, you can read these files
  452.   but will need to know some of the details:
  453.  
  454.   A "string" is an array of characters as large as the definition (string[20]
  455.   would mean 20 characters) preceded by a length byte.  This byte tells how
  456.   many of those characters are in use.  A length byte of value $04 would mean
  457.   that the first four characters hold valid data, and the rest of the array
  458.   is to be ignored.
  459.  
  460.   An "integer" is a signed 16-bit integer number (-32768 to 32767).
  461.  
  462.   A "longint" is a signed 32-bit integer
  463.  
  464.   A "word" is an unsigned 16-bit integer (0 to 65535).
  465.  
  466.  
  467. *)
  468.  
  469.  
  470.