home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / SYSOP / MODS1.ZIP / QWK.MOD < prev    next >
Text File  |  1994-08-05  |  15KB  |  393 lines

  1. ┌─────────────────────────────────────────────────────────────────────────────┐
  2. │ ModTitle: Asylum Qwk 1.0e                                 August 4, 1994    │
  3. │ What Is?: Internal QWK dl/ul'r  COMMON 2.0+ mod                             │
  4. │                                                                             │
  5. │  1@2077 - Sam                                                               │
  6. │  1@7321 - Zu Digital                                                        │
  7. │                                                                             │
  8. │ Difficulty: A typical Asylum Mod, I call it easy, but who knows.            │
  9. │                                                                             │
  10. │ Files affected: FCNS.H VARDEC.H BBS.C                                       │
  11. │     The very bottom has instructions on adding this to the pulldown menus   │
  12. │ BY: Asylum Group                                                            │
  13. └─────────────────────────────────────────────────────────────────────────────┘
  14.  
  15.  This is the release version of Asylum QWK, and is copyrighted work.  It may be 
  16.  used free of charge, but may not be sold, or modified and released without 
  17.  this header (except by WWIV Software Services), without written permission 
  18.  from Michael Deweese or Sam Morris.
  19.  
  20.   Fixes so far since initial release:
  21.     -) Had to work on the upload REP a little more.
  22.     a) More work on the upload reply packet
  23.     b) Work on deleting of posts if there are to many in an area (yet again,
  24.        related to the upload reply packet)
  25.     c) Finally, REP packet isn't bothering me, this time I have to fix a bug
  26.        in the sysop setting maximum messages to download
  27.     d) Updated the listing of new files
  28.     d+) Add a check to abort if the disk space ran out
  29.  
  30.  
  31.   Please take steps to ensure your BBS can be recovered in case of a problem.
  32.   I take no responsibility in you doing this, or in what the mod may do.
  33.   If you have something to lose, then don't use this mod.
  34.   
  35.   Now... this modification seems to work real well, special care and attention
  36.   is taken by the programmers of the Asylum Group to avoid memory allocation/
  37.   overrun/leaks problems (probably 99% of real problems), but unfortunately,
  38.   no one is perfect.
  39.  
  40.  
  41. A) COMMON
  42.   If you don't already have COMMON installed, exit out of here and do so, the
  43.   version needed by this mod is at least version 2.0b.  2.0c is current, and
  44.   included in this packet.
  45.  
  46.  
  47. 1) QWK.C and QWK.H
  48.   Put Qwk.c and qwk.h in your bbs dir,
  49.  
  50.   QWK*.MSG and QWK*.ANS goes in your gfiles dir.
  51.   (QWKCFG.ANS AND QWK.MSG... maybe others, double check)
  52.  
  53.  
  54. 2) MAKEFILE, if you use Turbo C makefiles, you are on your own, I only know
  55.    the Borland C++ makefile...
  56.  
  57.     At the position that defines BBS_OVL = \
  58.  
  59. =         srsend.obj   subedit.obj  subreq.obj   subxtr.obj   \
  60. =         sysopf.obj   tedit.obj    uedit.obj    voteedit.obj \
  61. =         xferovl.obj  xfertmp.obj  xinit.obj    common.obj \
  62. *         qwk.obj                                ^ Should be there from COMMON
  63.           ^^^^^^^ add this
  64.  
  65.     At the position that defines BBS_O_OVL = \
  66.  
  67. =         $(OBJ)\sysopf.obj   $(OBJ)\tedit.obj    $(OBJ)\uedit.obj    \
  68. =         $(OBJ)\voteedit.obj $(OBJ)\xferovl.obj  $(OBJ)\xfertmp.obj  \
  69. =         $(OBJ)\xinit.obj    $(OBJ)\common.obj   \
  70. +         $(OBJ)\qwk.obj                          ^^^ add that
  71.           ^^^^^^^^^^^^^^ add this                     if needed
  72.  
  73.     And at the end ...
  74.  
  75. = xferovl.obj : xferovl.c
  76. =   $(TCC_OVL)
  77. = xfertmp.obj : xfertmp.c
  78. =   $(TCC_OVL)
  79. = xinit.obj   : xinit.c
  80. =   $(TCC_OVL)
  81. = common.obj : common.c
  82. =  $(TCC_OVL)
  83. + qwk.obj     : qwk.c
  84. +  $(TCC_OVL)
  85.  
  86.  
  87. 3) VARS.H
  88. = #include <dos.h>
  89. = #include <alloc.h>
  90. = #include <time.h>
  91.  
  92. = #include "common.h"
  93. + #include "qwk.h"
  94. = #include "fcns.h"
  95.  
  96.  
  97. 4) VARDEC.H
  98.   Add the following definitions to 'typdef struct { ... } userrec;
  99.   These definitions need to go RIGHT AFTER 'char res_gp[100]'.  If you have
  100.   already added some things right here, it goes BEFORE it (ie right after char
  101.   res_gp)... got it?  If you do not put this in the right place, your user 
  102.   list might get a bit screwy.
  103.  
  104.  
  105.  
  106.  
  107. =       neg_account,    /* $ debit */
  108. =       gold;           /* game money */
  109. =
  110. =     char
  111. =       res_float[32];  /* reserved for real values */
  112. =
  113. =     char
  114. +    // QWK uses 6 BYTES  (***(((*** 6 ****))***) from RES_GP, subtract 6 from
  115. +    // your curr1ent value, ie 99 goes down to 93
  116.       
  117. *       res_gp[93];    /* reserved for whatever */
  118. +
  119. +     unsigned int qwk_max_msgs;
  120. +     unsigned int qwk_max_msgs_per_sub;
  121. +
  122. +     unsigned int qwk_dont_scan_mail : 1;
  123. +     unsigned int qwk_delete_mail : 1;
  124. +     unsigned int qwk_dontsetnscan : 1;
  125. +     unsigned int qwk_remove_color : 1;
  126. +     unsigned int qwk_convert_color : 1;
  127. +     unsigned int qwk_archive : 3;
  128. +
  129. +     unsigned int qwk_leave_bulletin : 1;
  130. +     unsigned int qwk_dontscanfiles : 1;
  131. +     unsigned int qwk_keep_routing : 1;
  132. +     unsigned int                  : 1;
  133. +     unsigned int qwk_protocol : 4;
  134.  
  135. +     // The below should be here from the COMMON mod, it HAS to be installed
  136. =     unsigned int use_internal_tag : 1;
  137. =     unsigned int use_menusys : 1;
  138. =
  139. =     unsigned int use_three : 1;
  140.  
  141.  
  142. ************ NOTE ***************
  143. DID YOU MODIFY RES_GP[???] TO 'ORIGINAL VALUE - 6'? (ie 99 to 93 if you already
  144. have the common mod installed)
  145.  
  146.  
  147. 5) BBS.C
  148.   Make a way to access the QWK menu.  This is in function mainmenu
  149.  
  150. = /*************************************************/
  151. +  if(!strcmp(s, "QWK"))
  152. +    qwk_menu();
  153. =  if ((strcmp(s,"UPLOAD")==0) && (actsl>10))
  154. =    upload_post();
  155.  
  156.  
  157.  
  158. 6) FCNS.H
  159.   Type 'make fcns' or add the following definitions manually.
  160.  
  161.  
  162. 7) OPT_AUTOVAL
  163. If you don't have this #defined, you need to find function properize, in
  164. file NEWUSER.C and move it out of the #define.  Take the whole function
  165. and move it somewhere like the top of the file.
  166.  
  167. /* File: qwk.c */
  168.  
  169. void build_qwk_packet(void);
  170. void qwk_gather_sub(int bn, struct qwk_junk *qwk_info);
  171. void qwk_start_read(int msgnum, struct qwk_junk *qwk_info);
  172. void make_pre_qwk(int msgnum, int *val, struct qwk_junk *qwk_info);
  173. void put_in_qwk(postrec *m1, char *fn, int msgnum, struct qwk_junk *qwk_info);
  174. void make_qwk_ready(char *text, long *len, char *address);
  175. void qwk_remove_null(char *memory, int size);
  176. void build_control_dat(struct qwk_junk *qwk_info);
  177. int _fmsbintoieee(float *src4, float *dest4);
  178. int _fieeetomsbin(float *src4, float *dest4);
  179. void finish_qwk(struct qwk_junk *qwk_info);
  180. void qwk_remove_email(void);
  181. void qwk_gather_email(struct qwk_junk *qwk_info);
  182. int select_qwk_archiver(struct qwk_junk *qwk_info, int ask);
  183. void qwk_which_zip(char *thiszip);
  184. void qwk_which_protocol(char *thisprotocol);
  185. char * qwk_system_name(char *qwkname);
  186. void upload_reply_packet(void);
  187. void ready_reply_packet(char *name);
  188. void make_text_ready(char *text, long len);
  189. char * make_text_file(int filenumber, long *size, int curpos, int blocks);
  190. void qwk_email_text(char *text, long size, char *title, char *to);
  191. void qwk_inmsg(char *text, long size, messagerec *m1, char *aux, char *name, long thetime);
  192. void process_reply_dat(char *name);
  193. void qwk_post_text(char *text, long size, char *title, int sub);
  194. int find_qwk_sub(struct qwk_sub_conf *subs, int amount, int fromsub, char *title);
  195. int iscan_allsubs(int b);
  196. void qwk_menu(void);
  197. void qwk_send_file(char *fn, int *sent, int *abort);
  198. int select_qwk_protocol(struct qwk_junk *qwk_info);
  199. void config_qwk_bw(void);
  200. char *qwk_readfile(messagerec *m1, char *aux, long *l);
  201. long * qwk_save_qscan(void);
  202. void qwk_restore_qscan(long *save_qsc_p);
  203. void insert_after_routing(char *text, char *text2insert, long *len);
  204. void smasm(struct qwk_config *qwk_cfg);
  205. void qwk_sysop(void);
  206. void modify_bulletins(struct qwk_config *qwk_cfg);
  207. void close_qwk_cfg(struct qwk_config *qwk_cfg);
  208. void read_qwk_cfg(struct qwk_config *qwk_cfg);
  209. void write_qwk_cfg(struct qwk_config *qwk_cfg);
  210. int get_qwk_max_msgs(unsigned int *max_msgs, unsigned int *max_per_sub);
  211. char *qwk_current_text(int pos, char *text);
  212. void config_qwk(void);
  213. int qwk_open_file(char *fn);
  214. int qwk_iscan(int b);
  215. void qwk_delete(int mn);
  216. void qwk_receive_file(char *fn, int *received, char *ft, int i);
  217. void qwk_nscan(void);
  218.  
  219.  
  220.  
  221.  
  222. *******************************************************************************
  223.  
  224. Other Mods by the Asylum Group: (All require COMMON mod to install)
  225.  
  226.   WWIV User Pulldown Menus
  227.     Featuring script menus, once they are in, you don't need to mod the BBS to
  228.     change your menus around, includes ability to use ALL colors except for
  229.     the blinking ones in your menus, definable security for each menu item, and
  230.     instructions on how to expand the resource language.
  231.        
  232.   List Files Plus  (Listplus)
  233.     In the words of people who have installed this mod, simply the best
  234.     file list/search/tag/view/etc... mod for wwiv.  Allows you to go back and
  235.     forth in the files, selecting the files with the up and down arrow, and at
  236.     the bottom a menu where you use the left and right arrow keys.  The
  237.     menus commands consist of such commands as show next files, show previous
  238.     files, put file in batch queue (or can be done with a space bar), view
  239.     file, download file, enter batch menu, go back and forward a directory.
  240.     And now, it shows the files description, in true Vision/2 style, when you
  241.     list the files.
  242.  
  243.   Q/Nscan Config Plus
  244.     Based on the same interface as listfiles plus, allows you to select the
  245.     subs and directories in your Q/Nscan simply by arrow keying to it and 
  246.     pressing the space bar to toggle it.  Has menu options (left and right
  247.     arrow key) to toggle all on or off, view next dirs/subs (if they don't all
  248.     fit on the screen) and view the previous dirs/subs.  Full conference 
  249.     support (auto-detecting) included.
  250.   
  251.  
  252.  
  253.  
  254. If you use the pulldown menus, you can make this modification to add QWK
  255. to the pulldown menus
  256.  
  257.  
  258.  
  259. 1) PDCOMP.H
  260. =                         #ifdef PDCOMPILER
  261. =                           {"DEBUG"},
  262. =                         #else
  263. =                           {pd_debug},
  264. =                         #endif
  265. =
  266. =                         #ifdef PDCOMPILER
  267. =                           {"LIST_COMMON"},
  268. =                         #else
  269. =                           {pd_show_common_mods},
  270. =                         #endif
  271. =
  272. +                         #ifdef PDCOMPILER
  273. +                           {"QWK_MENU"},
  274. +                         #else
  275. +                           {qwk_menu},
  276. +                         #endif
  277. +
  278. +                         #ifdef PDCOMPILER
  279. +                           {"UPLOAD_REPLY_PACKET"},
  280. +                         #else
  281. +                           {upload_reply_packet},
  282. +                         #endif
  283. +
  284. +                         #ifdef PDCOMPILER
  285. +                           {"BUILD_QWK_PACKET"},
  286. +                         #else
  287. +                           {build_qwk_packet},
  288. +                         #endif
  289. +
  290. +                         #ifdef PDCOMPILER
  291. +                           {"CONFIG_QWK"},
  292. +                         #else
  293. +                           {config_qwk},
  294. +                         #endif
  295. +
  296. +                         #ifdef PDCOMPILER
  297. +                           {"QWK_SYSOP"},
  298. +                         #else
  299. +                           {qwk_sysop},
  300. +                         #endif
  301. +
  302. +                         #ifdef PDCOMPILER
  303. +                           {"CONFIG_QSCAN"},
  304. +                         #else
  305. +                           {config_qscan},
  306. +                         #endif
  307. +
  308. +                         #ifdef PDCOMPILER
  309. +                           {"CONFIG_NSCAN"},
  310. +                         #else
  311. +                           {config_nscan},
  312. +                         #endif
  313. =
  314. =
  315. =
  316. =
  317. =                           {0}
  318. = };  /* End of commands */
  319.  
  320. Recompile PDCOMP.EXE now...
  321. ^^^^^^^^^^^^^^^^^^^^^
  322.  
  323.  
  324. And add a menu option, something like this... (This example in MAIN_PD.SRC)
  325.  
  326. =   StartItem "Other Areas"
  327. =     "Transfer Area           T"       T    transfer
  328. =     "Chat with the Sysop     C"       C    reqchat
  329. =     "Set your defaults       D"       D    defaults
  330. =     "Online programs         ."       .    do_chains
  331. =     "Voting Booth            V"       V    vote
  332. =     "Bulletin area           G"       G    gfiles
  333. =     "Auto Message            A"       A    write_automessage
  334. =     "Time Bank               $"       $    time_bank
  335. =     "BBS list                B"       B    bbslist
  336. =     "Chat Room                "       0    chat_room
  337. =     "Sysop menu area         W"       W    sysop_pd
  338. =       MinSL 255
  339. =   EndItem
  340. =
  341. +   StartItem "Qwk"
  342. +     "Qwk Menu               "  0  qwk_menu
  343. +     "Upload reply packet    "  0  upload_reply_packet
  344. +     "Download QWK packet    "  0  build_qwk_packet
  345. +     "Config my QWK settings "  0  config_qwk
  346. +     "Config QScan (messages)"  0  config_qscan
  347. +     "Config Nscan (files)   "  0  config_nscan
  348. +     "Sysop Qwk config       "  0  qwk_sysop
  349. +       MinSL 255
  350. +   EndItem
  351. =
  352. =   StartItem "Leaving"
  353. =     "Turn off novice menus   X"       X    expert
  354. =     "Logoff of our BBS       O"       O    logoff
  355.  
  356. Recompile your .SRC file you modifed...
  357.  
  358.  
  359. 3) Finally recompile your bbs, so the changes in PDCOMP.H take effect.
  360.  
  361. Credit where credit is due:
  362.  
  363. Thanks goes to Dave Wallace, Emerald Lady, Dawg, Spotnick, Unca Scrooge, 
  364. and the many, many other folks who have spent many hours helping us to produce
  365. this modification.  Thanks in part to their efforts, we can comfortably say
  366. that Asylum QWK is as good or better than any QWK offline mail packet 
  367. generator on the market.  
  368.  
  369. Thanks to Michael Leib, Barry <Waston?> and the guys at WOMR for their QWK
  370. packages.   
  371.  
  372. Thanks to Tolkien, Jim Wire, and Filo for their hard work and dedication 
  373. to WWIV.
  374.  
  375. And a special thanks to Wayne Bell.
  376.  
  377.  
  378. Payment:
  379.  
  380. Asylum QWK is not shareware.  We are releasing it free of charge.  We feel QWK
  381. is something that will highly benefit WWIV, and help it to become a more com-
  382. petitive BBS software in the BBS software market.  Therefore, no payment is
  383. required.  This modification *is* copyrighted.
  384.  
  385. However, if you feel that Asylum QWK is just what you have been looking for in 
  386. an offline mail packet generator, and would like to make a voluntary con-
  387. tribution, you may send it to the following address:
  388.  
  389. Michael Deweese
  390. 4246 Wilson Mountain Rd
  391. Roanoke VA  24014
  392.  
  393.