home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / MODS / ALLMODS.ZIP / M&M007D.ZIP / M&M007D.FIX < prev    next >
Encoding:
Text File  |  1995-07-03  |  4.6 KB  |  160 lines

  1. Snorkel #1 @2100
  2. Fri Jun 30 12:26:02 1995
  3. This upgrade to M&M007D is intended only for those sysops who have already
  4. installed the "D" revision of this mod.  If you have never installed
  5. M&M007D.MOD, then look the complete mod, with corrections, under the file name
  6. 1M&M007D611.MOD0.
  7.  
  8. ==============================================================================
  9.  
  10. ┌────────────┐
  11. │ XFEROVL2.C │
  12. └────────────┘
  13.  
  14.  
  15. Find "int try_to_download(char *s, int dn,int title)" and make the following
  16. changes:
  17.  
  18.  
  19.       i1=printfileinfo(&u,dn);
  20.     if ((strncmp(u.filename,"WWIV4",5)==0) &&
  21.         (!(sysinfo.flags & OP_FLAGS_NO_EASY_DL)))  /* search for */
  22.       i1=1;
  23.     else {
  24.       if ((!(u.mask & mask_free_file)) &&          /* ADD THIS LINE!!! */
  25.       if ((!(u.mask & mask_free_file)) || /* DELETE THIS LINE */
  26.          (!(r.mask & mask_free_dir)))
  27.         if (!ratio_ok()) {
  28.           rip_restoreall();
  29.           return(-1);
  30.         }
  31.     }
  32.     if (i1) {
  33.  
  34.  
  35.  
  36. Still a little further down in the function, make the following change:
  37.  
  38.  
  39.       sent=0;                                    /* search for */
  40.       abort=0;
  41.       if (i1==-1)
  42.         send_file(s1,&sent,&abort,u.filetype,u.filename,dn, -2L);
  43.       else
  44.         send_file(s1,&sent,&abort,u.filetype,u.filename,dn, u.numbytes);
  45.       if (sent) {
  46.         if ((!(u.mask & mask_free_file)) &&             /* ADD THIS LINE!!! */
  47.         if ((!(u.mask & mask_free_file)) ||   /* DELETE THIS LINE */
  48.             (!(r.mask & mask_free_dir))) {
  49.           ++thisuser.downloaded;
  50.           thisuser.dk += (int) (bytes_to_k(u.numbytes));
  51.         }
  52.         ++u.numdloads;
  53.  
  54.  
  55.  
  56. Now find "void tag_it(void)" and make the following change:
  57.  
  58.  
  59.       if (numbatch>=sysinfo.max_batch) {            /* search for */
  60.         ansic(6);
  61.         outstr(get_string(1330));
  62.         npr("%d",sysinfo.max_batch);
  63.         pl(get_string(1331));
  64.         bad=1;
  65.       }
  66.       r=directories[udir[curdir].subnum];
  67.       if ((!(filelist[i].u.mask & mask_free_file)) &&    /* ADD THIS LINE!!! */
  68.       if ((!(filelist[i].u.mask & mask_free_file)) ||  /* DELETE THIS LINE */
  69.           (!(r.mask & mask_free_dir)))
  70.         if ((syscfg.req_ratio>0.0001)
  71.           && (ratio()<syscfg.req_ratio)
  72.  
  73.  
  74.  
  75. ==============================================================================
  76. ┌─────────┐
  77. │ BATCH.C │
  78. └─────────┘
  79.  
  80.  
  81. Find "void downloaded(char *fn, long cps)" and make the following change:
  82.  
  83.  
  84. void downloaded(char *fn, long cps)                   /* search for */
  85. {
  86.   int i,i1,f;
  87.   uploadsrec u;
  88.   char s[161];
  89.   userrec ur;
  90.   directoryrec r;
  91.  
  92.   for (i1=0; i1<numbatch; i1++) {
  93.     if ((strcmp(fn,batch[i1].filename)==0) && (batch[i1].sending)) {
  94.       dliscan1(batch[i1].dir);
  95.       r=directories[batch[i1].dir];
  96.       i=recno((batch[i1].filename));
  97.       if (i>0) {
  98.         f=sh_open(dlfn,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
  99.         SETREC(f,i);
  100.         sh_read(f,(void *)&u,sizeof(uploadsrec));
  101.         if ((!(u.mask & mask_free_file)) &&            /* ADD THIS LINE!!! */
  102.         if ((!(u.mask & mask_free_file)) ||   /* DELETE THIS LINE */
  103.             (!(r.mask & mask_free_dir))) {
  104.             ++thisuser.downloaded;
  105.             thisuser.dk += (int) (bytes_to_k(u.numbytes));
  106.         }
  107.         ++u.numdloads;
  108.         SETREC(f,i);
  109.  
  110.  
  111.  
  112.  
  113. Find "void batchdl(int mode)" and make the following change:
  114.  
  115.  
  116.       case 'D':                                   /* search for */
  117.         if (numbatchdl==0) {
  118.           nl();
  119.           pl(get_string(882));
  120.           nl();
  121.           done=1;
  122.           break;
  123.         }
  124.  
  125.         nl();
  126.         for (i1=0; i1<numbatch; i1++) {
  127.           dliscan1(batch[i1].dir);
  128.           r=directories[batch[i1].dir];
  129.           i2=recno((batch[i1].filename));
  130.           f=sh_open(dlfn,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
  131.           SETREC(f,i2);
  132.           sh_read(f,(void *)&u,sizeof(uploadsrec));
  133.           f=sh_close(f);
  134.           if ((!(u.mask & mask_free_file)) &&          /* ADD THIS LINE!!! */
  135.           if ((!(u.mask & mask_free_file)) ||  /* DELETE THIS LINE */
  136.               (!(r.mask & mask_free_dir)))
  137.             if (!ratio_ok()) {
  138.               nl();
  139.               pl(get_string(883));
  140.               nl();
  141.               done=1;
  142.               break;
  143.             }
  144.         }
  145.         nl();
  146.         prt(5,get_string(877));
  147.  
  148.  
  149.  
  150.  
  151. Again, this code is ONLY for those sysops who have already installed
  152. M&M007D.MOD.  The complete mod, with the corrections, is available under the
  153. file name 1M&M007D611.MOD0.
  154.  
  155. 1    °0
  156. 1  °0
  157. 1  °0
  158. 1°0
  159. 4Snorkel 1@21000
  160.