home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / MODS / ALL002.ZIP / ALL002.MOD next >
Encoding:
Text File  |  1995-06-22  |  6.6 KB  |  214 lines

  1. Dale Cooper #1 @10118
  2. Thu Jun 15 16:03:10 1995
  3. ┌────────────────────────────────────────────────────────────────────────────┐
  4. │ Mod Name: ALL002.424       Mod Authors: Swordfish & Dale Cooper            │
  5. │ Difficulty: ██▒▒▒▒▒▒▒▒     Not too hard just follow the steps.             │
  6. │ WWIV Version: 4.24     [6/15/95]                                           │
  7. │ Files Affected: XFEROVL.C                                                  │
  8. │ Mod info: Enhanced global file uploading. Really makes local uploading     │
  9. │           much nicer and simpler.                                          │
  10. │           Tested on a Virgin Source!                                       │
  11. │                                                                            │
  12. │ Disclaimer: Hi, We are SysOps Not Lawyers.                                 │
  13. └────────────────────────────────────────────────────────────────────────────┘
  14.  
  15. Extended Description: This mod will greatly enhance the local end of
  16. uploading files to your xfer section. When entering the description
  17. for the file, you can use one of four commands listed below :
  18.  
  19.     '-A'  Will abort the entire upload process.
  20.     '-D'  Will delete the current file.
  21.     '-N'  Will skip to the next directory (if exists)
  22.     '-S'  Will skip the current file.
  23.  
  24. Of Course you don't use the quotes just the - and then the letter for
  25. the command you want. Also now when hitting enter on blank file
  26. description it will instead of aborting just skip the current file and
  27. goto the next one. At least thats how we like it done.
  28.  
  29. Legend :
  30.  = [Leave as is]
  31.  * [Change to]
  32.  - [Remove Line]
  33.  + [Add Line]
  34. [════════════════════════════════════════════════════════════════════════════]
  35.  
  36.    Mod Notes From DC : Ok I found this mod in a old 4.23 set of mods
  37.    The mod author Michael Elliot 1@8062 deserves most of the credit.
  38.    His code was along the right track yet the areas he was asking you
  39.    to search for were not in either 4.23/4.24 stock source. There were
  40.    also a few bugs like when you hit enter on a blank line in his
  41.    orignal mod it would just go down lines until you used a '-'
  42.    command. So liking the idea I started working on making it 4.24
  43.    compatable and making it work smooth. Along with Swordfish I feel
  44.    we have done just that.
  45.  
  46. [════════════════════════════════════════════════════════════════════════════]
  47.  
  48.    Mod Notes From Swordfish :
  49.           Easy Mod! Oh.. wait.. "tweak tweak" there, it works! :)  
  50.           I find this to be a handy mod, glad Dale Cooper ran across it. 
  51.           Even more glad that we got it working with 4.24. Enjoy!
  52.  
  53. [════════════════════════════════════════════════════════════════════════════]
  54.  
  55. On Wit Da Mod!
  56.  
  57. STEP 0: Back Up Your Source.. don't say I didn't warn you.
  58.  
  59. ───────────────────────────────────────────────────────
  60. STEP 1 : OPEN UP XFEROVL.C
  61. ───────────────────────────────────────────────────────
  62.  
  63. In Xferovl.c at the very top right under the #include "vars.h" add
  64. the below.
  65.  
  66. unsigned char GlobalUploading;
  67. unsigned char GlobalUploadStatus;
  68. #define GUL_NORMAL     0
  69. #define GUL_ABORTED    1
  70. #define GUL_DELETED    2
  71. #define GUL_NEXT       3
  72. #define GUL_SKIPPED    4
  73.  
  74. Ok now skip down to int upload_file declration.
  75.  
  76. =int upload_file(char *fn, int dn, char *desc)
  77. ={
  78. =  directoryrec d;
  79. =  uploadsrec u,u1;
  80. =  int i,f;
  81. *  char s[81],ff[81], RC;  //ADD RC
  82.  
  83. Now jump down to the below lines.
  84.  
  85. =   d.mask=mask_PD;
  86. = npr("%s: %4ldk :",u.filename,bytes_to_k(u.numbytes));
  87. = if ((desc) && (*desc)) {
  88. =   strncpy(u.description,desc,58);
  89. =   u.description[58]=0;
  90. =   pl(u.description);
  91. = } else
  92.  
  93. Add the below block right after the } else
  94.  
  95. /* Add For ALL002 */
  96.    u.description[0] = 0;
  97.    inputl(u.description,58);
  98.    if (u.description[0]==0)  {
  99.    GlobalUploadStatus = GUL_SKIPPED;
  100.    RC = 1;
  101.    return(RC);
  102.    }
  103.     nl();
  104.  if ((GlobalUploading == 1) && ((u.description[0] == '-') &&
  105.  (strlen(u.description) == 2)))
  106.     {
  107.  switch (upcase(u.description[1]))
  108.  {
  109.     case 'A':
  110.      GlobalUploadStatus = GUL_ABORTED;
  111.      RC = 0;
  112.      break;
  113.     case 'D':
  114.      GlobalUploadStatus = GUL_DELETED;
  115.      unlink(ff);
  116.      RC = 1;
  117.      break;
  118.     case 'N':
  119.      GlobalUploadStatus = GUL_NEXT;
  120.      RC = 1;
  121.      break;
  122.     case 'S':
  123.      GlobalUploadStatus = GUL_SKIPPED;
  124.      RC = 1;
  125.      break;
  126.     default :
  127.      RC = 1;
  128.      break;
  129.    }
  130.    return(RC);
  131.   }
  132. /* Done */
  133.  
  134. Now delete or comment out everything after the block up to the below lines.
  135.  
  136.  
  137. = get_file_idz(&u,dn);
  138. = ++thisuser.uploaded;
  139. = if (!(d.mask & mask_cdrom))
  140. =  modify_database(u.filename,1);
  141.  
  142. Ok now jump down to int uploadall(int dn) and search for the below lines.
  143. And add the marked lines.
  144.  
  145. =  f1=findfirst(s1,&ff,0);
  146. =  ok=1;
  147. =  i1=0;
  148. =  while ((f1==0) && (!hangup) && (numf<maxf) && (ok) && (!i1) && (!abort)) {
  149. +  GlobalUploading = 1;
  150. +  GlobalUploadStatus = GUL_NORMAL;
  151.  
  152. Ok now search for the below lines. They should be right under what you
  153. just added.
  154.  
  155. = ok=maybe_upload(ff.ff_name,dn,NULL);
  156. = f1=findnext(&ff);
  157. = checka(&abort,&next);
  158.  
  159. Add the below block right after the above lines.
  160.  
  161. /* Added for ALL002.MOD */
  162.   switch (GlobalUploadStatus)
  163.  {
  164.   case GUL_NORMAL:
  165.   break;
  166.   case GUL_ABORTED:
  167.   npr("\r\n7Uploading Aborted0\r\n");
  168.   break;
  169.   case GUL_DELETED:
  170.   npr("\r\n7File Deleted0\r\n");
  171.   break;
  172.   case GUL_NEXT:
  173.   npr("\r\n7Directory Skipped0\r\n");
  174.   f1 = 1;
  175.   break;
  176.   case GUL_SKIPPED:
  177.   npr("\r\n7File Skipped0\r\n");
  178.   break;
  179.   }
  180.  GlobalUploading = 0;
  181. /* Done */
  182. =  }
  183. =  if ((!ok) || (abort))
  184. = pl(get_string(14));
  185.  
  186. Ok you should be done. Save and recompile. Test it and let us know if it
  187. works for you.
  188.  
  189. How to reach us...
  190.  
  191.  Dale Cooper                           Swordfish
  192.                       via WWIV nets
  193.  
  194.  1@10118 WWIVnet                       1@6251 SierraLink
  195.  1@1     DINER.COM                     1@6200 DINER.COM
  196.                        via FIDOnet
  197.  
  198.  1:282/2025                            1:282/4089
  199.  
  200.                        via Internet
  201.  
  202.  dcooper@winternet.com                 swordy@winternet.com
  203. [════════════════════════════════════════════════════════════════════════════]
  204.    Also if you want to get quick answers from us on this or any of our
  205.    mods and you have internet access with IRC. Hop on #WWIV and look for
  206.    dcooper or Swordfish.
  207.  
  208. [════════════════════════════════════════════════════════════════════════════]    
  209.       Authors can also be reached at:
  210.    Double R Diner [ASV] 612-474-7350 or FishTank [ASV] 612-757-0218
  211.  
  212. Double R Diner is a DreamWARE Support / ASYLUM Support Site
  213. FishTank is also a French Mod Division Support Site.
  214.