home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / lora299s.zip / LORA241.H < prev    next >
C/C++ Source or Header  |  1998-05-12  |  14KB  |  688 lines

  1.  
  2. // LoraBBS Version 2.99 Free Edition
  3. // Copyright (C) 1987-98 Marco Maccaferri
  4. //
  5. // This program is free software; you can redistribute it and/or modify
  6. // it under the terms of the GNU General Public License as published by
  7. // the Free Software Foundation; either version 2 of the License, or
  8. // (at your option) any later version.
  9. //
  10. // This program is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. // GNU General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU General Public License
  16. // along with this program; if not, write to the Free Software
  17. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. typedef unsigned int   bit;
  20. typedef unsigned short word;
  21. typedef unsigned char  byte;
  22. typedef long           dword;
  23.  
  24. #define  TWIT        0x10
  25. #define  DISGRACE    0x20
  26. #define  LIMITED     0x30
  27. #define  NORMAL      0x40
  28. #define  WORTHY      0x50
  29. #define  PRIVIL      0x60
  30. #define  FAVORED     0x70
  31. #define  EXTRA       0x80
  32. #define  CLERK       0x90
  33. #define  ASSTSYSOP   0xA0
  34. #define  SYSOP       0xB0
  35.  
  36. struct _sys_msg {
  37.    char  msg_name[70];
  38.    short msg_num;
  39.    char  msg_path[40];
  40.    char  origin[56];
  41.    bit   echomail       :1;
  42.    bit   netmail        :1;
  43.    bit   fpublic        :1;
  44.    bit   fprivate       :1;
  45.    bit   anon_ok        :1;
  46.    bit   no_matrix      :1;
  47.    bit   squish         :1;
  48.    bit   kill_unlisted  :1;
  49.    word  msg_sig;
  50.    char  echotag[32];
  51.    word  pip_board;
  52.    byte  quick_board;
  53.    byte  msg_priv;
  54.    long  msg_flags;
  55.    byte  write_priv;
  56.    long  write_flags;
  57.    byte  use_alias;
  58.    short max_msgs;
  59.    short max_age;
  60.    short age_rcvd;
  61.    char  forward1[80];
  62.    char  forward2[80];
  63.    char  forward3[80];
  64.    bit   msg_restricted :1;
  65.    bit   passthrough    :1;
  66.    bit   internet_mail  :1;
  67.    byte  areafix;
  68.    char  qwk_name[14];
  69.    long  afx_flags;
  70.    word  gold_board;
  71.    bit   sendonly       :1;
  72.    bit   receiveonly    :1;
  73.    char  filler1[26];
  74. };
  75.  
  76. struct _sys_file {
  77.    char  file_name[70];
  78.    short file_num;
  79.    char  uppath[40];
  80.    char  filepath[40];
  81.    char  filelist[50];
  82.    bit   freearea  :1;
  83.    bit   norm_req  :1;
  84.    bit   know_req  :1;
  85.    bit   prot_req  :1;
  86.    bit   nonews    :1;
  87.    bit   no_global_search :1;
  88.    bit   no_filedate :1;
  89.    bit   file_restricted :1;
  90.    word  file_sig;
  91.    byte  file_priv;
  92.    long  file_flags;
  93.    byte  download_priv;
  94.    long  download_flags;
  95.    byte  upload_priv;
  96.    long  upload_flags;
  97.    byte  list_priv;
  98.    long  list_flags;
  99.    char  filler2[10];
  100.    char  short_name[13];
  101.    char  filler3[8];
  102.    char  tic_tag[32];
  103.    char  tic_forward1[80];
  104.    char  tic_forward2[80];
  105.    char  tic_forward3[80];
  106.    byte  tic_level;
  107.    long  tic_flags;
  108.    bit   cdrom     :1;
  109.    char  filler4[106];
  110. };
  111.  
  112. #define MAT_CM           0x0001
  113. #define MAT_DYNAM        0x0002
  114. #define MAT_BBS          0x0004
  115. #define MAT_NOREQ        0x0008
  116. #define MAT_OUTONLY      0x0010
  117. #define MAT_NOOUT        0x0020
  118. #define MAT_FORCED       0x0040
  119. #define MAT_LOCAL        0x0080
  120. #define MAT_SKIP         0x0100
  121. #define MAT_NOMAIL24     0x0200
  122. #define MAT_NOOUTREQ     0x0400
  123. #define MAT_NOCM         0x0800
  124. #define MAT_RESERV       0x1000
  125. #define MAT_RESYNC       0x2000
  126.  
  127. typedef struct _event {
  128.    short days;
  129.    short minute;
  130.    short length;
  131.    short errlevel[9];
  132.    short last_ran;
  133.    short behavior;
  134.    short echomail;
  135.    short wait_time;
  136.    short with_connect;
  137.    short no_connect;
  138.    short node_cost;
  139.    char  cmd[32];
  140.    char  month;
  141.    char  day;
  142.    char  err_extent[6][4];
  143.    short extra[1];
  144.    short res_zone;
  145.    short res_net;
  146.    short res_node;
  147.    short res_point;
  148.    char  route_tag[16];
  149. };
  150.  
  151. #define MAXLREAD   250
  152. #define MAXDLREAD  20
  153. #define MAXFLAGS   4
  154. #define MAXCOUNTER 10
  155.  
  156. struct _lastread {
  157.    word area;
  158.    short msg_num;
  159. };
  160.  
  161. struct _usr {
  162.    char  name[36];
  163.    char  handle[36];
  164.    char  city[26];
  165.  
  166.    struct _lastread lastread[MAXLREAD];
  167.    struct _lastread dynlastread[MAXDLREAD];
  168.  
  169.    char  pwd[16];
  170.    dword times;
  171.    word  nulls;
  172.    word  msg;
  173.  
  174.    bit   avatar    :1;
  175.    bit   color     :1;
  176.    bit   scanmail  :1;
  177.    bit   use_lore  :1;
  178.    bit   more      :1;
  179.    bit   ansi      :1;
  180.    bit   kludge    :1;
  181.    bit   formfeed  :1;
  182.  
  183.    bit   hotkey    :1;
  184.    bit   tabs      :1;
  185.    bit   full_read :1;
  186.    bit   badpwd    :1;
  187.    bit   usrhidden :1;
  188.    bit   nokill    :1;
  189.    bit   ibmset    :1;
  190.    bit   deleted   :1;
  191.  
  192.    byte  language;
  193.    byte  priv;
  194.    long  flags;
  195.    char  ldate[20];
  196.    short   time;
  197.    dword upld;
  198.    dword dnld;
  199.    short   dnldl;
  200.    word  n_upld;
  201.    word  n_dnld;
  202.    word  files;
  203.    word  credit;
  204.    word  dbase;
  205.    char  signature[58];
  206.    char  voicephone[20];
  207.    char  dataphone[20];
  208.    char  birthdate[10];
  209.    char  subscrdate[10];
  210.    char  firstdate[20];
  211.    char  lastpwdchange[10];
  212.    long  ptrquestion;
  213.    byte  len;
  214.    byte  width;
  215.    long  id;
  216.    short   msgposted;
  217.    char  comment[80];
  218.    byte  help;
  219.    word  old_baud_rate;
  220.    byte  counter[MAXCOUNTER];
  221.    word  chat_minutes;
  222.  
  223.    bit   xfer_prior:1;
  224.    bit   quiet     :1;
  225.    bit   nerd      :1;
  226.    bit   donotdisturb:1;
  227.    bit   robbed    :1;
  228.    bit   novote    :1;
  229.    bit   havebox   :1;
  230.    bit   security  :1;
  231.  
  232.    char  protocol;
  233.    char  archiver;
  234.  
  235.    struct _ovr_class_rec {
  236.       short  max_time;
  237.       short  max_call;
  238.       short  max_dl;
  239.       word ratio;
  240.       word min_baud;
  241.       word min_file_baud;
  242.       word start_ratio;
  243.    } ovr_class;
  244.  
  245.    short   msg_sig;
  246.    word  account;
  247.    word  f_account;
  248.    short   votes;
  249.    short   file_sig;
  250.  
  251.    long  baud_rate;
  252.  
  253.    bit   dhotkey    :1;
  254.  
  255.    long  alias_id;
  256.  
  257.    char  extradata[281];
  258. };
  259.  
  260. #define LCONFIG_VERSION   3
  261.  
  262. #define MAXNL             20
  263. #define MAXPACKER         20
  264. #define MAX_LANG          20
  265. #define MAX_ALIAS         20
  266.  
  267. struct class_rec {
  268.    short  priv;
  269.    short  max_time;
  270.    short  max_call;
  271.    short  max_dl;
  272.    short  dl_300;
  273.    short  dl_1200;
  274.    short  dl_2400;
  275.    short  dl_9600;
  276.    word ratio;
  277.    word min_baud;
  278.    word min_file_baud;
  279.    word start_ratio;
  280. };
  281.  
  282. struct _alias {
  283.    short  zone;
  284.    short  net;
  285.    short  node;
  286.    short  point;
  287.    word fakenet;
  288.    char *domain;
  289. };
  290.  
  291. struct _configuration {
  292.    short version;
  293.  
  294.    char sys_path[40];
  295.  
  296.    char log_name[40];
  297.    char log_style;
  298.  
  299.    char sched_name[40];
  300.    char user_file[40];
  301.  
  302.    char norm_filepath[40];
  303.    char know_filepath[40];
  304.    char prot_filepath[40];
  305.    char outbound[40];
  306.    char netmail_dir[40];
  307.    char bad_msgs[40];
  308.    char dupes[40];
  309.    char quick_msgpath[40];
  310.    char pip_msgpath[40];
  311.    char ipc_path[40];
  312.    char net_info[40];
  313.    char glob_text_path[40];
  314.    char menu_path[40];
  315.    char flag_dir[40];
  316.  
  317.    long keycode;
  318.  
  319.    char about[40];
  320.    char files[40];
  321.    short  norm_max_kbytes;
  322.    short  prot_max_kbytes;
  323.    short  know_max_kbytes;
  324.    short  norm_max_requests;
  325.    short  prot_max_requests;
  326.    short  know_max_requests;
  327.    char def_pack;
  328.  
  329.    char enterbbs[70];
  330.    char banner[70];
  331.    char mail_only[70];
  332.  
  333.    short  com_port;
  334.    short  old_speed;
  335.    char modem_busy[20];
  336.    char dial[20];
  337.    char init[40];
  338.    char term_init[40];
  339.  
  340.    byte mustbezero;
  341.  
  342.    byte echomail_exit;
  343.    byte netmail_exit;
  344.    byte both_exit;
  345.  
  346.    long speed;
  347.    short modem_OK_errorlevel;
  348.  
  349.    byte filler[10];
  350.  
  351.    struct _altern_dial {
  352.       char prefix[20];
  353.       char suffix[20];
  354.    } altdial[10];
  355.  
  356.    bit  lock_baud   :1;
  357.    bit  ansilogon   :2;
  358.    bit  birthdate   :1;
  359.    bit  voicephone  :1;
  360.    bit  dataphone   :1;
  361.    bit  emsi        :1;
  362.    bit  ibmset      :1;
  363.  
  364.    bit  wazoo       :1;
  365.    bit  msgtrack    :1;
  366.    bit  keeptransit :1;
  367.    bit  hslink      :1;
  368.    bit  puma        :1;
  369.    bit  secure      :1;
  370.    bit  janus       :1;
  371.    bit  terminal    :1;
  372.  
  373.    bit  fillerbug   :1;
  374.    bit  no_direct   :1;
  375.    bit  snooping    :1;
  376.    bit  snow_check  :1;
  377.    bit  unpack_norm :1;
  378.    bit  unpack_know :1;
  379.    bit  unpack_prot :1;
  380.  
  381.    short  blank_timer;
  382.  
  383.    struct _language {
  384.       char txt_path[30];
  385.       char descr[24];
  386.       char basename[10];
  387.    } language[MAX_LANG];
  388.  
  389.    char sysop[36];
  390.    char system_name[50];
  391.    char location[50];
  392.    char phone[32];
  393.    char flags[50];
  394.  
  395.    struct _alias old_alias[20];
  396.  
  397.    char newareas_create[50];
  398.    char newareas_link[50];
  399.  
  400.    short  line_offset;
  401.    short  min_calls;
  402.    short  vote_limit;
  403.    short  target_up;
  404.    short  target_down;
  405.    byte vote_priv;
  406.    byte max_readpriv;
  407.  
  408.    word speed_graphics;
  409.  
  410.    byte aftercaller_exit;
  411.    byte aftermail_exit;
  412.    short  max_connects;
  413.    short  max_noconnects;
  414.  
  415.    byte logon_level;
  416.    long logon_flags;
  417.  
  418.    char areachange_key[4];
  419.    char dateformat[20];
  420.    char timeformat[20];
  421.    char external_editor[50];
  422.  
  423.    struct class_rec class[12];
  424.  
  425.    char local_editor[50];
  426.  
  427.    char QWKDir[40];
  428.    char BBSid[10];
  429.    word qwk_maxmsgs;
  430.  
  431.    char galileo[30];
  432.  
  433.    char norm_okfile[40];
  434.    char know_okfile[40];
  435.    char prot_okfile[40];
  436.  
  437.    char reg_name[36];
  438.    long betakey;
  439.  
  440.    struct _packers {
  441.       char id[10];
  442.       char packcmd[30];
  443.       char unpackcmd[30];
  444.    } packers[10];
  445.  
  446.    struct _nl {
  447.       char list_name[14];
  448.       char diff_name[14];
  449.       char arc_name[14];
  450.    } old_nl[10];
  451.  
  452.    bit  ansigraphics   :2;
  453.    bit  avatargraphics :2;
  454.    bit  hotkeys        :2;
  455.    bit  screenclears   :2;
  456.  
  457.    bit  autozmodem     :1;
  458.    bit  avatar         :1;
  459.    bit  moreprompt     :2;
  460.    bit  mailcheck      :2;
  461.    bit  fullscrnedit   :2;
  462.  
  463.    bit  fillerbits     :2;
  464.    bit  ask_protocol   :1;
  465.    bit  ask_packer     :1;
  466.    bit  put_uploader   :1;
  467.    bit  keep_dl_count  :1;
  468.    bit  use_areasbbs   :1;
  469.    bit  write_areasbbs :1;
  470.  
  471.    short  rookie_calls;
  472.  
  473.    char pre_import[40];
  474.    char after_import[40];
  475.    char pre_export[40];
  476.    char after_export[40];
  477.  
  478.    byte emulation;
  479.    char dl_path[40];
  480.    char ul_path[40];
  481.  
  482.    bit  manual_answer  :1;
  483.    bit  limited_hours  :1;
  484.    bit  solar          :1;
  485.    bit  areafix        :1;
  486.    bit  doflagfile     :1;
  487.    bit  multitask      :1;
  488.    bit  ask_alias      :1;
  489.    bit  random_birth   :1;
  490.  
  491.    short  start_time;
  492.    short  end_time;
  493.  
  494.    char boxpath[40];
  495.    char dial_suffix[20];
  496.  
  497.    char galileo_dial[40];
  498.    char galileo_suffix[40];
  499.    char galileo_init[40];
  500.  
  501.    char areafix_help[40];
  502.    char alert_nodes[50];
  503.  
  504.    char automaint[40];
  505.  
  506.    byte min_login_level;
  507.    long min_login_flags;
  508.    byte min_login_age;
  509.  
  510.    char resync_nodes[50];
  511.    char bbs_batch[40];
  512.    byte altx_errorlevel;
  513.  
  514.    char fax_response[20];
  515.    byte fax_errorlevel;
  516.  
  517.    char dl_counter_limits[4];
  518.  
  519.    char areas_bbs[40];
  520.    byte afx_remote_maint;
  521.    byte afx_change_tag;
  522.  
  523.    bit  allow_rescan    :1;
  524.    bit  check_city      :1;
  525.    bit  check_echo_zone :1;
  526.    bit  save_my_mail    :1;
  527.    bit  mail_method     :2;
  528.    bit  replace_tear    :2;
  529.  
  530.    char my_mail[40];
  531.  
  532.    bit  stripdash       :1;
  533.    bit  use_iemsi       :1;
  534.    bit  newmail_flash   :1;
  535.    bit  mymail_flash    :1;
  536.    bit  keep_empty      :1;
  537.    bit  show_missing    :1;
  538.    bit  random_redial   :1;
  539.  
  540.    char override_pwd[20];
  541.    char pre_pack[40];
  542.    char after_pack[40];
  543.  
  544.    byte modem_timeout;
  545.    byte login_timeout;
  546.    byte inactivity_timeout;
  547.  
  548.    struct _altern_prefix {
  549.       char flag[6];
  550.       char prefix[20];
  551.    } prefixdial[10];
  552.  
  553.    char iemsi_handle[36];
  554.    char iemsi_pwd[20];
  555.    short  iemsi_infotime;
  556.  
  557.    bit  iemsi_on        :1;
  558.    bit  iemsi_hotkeys   :1;
  559.    bit  iemsi_quiet     :1;
  560.    bit  iemsi_pausing   :1;
  561.    bit  iemsi_editor    :1;
  562.    bit  iemsi_news      :1;
  563.    bit  iemsi_newmail   :1;
  564.    bit  iemsi_newfiles  :1;
  565.  
  566.    bit  iemsi_screenclr :1;
  567.    bit  prot_xmodem     :1;
  568.    bit  prot_1kxmodem   :1;
  569.    bit  prot_zmodem     :1;
  570.    bit  prot_sealink    :1;
  571.    bit  tic_active      :1;
  572.    bit  tic_check_zone  :1;
  573.    bit  filebox         :1;
  574.  
  575.    char newkey_code[30];
  576.    char tearline[36];
  577.  
  578.    char  uucp_gatename[20];
  579.    short uucp_zone;
  580.    short uucp_net;
  581.    short uucp_node;
  582.  
  583.    byte carrier_mask;
  584.    byte dcd_timeout;
  585.  
  586.    struct {
  587.       char  display[20];
  588.       short offset;
  589.       char  ident[20];
  590.    } packid[10];
  591.  
  592.    char quote_string[5];
  593.    char quote_header[50];
  594.  
  595.    char tic_help[40];
  596.    char tic_alert_nodes[50];
  597.    char tic_newareas_create[50];
  598.    char tic_newareas_link[50];
  599.    byte tic_remote_maint;
  600.    byte tic_change_tag;
  601.  
  602.    short uucp_point;
  603.  
  604.    byte  dial_timeout;
  605.    byte  dial_pause;
  606.  
  607.    bit   newfilescheck  :2;
  608.    bit   mono_attr      :1;
  609.    bit   force_intl     :1;
  610.    bit   inp_dateformat :2;
  611.    bit   single_pass    :1;
  612.    bit   cdrom_swap     :1;
  613.  
  614.    short ul_free_space;
  615.    char  hangup_string[40];
  616.    char  init2[40];
  617.    char  init3[40];
  618.  
  619.    short page_start[7];
  620.    short page_end[7];
  621.  
  622.    char  logbuffer;
  623.  
  624.    char newareas_path[40];
  625.    char newareas_base;
  626.  
  627.    char answer[40];
  628.  
  629.    bit   blanker_type   :3;
  630.    bit   tcpip          :2;
  631.    bit   export_internet:1;
  632.  
  633.    char  internet_gate;
  634.  
  635.    char  areafix_watch[50];
  636.    char  tic_watch[50];
  637.  
  638.    byte  netmail;
  639.    byte  echomail;
  640.    byte  internet;
  641.    byte  net_echo;
  642.    byte  echo_internet;
  643.    byte  net_internet;
  644.    byte  echo_net_internet;
  645.  
  646.    char  upload_check[50];
  647.    unsigned long setup_pwd;
  648.  
  649.    struct _alias alias[MAX_ALIAS];
  650.  
  651.    struct _nl nl[MAXNL];
  652.  
  653.    char filler_2 [565]; // Per arrivare a 8192 Bytes
  654. };
  655.  
  656. typedef struct _nodeinfo {
  657.    short  zone;
  658.    short  net;
  659.    short  node;
  660.    short  point;
  661.    short  afx_level;
  662.    char pw_session[20];
  663.    char pw_areafix[20];
  664.    char pw_tic[20];
  665.    char pw_packet[9];
  666.    short  modem_type;
  667.    char phone[30];
  668.    short  packer;
  669.    char sysop_name[36];
  670.    char system[36];
  671.    bit  remap4d      :1;
  672.    bit  can_do_22pkt :1;
  673.    bit  wazoo        :1;
  674.    bit  emsi         :1;
  675.    bit  janus        :1;
  676.    bit  pkt_create   :2;
  677.    char aka;
  678.    short tic_level;
  679.    long afx_flags;
  680.    long tic_flags;
  681.    char tic_aka;
  682.    long baudrate;
  683.    char pw_inbound_packet[9];
  684.    char mailer_aka;
  685.    long min_baud_rate;
  686.    char filler[40];
  687. };
  688.