home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / WWIVMODS / PRE412.ZIP / AUTODEL.MOD < prev    next >
Text File  |  1992-12-01  |  5KB  |  127 lines

  1. Snorkel #1 @3659
  2. Sun Mar 11 10:32:51 1990
  3. This is a fix for a mod in VARIOUS2, written by MrBill.  I installed it and 
  4. then found out that I could not have my mail forwarded because once mail is 
  5. forwarded, it becomes E-mail, not Feedback, and the user gets deleted anyway.
  6.  
  7. I patched the code in two different spots, and now I can have my mail
  8. forwarded to anyone, and a new user will not get deleted as long as they leave
  9. me Feedback.
  10.  
  11. I changed MrBill's routine slightly also, and had it do a printfile instead of
  12. hard-coding the text into the BBS.  The first part of this message contains
  13. the mod as it was originally written, and then my patches come after.  If you
  14. are using this mod, my patches will work as I have tested them thoroughly.
  15. The code is from 4.07 as I am still running that version, but this should
  16. readily convert over to 4.10 or 4.11.
  17.  
  18.  
  19. 4-------------------------------------------------------------------------------
  20.  
  21.                            Auto-Deletion of Assholes                          
  22.                                   by MrBill
  23.  
  24.      This mod will automatically delete users who don't leave a validation
  25. feedback and hang up on them after printing out a message.
  26. I wrote this because I really don't look at my daily log enough and
  27. sometimes a new user can slip past me if he doesn't leave the validation 
  28. feedback. Then a week later, i'd get mail asking why the user isn't validated
  29. yet and i have to explain that i didn't even know he was there! Anyway...here
  30. you go.
  31.  
  32. Load up newuser.c and go all the way to the end of the file and the end of
  33. void newuser() and just change the following. It's quite simple. Now, this 
  34. doesn't send the users name to the daily log or anthing, i don't want to be
  35. bothered, but if you want it to...you can make a string variable to copy the
  36. user's name into and then put in it "automatically deleted" or some such thing
  37. and send it to the sysoplog instead of the line that says "#+#+#+# Auto 
  38. deletion of....blah blah)
  39.  
  40.  
  41.       strcpy(irt,"Validation Feedback.");                         /* search */
  42.       email(1,0,1,0);
  43.       if (thisuser.feedbacksent==0){                                 /* add */
  44.         sysoplog("#+#+#+# Auto deletion of non-validated user");     /* add */
  45.         prt(3,"You were supposed to leave a validation feedback.");  /* add */
  46.         nl();                                                        /* add */
  47.         prt(3,"Since you consider yourself to be above the system,");/* add */
  48.         nl();                                                        /* add */
  49.         prt(3,"you may consider your account deleted."); nl();       /* add */
  50.         hangup=1;                                                    /* add */
  51.         dtr(0);                                                      /* add */
  52.         deluser(usernum);                                            /* add */
  53.         checkhangup();                                               /* add */
  54.       }                                                              /* add */
  55.     }
  56.   }
  57. }
  58.  
  59. NOTE:Since typing this up I have decided it would be easier to replace the two
  60.      lines that print out to the user 'since you consider yourself...' with a
  61.      printfile("ASSHOLE.MSG"); and then you can make the message be as long or
  62.      short as you'd like. And you can, of course, call it something else if
  63.      you'd prefer.
  64.  
  65.  
  66. 4-------------------------------------------------------------------------------
  67. (end of original mod)
  68.  
  69.  
  70. Now load up your Turbo C editor, and load NEWUSER.C.  Here is MrBills mod, 
  71. patched to allow sysop mail forwarding (including Feedback):
  72.  
  73. First, find 'void newuser()'
  74.  
  75. change it to read:
  76.  
  77.                 void newuser(unsigned short un, unsigned short sy)
  78.  
  79. Next, search for:
  80.  
  81.     if (incom) {
  82.       if (printfile("FEEDBACK.MSG"))        /* SEARCH FOR THIS LINE */
  83.         sl1(0,"#Aborted FEEDBACK.MSG");
  84.       strcpy(irt,"Validation Feedback");
  85.       byline[0]=0;     /* omit this line if you do not have the BYLine mod */
  86.       read_user(1,&u);              /* ADDED to mod */
  87.       if(forwardm(&un,&sy))         /* ADDED to mod */
  88.         email(u.forwardusr,0,1,0);  /* ADDED to mod */
  89.       else                          /* ADDED to mod */
  90.         email(1,0,1,0);
  91.       if (thisuser.feedbacksent==0) {
  92.         sprintf(s,"%s auto deleted for aborting NEWUSER Feedback."
  93.           ,thisuser.realname);
  94.         sysoplog(s);        /*   create a file in your G-file directory     */
  95.         printfile("DELETE");/*    with a message about how they screwed     */
  96.         hangup=1;           /* up by not leaving a Validation letter to you */
  97.         dtr(0);
  98.         deluser(usernum);
  99.         checkhangup();
  100.       }
  101.     }
  102.   }
  103. }
  104.  
  105. 4-----------------------------------
  106.  
  107. Here is the second part of the patch:
  108.  
  109. In MSGBASE.C, look for 'void email(etc...)'.
  110.  
  111. Search for the line:
  112.  
  113.                   if ((un==1) && (sy==0)) {  (this line is changed below)
  114.  
  115.  
  116.   read_user(1,&ur);           /* Insert this line before the search line */
  117.   if (((un==1) || (un==ur.forwardusr)) && (sy==0)) {   /* CHANGED LINE */
  118.     ++status.fbacktoday;
  119.     ++thisuser.feedbacksent;
  120.     ++thisuser.fsenttoday1;
  121.     ++fsenttoday;
  122.   } else {
  123.     ++status.emailtoday;
  124.  
  125.  
  126. That's all there is to it!
  127.