home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / MODS / ALLMODS.ZIP / FMD-18A.ZIP / FMD-18A.MOD < prev    next >
Encoding:
Text File  |  1995-06-01  |  23.4 KB  |  813 lines

  1.  
  2.    ┌┬─── ──  ─     ─  ── ───────────────────────────────────────────────────┬─ ∙∙
  3.    ││             Alternative Worlds Presents              │
  4.    └┼─────────────────────────────────────────────────────────────────────┐
  5.    ││ Mod Name       » FMD-18a.MOD                                        │∙
  6.    ││ Difficulty     » ███████▒▒▒▒ (7/10)                                 │:
  7.    ││ WWIV Version   » 4.24                                               ││
  8.    ││ Date Affected  » 06/01/95                                           ││
  9.    :│ Files Affected » BATCH.C / MMENU.C / LILO.C / EXTRN1.C / SR.C       ││
  10.    :│                  UEDIT.C / VARDEC.H / VARS.H / XFER.C / XFEROVL.C   ││
  11.    :│                  XFERTMP.C / XFEROVL2.C                             ││
  12.    ∙│ Description    » File Editor And File Points System                 ││
  13.     └─────────────────────────────────────────────────────────────────────┼┐
  14.     │       A French Mod Division Release - (C) 1995 FMD Software         ││
  15. ∙∙ ─┴─────────────────────────────────────────────────── ──  ─     ─  ── ───└┘
  16.  
  17.  ┌┬══════════════════┐
  18.  ││ Long Description ││
  19.   └══════════════════┴┘
  20.  
  21.   This modification is based on the Renegade file points system. This mod
  22. will convert the current WWIV file system to use file points instead of bytes.
  23. File Points will allow you to have free files and various amount of points for
  24. each file. This doesn't require any special WWIV, it will work with any copy,
  25. and can be adapted with any file modification (it is fully supported by
  26. ListPlus by Asylum and JAFO's file tagging system).
  27.  
  28.   Basically this mod allow you to:
  29.  
  30.   ■ You will have to validate files before uploader gets credits for it, and
  31.     before users can download it.
  32.   ■ Set FREE files on your system.
  33.   ■ Track the record of downloaded k, not like some other mod that allow free
  34.     download by not increasing this amount.
  35.   ■ Give Upload Credits to whoever you want.
  36.   ■ Internal File Editor where you can edit EVERYTHING
  37.   ■ Set File as "new" for 1 day/week/month/year/always
  38.   ■ Export Description as FILE_ID.DIZ in the file.
  39.   ■ Execute Upload Event From the File Editor
  40.  
  41.  
  42. Software Supported with this mod:
  43.  
  44. You might get those softwares that would help you to edit everything in a
  45. better way.
  46.  
  47. AVIEWCOM
  48. STRIPAV
  49.  
  50. They are included inside this archive, we encourage you to use them.
  51.  
  52. Revision A:
  53.  
  54.  - Updated for WWIV v4.24
  55.  
  56.  ┌┬═══════┐
  57.  ││ Tests ││
  58.   └═══════┴┘
  59.  
  60.   This modification has been tested on a virgin WWIV v4.24 source using
  61.   Borland C++ v4.5
  62.  
  63. ──────────────────────────────────────────────────────────────────────────────
  64.                    Legend
  65.               ╔═══╤══════════════════┐
  66.               │ + │ Add This Line     │
  67.               │ - │ Delete This Line │
  68.               │ * │ Modify This Line │
  69.               │ = │ Existing Line     │
  70.               └═══╧══════════════════╝
  71. ───[Step 0]────────────────────────────────────────────────────────────────────
  72.  
  73. **Backup your source code, this is a very huge modification and you might have
  74.   problems installing it. Back up also for this modifications all your *.DIR
  75.   in your data directory just in case.
  76.  
  77.   >> NOTICE:  YOU NEED TO SET YOUR FILE RATIO TO 0.000 BEFORE EVERYTHING <<
  78.   >>  IN WWIV.INI OR IN INIT, BUT THE WWIV.INI ONE WILL BYPASS THE INIT  <<
  79.  
  80. ───[Step 1]────────────────────────────────────────────────────────────────────
  81.  
  82. Copy FILEEDIT.C in your source directory and include the file in MAKEFILE.MAK:
  83.  
  84. (For Borland C++ Users
  85.  
  86. =        uedit.obj    voteedit.obj xferovl.obj  xferovl2.obj \
  87. =        xfertmp.obj  xinit.obj    qwk.obj      qwk1.obj     \
  88. *        ripovl.obj   fileedit.obj
  89.  
  90. lower...
  91.  
  92. =        $(OBJ)\xferovl.obj  $(OBJ)\xferovl2.obj $(OBJ)\xfertmp.obj  \
  93. =        $(OBJ)\xinit.obj    $(OBJ)\qwk.obj      $(OBJ)\qwk1.obj     \
  94. *        $(OBJ)\ripovl.obj   $(OBJ)\fileedit.obj
  95.  
  96. lower...
  97.  
  98. =qwk1.obj    : qwk1.c
  99. =  $(TCC_OVL)
  100. =ripovl.obj  : ripovl.c
  101. =  $(TCC_OVL)
  102. +fileedit.obj: fileedit.c
  103. +  $(TCC_OVL)
  104. =
  105. =fix.obj     : fix.c
  106.  
  107. For Turbo C++ Users:
  108.  
  109. =                $(OBJ)bbsovl1.obj $(OBJ)shrink.obj $(OBJ)bbsovl2.obj\
  110. *                $(OBJ)sr.obj $(OBJ)fileedit.obj
  111.  
  112. a bit down...
  113.  
  114. = $(OBJ)bbsovl2.obj : bbsovl2.c  vars.h vardec.h net.h
  115. =   $(TCC_OVL)
  116. + $(OBJ)fileedit.obj: fileedit.c vars.h vardec.h net.h
  117. +   $(TCC_OVL)
  118.  
  119. ───[Step 2]────────────────────────────────────────────────────────────────────
  120.  
  121. Load VARDEC.H, be careful and do the following changes:
  122.  
  123. In uploadsrec...
  124.  
  125. =             date[9],         /* date u/l'ed */
  126. *             upby[42];         /* name of upload user */
  127. +     unsigned long     filepoints;         /* file points */
  128. =     unsigned char     filetype;         /* file type for apples */
  129. =     unsigned short  numdloads,         /* number times d/l'ed */
  130. =             ownersys,ownerusr,     /* who uploaded it */
  131.  
  132. upby was 46, now changed to 42, if yours isn't 46, just substract 4 from that
  133. number.
  134.  
  135. And lower, change those lines in batchrec:
  136.  
  137. =typedef struct {
  138. =     char         sending;
  139. =     char         filename[13];
  140. =     short         dir;
  141. =     float         time;
  142. =     long         len;
  143. +     long         filepoints;
  144. +     short         status;
  145. =} batchrec;
  146.  
  147. Lower in VARDEC.H, add the following line:
  148.  
  149. = #define mask_cdrom         0x0040
  150. = #define mask_offline       0x0080
  151. + #define mask_validated     0x1000
  152. = #define mask_guest         0x4000
  153. = #define mask_extended      0x8000
  154.  
  155. ───[Step 3]────────────────────────────────────────────────────────────────────
  156.  
  157. Load VARS.H and modify the following thing:
  158.  
  159.  
  160. * __EXTRN__ unsigned long *dir_dates, *sub_dates, g_flags, batchfpts, tempfpts;
  161.  
  162. ───[Step 3]────────────────────────────────────────────────────────────────────
  163.  
  164. Load MMENU.C and do the following change in void mainmenu:
  165.  
  166. =    if (strcmp(s,"/?")==0) {
  167. =      printmenu(5);
  168. =    }
  169. +    if (strcmp(s,"/F")==0)
  170. +      cnvt_user();
  171. =  }
  172.  
  173. lower in void dlmainmenu:
  174.  
  175. =    if (strcmp(s,"/?")==0)
  176. =      printmenu(8);
  177. =
  178. +    if (strcmp(s,"/E")==0)
  179. +      file_points();
  180. =
  181. =    if (strcmp(s,"READIDZ")==0)
  182.  
  183. ───[Step 4]────────────────────────────────────────────────────────────────────
  184.  
  185. Load XFER.C and do the following changes:
  186.  
  187. in void printinfo:
  188.  
  189. =    osan((okansi() ? "║" : "|"),abort,&next);
  190. -    sprintf(s1,"%d",u->numdloads);
  191. +    if (u->mask & mask_validated)
  192. +    {
  193. +      if (u->filepoints)
  194. +        sprintf(s1,"%d",u->filepoints);
  195. +      else
  196. +        sprintf(s1,"4Free7");
  197. +    } else
  198. +      sprintf(s1,"6Unvl7");
  199. =
  200. =    for (i=0; i<4-(int)strlen(s1); i++)
  201.  
  202. in void printfileinfo:
  203.  
  204. =  outstr(get_string(751)); pl(u->upby);
  205. =  outstr(get_string(752)); pln(u->numdloads);
  206. +  outstr("Cost       : ");
  207. +  if (u->mask & mask_validated)
  208. +  {
  209. +    if (u->filepoints)
  210. +    {
  211. +      pln(u->filepoints);
  212. +      tempfpts=u->filepoints;
  213. +    } else {
  214. +      outstr("Free\r\n");
  215. +    }
  216. +  } else {
  217. +    outstr("Unavailable\r\n");
  218. +  }
  219. =  nl();
  220.  
  221. ───[Step 5]────────────────────────────────────────────────────────────────────
  222.  
  223.  
  224. Load XFEROVL2.C and do the following modifications to function tag_it:
  225.  
  226. =        outstr(get_string(1330));
  227. =        npr("%d", sysinfo.max_batch);
  228. =        pl(get_string(1331));
  229. =        bad=1;
  230. =      }
  231. +      if ((filelist[i].u.mask & mask_validated))
  232. +        batchfpts += filelist[i].u.filepoints;
  233. +        if ((thisuser.filepoints<batchfpts)
  234. +           && (!thisuser.exempt & exempt_ratio)
  235. +           && (bad==0)) {
  236. +          nl();
  237. +          pl("2You don't have enough file points for this file.");
  238. +          batchfpts -= filelist[i].u.filepoints;
  239. +          bad=1;
  240. +        }
  241. +        if ((!(filelist[i].u.mask & mask_validated)) && (!dcs())) {
  242. +          nl();
  243. +          pl("2File is not validated, you can't download it!");
  244. +          bad=1;
  245. +        }
  246. +        if (numbatch>=sysinfo.max_batch) {
  247. +          ansic(6);
  248. +          outstr(get_string(1330));
  249. +          npr("%d",sysinfo.max_batch);
  250. +          pl(get_string(1331));
  251. +          bad=1;
  252. +        }
  253. =      if ((syscfg.req_ratio>0.0001)
  254. =        && (ratio()<syscfg.req_ratio)
  255. =        && (!thisuser.exempt & exempt_ratio)
  256. =        && (bad==0)) {
  257. =        ansic(2);
  258. =        outstr(get_string(730));
  259. =        sprintf(s," %-5.3f.  ",ratio());
  260. =        outstr(s);
  261. =        outstr(get_string(731));
  262. =        sprintf(s," %-5.3f ",syscfg.req_ratio);
  263. =        outstr(s);
  264. =        outstr(get_string(732));
  265. =        nl();
  266. =        bad=1;
  267. =      }
  268. =      if (bad==0) {
  269. =        sprintf(s,"%s%s",directories[filelist[i].directory].path,
  270. =          stripfn(filelist[i].u.filename));
  271. =        if (filelist[i].dir_mask & mask_cdrom) {
  272. =          sprintf(s2,"%s%s",
  273. =            directories[filelist[i].directory].path,
  274. =            stripfn(filelist[i].u.filename));
  275. =          sprintf(s,"%s%s",
  276. =            syscfgovr.tempdir,stripfn(filelist[i].u.filename));
  277. =         if (!exist(s))
  278. =           copy_file(s2,s);
  279. =        }
  280. =        fp=sh_open1(s,O_RDONLY | O_BINARY);
  281. =        if (fp<0) {
  282. =          ansic(6);
  283. =          outstr(get_string(1332));
  284. =          outstr(stripfn(filelist[i].u.filename));
  285. =          pl(get_string(1333));
  286. =          bad=1;
  287. =        } else {
  288. =          fs=filelength(fp);
  289. =          fp=sh_close(fp);
  290. =        }
  291. =      }
  292. =      if (bad==0) {
  293. =        t=(12.656) / ((double) (modem_speed)) * ((double)(fs));
  294. =        if (nsl()<=(batchtime + t)) {
  295. =          ansic(6);
  296. =          outstr(get_string(1334));
  297. =          outstr(filelist[i].u.filename);
  298. =          pl(".");
  299. =          bad=1;
  300. =        }
  301. =      }
  302. =      if (bad==0) {
  303. =        batchtime += t;
  304. =        strcpy(batch[numbatch].filename,filelist[i].u.filename);
  305. =        batch[numbatch].dir=filelist[i].directory;
  306. =        batch[numbatch].time=t;
  307. +        batch[numbatch].filepoints=filelist[i].u.filepoints;
  308. =        batch[numbatch].sending=1;
  309. =        batch[numbatch].len=fs;
  310. =        numbatch++;
  311. =        ++numbatchdl;
  312. =        ansic(1);
  313. =        outstr(filelist[i].u.filename);
  314. =        pl(get_string(1335));
  315. =      }
  316. =    } else {
  317. =      ansic(6);
  318. =      outstr(get_string(1336));
  319.  
  320.  
  321. And do the following modification to void upload:
  322.  
  323. =       if (ok==1) {
  324. =         l=filelength(f);
  325. =         u.numbytes=l;
  326. +         u.filepoints=0;
  327. =         sh_close(f);
  328. =         ++thisuser.uploaded;
  329.  
  330. Lower in int try_to_download:
  331.  
  332. =      i1=1;
  333. =    else {
  334. -      if (!ratio_ok()) {
  335. -        if (menu_on())
  336. -          rip_restoreall();
  337. -     return(-1);
  338. -      }
  339. +      if ((!(u.mask & mask_validated)) && (!dcs())) {
  340. +        nl();
  341. +        prt(2,"This file hasn't been validated by the SysOp.");
  342. +        nl();
  343. +        if (menu_on())
  344. +          rip_restoreall();
  345. +        return(-1);
  346. +      }
  347. +      if ((u.filepoints>thisuser.filepoints) &&
  348. +        (!(thisuser.exempt & exempt_ratio))) {
  349. +        nl();
  350. +        prt(2,"You don't have enough file points to download.");
  351. +        nl();
  352. +        if (menu_on())
  353. +          rip_restoreall();
  354. +        return(-1);
  355. +      }
  356. +      nl();
  357. =    }
  358. =    if (i1) {
  359. =      write_inst(INST_LOC_DOWNLOAD,udir[curdir].subnum,INST_FLAGS_ONLINE);
  360. =      sprintf(s1,"%s%s",directories[dn].path,u.filename);
  361. =      if (directories[dn].mask & mask_cdrom) {
  362. =     sprintf(s2,"%s%s",directories[dn].path,u.filename);
  363. =     sprintf(s1,"%s%s",syscfgovr.tempdir,u.filename);
  364. =    if (!exist(s1))
  365. =       copy_file(s2,s1);
  366. =      }
  367. =      sent=0;
  368. =      abort=0;
  369. =      if (i1==-1)
  370. =     send_file(s1,&sent,&abort,u.filetype,u.filename,dn, -2L);
  371. =      else
  372. =     send_file(s1,&sent,&abort,u.filetype,u.filename,dn, u.numbytes);
  373. =      if (sent) {
  374. =     ++thisuser.downloaded;
  375. =     thisuser.dk += (int) (bytes_to_k(u.numbytes));
  376. =     ++u.numdloads;
  377. +     if (!(thisuser.exempt & exempt_ratio))
  378. +       thisuser.filepoints -= u.filepoints;
  379. =     f=sh_open(dlfn,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
  380. =     SETREC(f,i);
  381. =     sh_write(f,(void *)&u,sizeof(uploadsrec));
  382. =     f=sh_close(f);
  383. =     sprintf(s1,get_stringx(1,43),u.filename);
  384. =     sysoplog(s1);
  385. +     if (!(thisuser.exempt & exempt_ratio)) {
  386. +       sprintf(s1,"Removed %u file points\r\n",u.filepoints);
  387. +       sysoplog(s1);
  388. +     }
  389. =     nl();
  390. =     nl();
  391. =     outstr(get_string(782)); npr("%-6.3f\r\n", ratio());
  392. +     npr("You now have %u file points.\r\n",thisuser.filepoints);
  393. =     if (syscfg.sysconfig & sysconfig_log_dl) {
  394. =       read_user(u.ownerusr, &ur);
  395. =       if (!(ur.inact & inact_deleted)) {
  396. =         if (date_to_daten(ur.firston) < u.daten) {
  397.  
  398. And do the following change to void yourinfodl:
  399.  
  400. =  ansic_x(1); outstr(get_string(801));
  401. =  ansic_x(2); pln(thisuser.dsl);
  402. +  ansic_x(1); outstr("9File Pts 0: 7");
  403. +  ansic_x(2); pln(thisuser.filepoints);
  404. =}
  405.  
  406.  
  407. ───[Step 6]────────────────────────────────────────────────────────────────────
  408.  
  409. Load XFEROVL.C and modify void upload_file:
  410.  
  411. =    l=filelength(f);
  412. =    u.numbytes=l;
  413. +    u.filepoints=0;
  414. =    sh_close(f);
  415. =    strcpy(u.upby, nam(&thisuser,usernum));
  416.  
  417.  
  418. ───[Step 7]────────────────────────────────────────────────────────────────────
  419.  
  420. In function relist(), do the following changes:
  421.  
  422. =    ansic(fc ? FRAME : 0);
  423. =    osan((okansi() ? "║" : "|"),&abort,&next);
  424. -    sprintf(s1,"%d",filelist[i].u.numdloads);
  425. +    if (filelist[i].u.mask & mask_validated)
  426. +    {
  427. +      if (filelist[i].u.filepoints)
  428. +        sprintf(s1,"%d",filelist[i].u.filepoints);
  429. +      else
  430. +        sprintf(s1,"4Free7");
  431. +    } else
  432. +      sprintf(s1,"6Unvl7");
  433. =
  434. *    for (i1=0; i1<4-strlen(stripcolors(s1)); i1++)
  435. =      s[i1]=32;
  436. =    s[i1]=0;
  437.  
  438. ───[Step 8]────────────────────────────────────────────────────────────────────
  439.  
  440. Load XFERTMP.C and do the following change in void download_temp_arc:
  441.  
  442. =  int f,sent,abort;
  443. =  double d;
  444. +  unsigned long pts;
  445. =
  446. =  outstr(get_string(847));
  447.  
  448.  
  449. a bit lower:
  450.  
  451. =    ((double) (modem_speed));
  452. =  if (d<=nsl()) {
  453. +    pts = bytes_to_k(numbytes+1023);
  454. +    if ((pts>thisuser.filepoints) && (!(thisuser.exempt & exempt_ratio))) {
  455. +     nl();
  456. +     prt(2,"You don't have enough file points to download.");
  457. +     nl();
  458. +     return;
  459. +    }
  460. =    outstr(get_string(851));
  461. =    pl(ctim(d));
  462.  
  463. lower...
  464.  
  465. =     ++thisuser.downloaded;
  466. =     thisuser.dk += bytes_to_k(numbytes);
  467. +     if (!(thisuser.exempt & exempt_ratio))
  468. +       thisuser.filepoints -= pts;
  469. =        nln(2);
  470. =     outstr(get_string(782)); npr("%-6.3f\r\n",ratio());
  471. +     npr("Removing %u file points\r\n",pts);
  472. =      }
  473. =      sprintf(s1,get_stringx(1,45),bytes_to_k(numbytes), s);
  474.  
  475.  
  476. ───[Step 9]────────────────────────────────────────────────────────────────────
  477.  
  478. In function temp_extract(), add the following lines:
  479.  
  480. =        copy_file(s1,s2);
  481. =    }
  482. =    get_arc_cmd(s1,s2,1,"");
  483. +    if ((!(u.mask & mask_validated)) && (!dcs())) {
  484. +       pl("This file isn't validated, you can't extract from it.");
  485. +       return;
  486. +    }
  487. =    if ((s1[0]) && (exist(s2))) {
  488.  
  489. ───[Step 10]────────────────────────────────────────────────────────────────────
  490.  
  491. Do the following changes in void removefile:
  492.  
  493. (Here you can set the "* 2" by the number of times you wish to remove the file
  494. points when you or the user removes the file)
  495.  
  496. =                  --uu.uploaded;
  497. =                  uu.uk -= bytes_to_k(u.numbytes);
  498. +                  if (u.mask & mask_validated)
  499. +                    if ((u.filepoints * 2) > uu.filepoints)
  500. +                      uu.filepoints=0;
  501. +                    else
  502. +                      uu.filepoints -= (u.filepoints * 2);
  503. +                  npr("Removed %u file points\r\n",(u.filepoints * 2));
  504. =                  write_user(u.ownerusr,&uu);
  505. =                }
  506.  
  507.  
  508. ───[Step 11]───────────────────────────────────────────────────────────────────
  509.  
  510. Load BATCH.C and do the following modifications:
  511.  
  512. in void listbatch:
  513.  
  514. =  if (numbatchdl) {
  515. =    outstr(get_string(865));
  516. =    pl(ctim(batchtime));
  517. +    outstr("Batch Cost: ");
  518. +    npr("%ld",batchfpts);
  519. +    nl();
  520. =  } else
  521. =    nl();
  522.  
  523. in void delbatch:
  524.  
  525.  
  526. =  if (i<numbatch) {
  527. =    if (batch[i].sending) {
  528. =      batchtime -= batch[i].time;
  529. =      --numbatchdl;
  530. +      batchfpts -= batch[i].filepoints;
  531. =    }
  532. =    --numbatch;
  533. =    for (i1=i; i1<=numbatch; i1++) {
  534.  
  535. in void downloaded:
  536.  
  537. =     sh_read(f,(void *)&u,sizeof(uploadsrec));
  538. =     ++thisuser.downloaded;
  539. =     thisuser.dk += (int) (bytes_to_k(u.numbytes));
  540. +     if (!(thisuser.exempt & exempt_ratio)) {
  541. +       thisuser.filepoints -= u.filepoints;
  542. +       npr("%-15.15s downloaded, removing %u file points.\r\n",u.filename,u.filepoints);
  543. +     }
  544. =     ++u.numdloads;
  545. =     SETREC(f,i);
  546.  
  547. in void uploaded:
  548.  
  549. =         if (f1>=0) {
  550. =           u.numbytes = filelength(f1);
  551. +           u.filepoints=0;
  552. =           sh_close(f1);
  553. =           get_file_idz(&u,batch[i1].dir);
  554. =           ++thisuser.uploaded;
  555.  
  556. in void ymbatchdl:
  557.  
  558. =    tleft(1);
  559. *    if (u.filepoints>thisuser.filepoints)
  560. =      rr=1;
  561. =    if (thisuser.exempt & exempt_ratio)
  562. =      rr=0;
  563. =    if (!batch[cur].sending) {
  564. =      rr=0;
  565.  
  566. in void batchdl:
  567.  
  568.  
  569. =       if (!had) {
  570. =         nl();
  571. =         outstr(get_string(782));
  572. =         npr("%-6.3f\r\n",ratio());
  573. +         npr("You now have %u file points.\r\n",thisuser.filepoints);
  574. =       }
  575. =     }
  576.  
  577. and lower:
  578.  
  579. =       if (!had) {
  580. =         nl();
  581. =         outstr(get_string(782));
  582. =         npr("%-6.3f\r\n",ratio());
  583. +         npr("You now have %u file points.\r\n",thisuser.filepoints);
  584. =       }
  585. =     }
  586. =     done=1;
  587.  
  588. and lower:
  589.  
  590. =       break;
  591. =     }
  592. =
  593. =     nl();
  594. *     if ((thisuser.filepoints<batchfpts) && (!(thisuser.exempt & exempt_ratio))) {
  595. =       nl();
  596. =       pl(get_string(883));
  597. =       nl();
  598. =       done=1;
  599. =       break;
  600.  
  601. and lower:
  602.  
  603. =       if (!had) {
  604. =         nl();
  605. =         outstr(get_string(782));
  606. =         npr("%-6.3f\r\n",ratio());
  607. +            npr("You now have %u file points.\r\n",thisuser.filepoints);
  608. =       }
  609.  
  610. ───[Step 12]───────────────────────────────────────────────────────────────────
  611.  
  612. Load UEDIT.C and do the following changes:
  613.  
  614. in void print_data:
  615.  
  616. =  if (u->ass_pts) {
  617. =    outstr_x2(get_string(254)); pln(u->ass_pts);
  618. =  }
  619. +  if (u->filepoints) {
  620. +    outstr_x2("FPts: "); pln(u->filepoints);
  621. +  }
  622. =  nl();
  623. =  outstr_x2(get_string(255)); pln(u->sl);
  624.  
  625. in void uedit:
  626.  
  627. =  int i,i1,un,done,nu,done1,full,temp_full,tempu,cls=1,done2;
  628. =  userrec u;
  629. +  unsigned long l;
  630.  
  631. lower...
  632.  
  633.  
  634. =      prt(2,get_string(266));
  635. =      if ((thisuser.sl==255) || (wfc))
  636. *        ch=onek("ACDEGILMNOPQRSTUXYZ0123456789[]{}/,.?~%:F");  // Add "F"
  637. =      else
  638. *        ch=onek("ACDEGILMNOPQRSTUYZ0123456789[]{}/,.?%F");     // Add "F"
  639. =      switch(ch) {
  640. +     case 'F':
  641. +       nl();
  642. +       prt(2,"New File Points? ");
  643. +       input(s,5);
  644. +       l=atol(s);
  645. +       if (s[0])
  646. +         u.filepoints=l;
  647. +       write_user(un,&u);
  648. +       break;
  649. =     case 'A':
  650. =       nl();
  651. =       prt(2,get_string(280));
  652.  
  653.  
  654.  
  655. ───[Step 13]───────────────────────────────────────────────────────────────────
  656.  
  657. In EXTRN1.C add the following line to function save_state:
  658.  
  659. =    WRITE(batchtime);
  660. +    WRITE(batchfpts);
  661.  
  662. lower in function restore_data:
  663.  
  664. =    READ(batchtime);
  665. +    READ(batchfpts);
  666.  
  667. ───[Step 14]───────────────────────────────────────────────────────────────────
  668.  
  669. Load LILO.C and add the following line in function logon:
  670.  
  671. =  batchtime=0.0;
  672. +  batchfpts=0;
  673. =  numbatchdl=numbatch=0;
  674.  
  675. ───[Step 15]───────────────────────────────────────────────────────────────────
  676.  
  677. Load SR.C and do the following changes:
  678.  
  679. in void send_file:
  680.  
  681. =     } else {
  682. =       if (modem_speed)
  683. =         t=(12.656) / ((double) (modem_speed)) * ((double)(fs));
  684. =       else
  685. =         t=0.0;
  686. +          batchfpts += tempfpts;
  687. +       if ((thisuser.filepoints<batchfpts)
  688. +            && (!(thisuser.exempt & exempt_ratio)))
  689. +          {
  690. +         nl();
  691. +         pl("Not enough filepoints left in queue.");
  692. +         batchfpts -= tempfpts;
  693. +         nl();
  694. +         break;
  695. +       }
  696. =       if (nsl()<=(batchtime + t)) {
  697. =         nl();
  698. =         pl(get_string(901));
  699.  
  700. and lower:
  701.  
  702. =           batch[numbatch].dir=dn;
  703. =           batch[numbatch].time=t;
  704. +           batch[numbatch].filepoints=tempfpts;
  705. =           batch[numbatch].sending=1;
  706. =           batch[numbatch].len=fs;
  707.  
  708. in void receive_file:
  709.  
  710. =       batch[numbatch].time=0;
  711. +       batch[numbatch].filepoints=0;
  712. =       batch[numbatch].sending=0;
  713.  
  714. ───[Step 16]───────────────────────────────────────────────────────────────────
  715.  
  716. Load XFER.C, some changes:
  717.  
  718. in void dliscan1:
  719.  
  720. =  f=sh_close(f);
  721. =  numf=u.numbytes;
  722. *  time(&this_date);
  723. =  dir_dates[dn]=this_date;
  724.  
  725.   sprintf(edlfn,"%s%s.EXT",syscfg.datadir,directories[dn].filename);
  726.   zap_ed_info();
  727. }
  728.  
  729.  
  730. =void nscandir(int d, int *abort)
  731. ={
  732. =  int i,od,next=0,f;
  733. =  uploadsrec u;
  734. =
  735. +  if (directories[udir[curdir].subnum].mask & mask_cdrom) {
  736. =    if ((dir_dates[udir[d].subnum]) && (dir_dates[udir[d].subnum]<nscandate))
  737. =      return;
  738. +  }
  739. =
  740. =  od=curdir;
  741.  
  742.  
  743. ───[Step 17]───────────────────────────────────────────────────────────────────
  744.  
  745. Now just do "MAKE FCNS" to the dos prompt and you will be done, now you will
  746. need to move on to the level 2 of this modification.
  747.  
  748. First, Load WWIV and execute "/F" at the main menu, this operation will
  749. give your users their due in file points on your system. My system ratio here
  750. is 0.250 (4 for 1) so if yours is different, just change the "*4" in void
  751. file_points to whatever is your ratio (This is in FILEEDIT.C).
  752.  
  753. Then, do a little checkup in UEDIT, some users might have a weird amount of
  754. filepoints, this normally happens when the user has 0 uploaded k and some
  755. downloaded k, a bug I didn't fix but it doesn't happen much. You can change
  756. this amount with the "F" key in UEDIT.
  757.  
  758. Next step will be to validate ALL files on your system because they have the
  759. "Not Validated" status. You can do it manually with the "/E" command in the
  760. xfer menu.
  761.  
  762. Sorry about the fact that you don't have the CNVTDIR.EXE file that converted
  763. all your files directly instead of having to do it manually.. We lost the
  764. source of the file and in WWIV v4.24, the validated bitmap needed to be
  765. changed because the one used in the v4.23 version of this mod is now used by
  766. something else.
  767.  
  768. Now that this is done, it's your choice to select which file you will give
  769. for FREE on your system, this is the same command "/E" in xfer menu.
  770.  
  771. Once this is done, great! You have a new good modification installed, but now
  772. you will need to validate EACH file (even yours) that will be uploaded on
  773. your system with "/E" at the xfer main menu, my file points system goes like
  774. this:
  775.  
  776. Files get 1 file points for each 10k of their size.
  777. Uploader gets 4 times the file points of the amount of the file.
  778. Downloader lose 1 time the amount of file points for his download.
  779. All files < 10k are FREE
  780. Uploader is warned via a ssm when his file is validated by the sysop.
  781.  
  782.  
  783. ───[Step 18]───────────────────────────────────────────────────────────────────
  784.  
  785. *** FOR LISTPLUS Users ONLY (ListPlus for v4.24 Only) ***
  786.  
  787. If you are running ListPlus you just have one thing to do, it's to enable the
  788. #define FILE_POINTS and everything will be fine, the mod is supported by
  789. ListPlus at 100%.
  790.  
  791. ───[Step 19]───────────────────────────────────────────────────────────────────
  792.  
  793. Do a MAKE FCNS, compile back your BBS and you're done. Don't forget to update
  794. your xfer sysop menu to show /E in the menu.
  795.  
  796. French Proverb: Chose promise, chose dûe.
  797.  
  798. For comments, bug report and suggestion, e-mail at the following address:
  799.  
  800. Nicolas LeBlanc  2@20302.WWIVnet (aka Spotnick)
  801.                  -> spotnick@gamemaster.qc.ca
  802. Martin Bourdages 242@20306 / 3@20302.WWIVnet (aka Dark Shadow)
  803.                  -> martin.bourdages@radio.magicnet.com
  804.  
  805.                  =>   French Mod Division Support Sub   <=
  806.                                 SubType: FMD
  807.                            Host: @20302 (WWIVnet)
  808.                       Scan sublist for other networks
  809.  
  810.         Read PRODUCTS.FMD for the full list of our support systems.
  811.  
  812. ───[EOF]──────────────────────────────────────────────────────────────────────
  813.