home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / muprg110.zip / MAX_U.H < prev    next >
C/C++ Source or Header  |  1995-08-03  |  9KB  |  175 lines

  1. /*# name=Maximus USER.BBS structure definition
  2. */
  3.  
  4. #ifndef __MAX_U_H_DEFINED
  5. #define __MAX_U_H_DEFINED
  6.  
  7. #include "typedefs.h"
  8. #include "stamp.h"
  9.  
  10.  
  11. #define MAX_ALEN         64     /* Max length of usr.msg[] and usr.files[]  */
  12.  
  13.  
  14. /* Masks for usr.bits1, below */
  15.  
  16. #define BITS_HOTKEYS     0x0001 /* Hotkeys, independent of HOTFLASH level   */
  17. #define BITS_NOTAVAIL    0x0002 /* If set, user is NOT normally available   *
  18.                                  * for chat.                                */
  19. #define BITS_FSR         0x0004 /* Full-screen reading in msg areas         */
  20. #define BITS_NERD        0x0008 /* Yelling makes no noise on sysop console  */
  21. #define BITS_NOULIST     0x0010 /* Don't display name in userlist           */
  22. #define BITS_TABS        0x0020 /* User can handle being sent raw tabs      */
  23. #define BITS_ENCRYPT     0x0040 /* pwd is a MD5 digest, not plaintext       */
  24. #define BITS_RIP         0x0080 /* Remote Imaging Prototocol support        */
  25.  
  26.  
  27. /* Masks for usr.bits2, below */
  28.  
  29. #define BITS2_BADLOGON   0x0001 /* MAX: if user's last logon attempt was bad*/
  30. #define BITS2_IBMCHARS   0x0002 /* MAX: if user can receive high-bit chars  */
  31. #define BITS2_RSVD1      0x0004 /* MAX: *obsolete* 1.02 avatar flag         */
  32. #define BITS2_BORED      0x0008 /* Use the line-oriented editor             */
  33. #define BITS2_MORE       0x0010 /* Wants the "MORE?" prompt                 */
  34. #define BITS2_RSVD2      0x0020 /* OPUS: set=wants Ansi                     */
  35. #define BITS2_CONFIGURED 0x0040 /* OPUS: set=used Maximus before            */
  36. #define BITS2_CLS        0x0080 /* OPUS: set=transmit ^L, clear=ignore ^L   */
  37. #define BITS2_BIT8       0x0100 /* used to be 'usr.keys'                    */
  38. #define BITS2_BIT9       0x0200 /* used to be 'usr.keys'                    */
  39. #define BITS2_BITA       0x0400 /* used to be 'usr.keys'                    */
  40. #define BITS2_BITB       0x0800 /* used to be 'usr.keys'                    */
  41. #define BITS2_BITC       0x1000 /* used to be 'usr.keys'                    */
  42. #define BITS2_BITD       0x2000 /* used to be 'usr.keys'                    */
  43. #define BITS2_BITE       0x4000 /* used to be 'usr.keys'                    */
  44. #define BITS2_BITF       0x8000 /* used to be 'usr.keys'                    */
  45.  
  46. #define SEX_UNKNOWN       0x0000
  47. #define SEX_MALE          0x0001
  48. #define SEX_FEMALE        0x0002
  49.  
  50. /* Masks for usr.delflag, below.  WARNING!  Only the first eight bits       *
  51.  * of this flag should be used for compatibility with df_save!              */
  52.  
  53. #define UFLAG_DEL   0x01
  54. #define UFLAG_PERM  0x02
  55.  
  56. /* Masks for usr.xp_flag, below */
  57.  
  58. #define XFLAG_EXPDATE    0x0001 /* Use the xp_date to control access        */
  59. #define XFLAG_EXPMINS    0x0002 /* Use the xp_mins number to control access */
  60. #define XFLAG_DEMOTE     0x0004 /* Demote user to priv level in usr.xp_priv */
  61. #define XFLAG_AXE        0x0008 /* Just hang up on user                     */
  62.  
  63. /* Constants for usr.video, below */
  64.  
  65. #define GRAPH_TTY         0x00 /* The current user's graphics setting...    */
  66. #define GRAPH_ANSI        0x01 
  67. #define GRAPH_AVATAR      0x02
  68. #define GRAPH_RIP         0x03
  69.  
  70. typedef struct _usrndx
  71. {
  72.   dword hash_name;
  73.   dword hash_alias;
  74. } USRNDX;
  75.  
  76. struct   _usr
  77.    {
  78.       byte name[36];        /* Caller's name                               0*/
  79.       byte city[36];        /* Caller's location                          36*/
  80.  
  81.       byte alias[21];       /* MAX: user's alias (handle)                 72*/
  82.       byte phone[15];       /* MAX: user's phone number                   93*/
  83.  
  84.       word lastread_ptr;    /* MAX: a num which points to offset in      108*/
  85.                             /* file -- Offset of lastread pointer will be   */
  86.                             /* lastread_ptr*sizeof(int).                    */
  87.  
  88.       word timeremaining;   /* MAX: time left for current call (xtern pro110*/
  89.  
  90.       byte pwd[16];         /* Password                                  112*/
  91.       word times;           /* Number of previous calls to this system   128*/
  92.       byte help;            /* Help level                                130*/
  93.       word group;           /* Group number (not implemented)            131*/
  94.       byte video;           /* user's video mode (see GRAPH_XXXX)        133*/
  95.       byte nulls;           /* Number of Nulls (delays) after <cr>       134*/
  96.  
  97.       byte bits;            /* Bit flags for user (number 1)             135*/
  98.  
  99.       word dob_year;        /* Date of birth: year (1900-)               136*/
  100.  
  101.       word bits2;           /* Bit flags for user (number 2)             138*/
  102.  
  103.       word max2priv;        /* Max 2.x priv level (NOT USED)             140*/
  104.       char dataphone[19];   /* Data/business phone number                142*/
  105.       byte struct_len;      /* len of struct, divided by 20. SEE ABOVE!  161*/
  106.       word time;            /* Time on-line so far today                 162*/
  107.  
  108.       word delflag;         /* Used to hold baud rate for O)utside comman164*/
  109.                             /* In USER.BBS, usr.flag uses the constants     */
  110.                             /* UFLAG_xxx, defined earlier in this file.     */
  111.       
  112.       dword msgs_posted;    /* Total number of messages posted           166*/
  113.       dword msgs_read;      /* Total number of messages read             170*/
  114.  
  115.       byte width;           /* Width of the caller's screen              174*/
  116.       byte len;             /* Height of the caller's screen             175*/
  117.       word credit;          /* Matrix credit, in cents                   176*/
  118.       word debit;           /* Current matrix debit, in cents            178*/
  119.  
  120.       word xp_priv;         /* Priv to demote to, when time or minutes ru180*/
  121.                             /* out.                                         */
  122.  
  123.       union stamp_combo xp_date;  /* Bit-mapped date of when user expires182*/
  124.                                   /* If zero, then no expiry date.          */
  125.  
  126.       dword xp_mins;        /* How many minutes the user has left before 186*
  127.                              * expiring.                                    */
  128.  
  129.       byte  xp_flag;        /* Flags for expiry.  See above XFLAG_XXX def190*/
  130.       byte  sex;            /* Sex: SEX_MALE or SEX_FEMALE)              191*/
  131.  
  132.       union stamp_combo ludate;   /* Bit-mapped date of user's last call 192*/
  133.  
  134.       dword xkeys;          /* User's keys (all 32 of 'em)               196*/
  135.       byte  lang;           /* The user's current language #             200*/
  136.       sbyte def_proto;      /* Default file-transfer protocol            201*/
  137.  
  138.       dword up;             /* K-bytes uploaded, all calls               202*/
  139.       dword down;           /* K-bytes downloaded, all calls             206*/
  140.       sdword downtoday;     /* K-bytes downloaded, today                 210*/
  141.  
  142.       byte rsvd45[18];      /* Reserved by Maximus for future use        214*/
  143.  
  144.       word call;            /* Number of previous calls today            232*/
  145.  
  146.       byte compress;        /* Default compression program to use        234*/
  147.  
  148.       byte df_save;         /* Used for storing real usr.delflag in      235*
  149.                              * LASTUSxx.BBS while in a door.                */
  150.  
  151.       dword extra;                                                     /*236*/
  152.       SCOMBO date_1stcall;  /* Date of first call to system              240*/
  153.       SCOMBO date_pwd_chg;  /* Date of last password change              244*/
  154.  
  155.       dword nup;            /* Number of files uploaded                  248*/
  156.       dword ndown;          /* Number of files downloaded                252*/
  157.       sdword ndowntoday;    /* Number of files downloaded today          256*/
  158.  
  159.       word time_added;      /* Time credited to the user for today       260*/
  160.       byte msg[MAX_ALEN];   /* Current message area                      262*/
  161.       byte files[MAX_ALEN]; /* Current file area                         326*/
  162.  
  163.       byte dob_day;         /* Date of birth: day (1-31)                 390*/
  164.       byte dob_month;       /* Date of birth: month (1-12)               391*/
  165.       dword point_credit;   /* Total points allocated                    392*/
  166.       dword point_debit;    /* Total points used                         396*/
  167.       SCOMBO date_newfile;  /* Date of last new-files check              400*/
  168.       word priv;            /* Privilege level                           404*/
  169.       byte rsvd6[54];       /* Reserved for future use                   406*/
  170.                                                                        /*460*/
  171.    };
  172.  
  173. #endif /* __MAX_U_H_DEFINED */
  174.  
  175.