home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / WWIVMODS / MODSUNKN.ZIP / POSTCALL.MOD < prev    next >
Text File  |  1990-04-01  |  2KB  |  63 lines

  1. Buck #1 @8604
  2. Fri Mar 30 15:19:17 1990
  3. Well, this is my first "published" mod, and it's a simple one, and merely a
  4. change in one of Waynes functions to apply it to stop game leeches.
  5.  
  6. Since Wayne implemented a post/call ratio requirement for downloading
  7. files, i thought, hey, why can't i just do the same thing to the chains?
  8. Well, I did, and it works fine.  Here we go...
  9.  
  10. First, Load up BBS.C and search for "do_chains", then insert the following
  11. line ('=' means existing, '+' means ADD the line, and '-' means delete
  12. the line).
  13.  
  14.  =    Case '.'
  15.  =      helpl=26;
  16.  +      if (post_ratio_ok())
  17.  =      do_chains;
  18.  =      break;
  19.  
  20.  
  21. Next, insert the following procedure after any procedure in BBS.C
  22. /* Begin mod */
  23.  
  24. int post_ratio_ok()
  25. {
  26.   int ok=1;
  27.   char s[101];
  28.  
  29.   if (!(thisuser.exempt & exempt_ratio))
  30.     if ((syscfg.post_call_ratio>0.0001) && (post_ratio()<syscfg.post_call_ratio)) {
  31.       ok=0;
  32.       nl();
  33.       nl();
  34.       sprintf(s,"Your post/call ratio is %-5.3f.  You need a ratio of %-5.3f to access games.",
  35.         post_ratio(), syscfg.post_call_ratio);
  36.       pl(s);
  37.       nl();
  38.     }
  39.  
  40.  
  41.   return(ok);
  42. }
  43. /* End Mod */
  44.  
  45. Now, load up FCNS.H and add the new  int post_ratio_ok() function to
  46. the bottom of the list, and your off!
  47.  
  48.  
  49. Great, now that you've done that, simply recompile the BBS, and you are
  50. all set.  Go into init, and set your post/call ratio the way you want
  51. it and if there are any users that you want to be exempt (generally the
  52. same users you'd want to be exempt from the ul/dl ratios) simply give
  53. them an EXEMPTION of 1.
  54.  
  55. That's all there is to it!
  56.  
  57. Hope you enjoyed this little 3 minute mod, courtesy of:
  58.  
  59.                 Buck's Place BBS  WWIVnet node @8604
  60.                 806-793-0105
  61.                 Hayes V-Series Powered
  62.  
  63.