home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / vrac / 5mods_4.zip / SMURF02.MOD < prev    next >
Text File  |  1994-01-20  |  7KB  |  190 lines

  1. ┌────────────────────────────────────────────────────────────────────────────┐
  2. │ Mod Name      : SMURF02.MOD      Mod Author: PAPA SMURF   1@29969 WWIVnet  │
  3. │ Difficulty    : █▒▒▒▒▒▒▒▒▒                                1@2000  FIITAnet │
  4. │ WWIV Version  : 4.23                                                       │
  5. │ Mod Date      : 1/8/93                                                     │
  6. │ Files Affected: LILO.C NEWUSER.C FCNS.H                                    │
  7. │ Description   : Ask user if they would like adult access, age permitting.  │
  8. │                 Send SSM to Sysop of new user ADULT status/request.        │
  9. └────────────────────────────────────────────────────────────────────────────┘
  10.  
  11. ┌─────────────────────────┐
  12. │ ==   Existing Code      │
  13. │ =+   Change Code        │
  14. │ ++   Add This Code      │
  15. │ --   Delete This Code   │
  16. └─────────────────────────┘
  17.  
  18. ══[ Long Description ]════════════════════════════════════════════════════════
  19.  
  20.   This is a total rewrite of FOXX02.mod and SMURF01.mod.  IF you have either
  21. of these two installed, please delete them and use only this one if you like
  22. the changes.  (Make sure to *delete* the call to input_adult() in NEWUSER.C
  23. as it will be called only from LILO.C) There is a *FIX* in here for
  24. SMURF01.mod where I mis-spelled something.  The old SMURF01.mod gave a -1 for
  25. user number sometimes and that is fixed now.
  26. Watch for lines that say //WRAPPED
  27. You must unwrap them.
  28.  
  29.   I wrote this mod because my board is mostly an adult board.  If the user is
  30. over the age of 17 it ask if they would like adult access on your system, if
  31. they answer yes it then prints the terms of adult access and ask the user to
  32. agree to the terms, then writes reply to thisuser.note.
  33.  
  34. ══[   The Mod   ]═════════════════════════════════════════════════════════════
  35.  
  36. Step 1: Back-up the source ;)
  37.  
  38. Step 2: Load up FCNS.H
  39.  
  40. <* Add the following to the FCNS.H file before void input_dataphone(void) *>
  41. <* if you do not have FOXX02.MOD installed else skip this step            *>
  42.  
  43. == /* File: newuser.c */
  44. ++ void input_adult(void);
  45.  
  46. Save and Close FCNS.H.....................
  47.  
  48. Step 3: Load up NEWUSER.C
  49.  
  50. <* Delete the following after input_screensize(); if you have FOXX02.mod *>
  51. <* installed already if not then skip this step.                         *>
  52.  
  53. == input_age(&thisuser);
  54. == input_comptype();
  55. == input_screensize();
  56. -- input_adult(void);
  57.  
  58.  
  59. Step 4: Load up NEWUSER.C
  60.  
  61. <* ++Add (block copy) the following to the end of the NEWUSER.C file *>
  62. <* delete the old input_adult(void) if you have it and replace it.   *>
  63.  
  64. void input_adult(void)
  65. {
  66.   char s1[7],s2[81];
  67.  
  68.   if (thisuser.age>17) {
  69.     nl();
  70.     npr("Would you like adult access? ");
  71.     if (yn()) {
  72.       outchr(12);
  73.       if (okansi) {
  74.                    nl();
  75.                    pl("    WARNING!! WARNING!! WARNING!! WARNING!! WA
  76.                        RNING!! WARNING!! WARNING!!");  //WRAPPED
  77.                    printfile("ADULT.ANS");
  78.                    } else {
  79.                            pl("    WARNING!! WARNING!! WARNING!! WARNING!!     
  80.                        WARNING!! WARNING!! WARNING!!");  //WRAPPED
  81.                            printfile("ADULT.MSG");
  82.                            }
  83.                    nl();
  84.                    npr("Type I AGREE to accept these terms.: ");
  85.                    mpl(7);
  86.                    input(s1,7);
  87.                    if (!strcmp(s1,"I AGREE")) {
  88.                         strcpy(thisuser.note,"AGREED TO ADULT TERMS");
  89.                         sprintf(s2,"%s %s & Wants Adult Access. Age: 
  90. %d",nam(&thisuser, usernum),thisuser.note,thisuser.age);  //WRAPPED
  91.                          ssm(1,0,s2);
  92.                          nl();
  93.                          return;
  94.                    } else {
  95.                    strcpy(thisuser.note,"DID NOT AGREE TO ADULT TERMS");
  96.                    pl("If you made a mistake or would like to request adult"); 
  97.                    npr("access at another time, email %s.\r\n",syscfg.
  98.                         sysopname);  //WRAPPED
  99.           sprintf(s2,"%s %s & Dosn't want Adult Access. Age: %d",nam(&thisuser 
  100.           ,usernum),thisuser.note,thisuser.age);  //WRAPPED
  101.           ssm(1,0,s2);
  102.           nl();
  103.           return;
  104.          }
  105.     }
  106.     strcpy(thisuser.note,"DID NOT AGREE TO ADULT TERMS");
  107.     pl("If you made a mistake or would like to request adult");
  108.     npr("access at another time, email %s.\r\n",syscfg.sysopname);
  109.     sprintf(s2,"%s %s & Dosn't want Adult Access. Age: %d",nam(&thisuser
  110.     ,usernum),thisuser.note,thisuser.age); //WRAPPED
  111.     ssm(1,0,s2);
  112.     nl();
  113.     return;
  114.    }
  115.     strcpy(thisuser.note,"MINOR - NO ADULT ACCESS");
  116.     sprintf(s2,"%s is a %s.  Age: %d",nam(&thisuser,usernum),thisuser.note,
  117.     thisuser.age);  //WRAPPED
  118.     ssm(1,0,s2);
  119.     nl();
  120. }
  121.  
  122. Save and Close NEWUSER.C....................
  123.  
  124.  
  125. Step 5: Load up LILO.C
  126.  
  127. <* Search for the following in the LILO.C file *>
  128.  
  129. == void logon(void)
  130. == {
  131.  
  132.  
  133. <* Then add the s3 variable *>
  134.  
  135. =+  char s[255],s1[181],s2[81],s3[60],*ss; // add s3[60] for SMURF02.MOD
  136.  
  137.  
  138. <* A little further down Search for the following *>
  139.  
  140. ==    if (thisuser.waiting) {
  141. ==      prt(5,get_string(377));
  142. ==      if (yn())
  143. == readmail();
  144. ==    }
  145.  
  146. <* Then ++ADD (block copy) the following after that closed bracket *>
  147. <* Delete the old code for SMURF01.mod if you have it and replace  *>
  148.  
  149. /*************************************************************************/
  150. // Determine if the users NOTE is equal to either of the three catagories
  151. // and if not then validate them for the adult section.  This will validate
  152. // all users for ADULT ACCESS. This updates old records so that you the
  153. // Sysop can prove that all Adult Access users have agreed with your
  154. // requirements. Remember that if you install this mod, input_adult() will
  155. // rewrite the old users note with Adult status..... *(New SMURF01.mod)*
  156.  
  157.     strcpy(s3,thisuser.note);
  158.  
  159.     if((!strcmp(s3,"AGREED TO ADULT TERMS")) || (!strcmp(s3,"DID NOT AGREE
  160.     TO ADULT TERMS")) || (!strcmp(s3,"MINOR - NO ADULT ACCESS"))) { //WRAPPED
  161.        nl();
  162.        npr("Your Adult Status is: %s.\r\n",s3);
  163.        } else {
  164.                nl();
  165.                prt(4,"You are now being validated for the Adult Section.");
  166.                nl();
  167.                pausescr();
  168.                if(thisuser.age<18) {
  169.                   prt(4,"Sorry, had to update the records and you did not
  170.                   qualify.");  //WRAPPED
  171.                   nl();
  172.                   input_adult();
  173.                   } else {
  174.                           nl();
  175.                           input_adult();
  176.                          }
  177.                }
  178.  Save and Close LILO.C.....................
  179.  
  180. Step 6: Exit Editor and TYPE MAKE and because FCNS.H was modified, it will
  181. have to recompile the whole BBS :( so go get someting to snack on.
  182. ══[ Disclaimer ]══════════════════════════════════════════════════════════════
  183. Not responsible for HD crashes or anything else...
  184.  
  185. Full Credit goes to FOXX 1@4907 WWIVnet for origional writting input_adult()
  186. All other Credit goes to Papa Smurf 1@29969 WWIVnet for putting it all 
  187. togeather.
  188.  
  189.  
  190.