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

  1. Midnight Tree Bandit #11 @8403
  2. Wed May 23 00:52:17 1990
  3.      |
  4.      |  Enhanced Sysop Autovalidation Information
  5.      |     by MTB of the Vaporboard
  6.      |
  7.      |  5/10/90
  8.   ---+-------------------------------------------
  9.      |
  10.      
  11. Long long time ago, I installed Mr Bill's Sysop Autovalidation mod.  It was 
  12. neat, it was useful, it was worth every penny I didn't pay for it.
  13.  
  14. But now that I seem to be known as "Mr Modnet" (thanks Elric), the Vaporboard 
  15. gets calls from all over from sysops picking up ModNet and generally checking 
  16. in.  I became curious as to how many of these systems were non-net, how many 
  17. Link, how many Net, and how many from other systems (they DO exist out there, 
  18. folks).  So I decided to come up with a way to keep track of such things, 
  19. without re-doing the entire user list, to boot.
  20.  
  21. Basically, I took the last 11 bytes of the reserved space in the user record 
  22. and used it for holding the BBS type (leaving (in my 4.10 code) 22 bytes for 
  23. whatever Wayne Bell decides to use it for.  If he uses all 33 left in a future 
  24. version.... well, that's your problem).
  25.  
  26. The core of this mod is simple: add the variable to VARDEC.H and add a new 
  27. procedure to NEWUSER.C.  After working that out, I added the bits that let 
  28. UEDIT change it.  Best of all: NO USER FILE CONVERSION!! (I mean, really, what 
  29. could Random POSSIBLY add to the user list that we actally need?)
  30. Here are the easy-to-swallow steps (in gelatin caps for easier digestion):
  31.  
  32. ------------------------------------------------------------------------------
  33. [Legend for code blocks:
  34.      - is delete
  35.      + is add
  36.      * is change
  37.   [blank] is leave alone]
  38.   
  39. I.   VARDEC.H --  Add the 'bbstype' variable to userrec 
  40.  
  41.       unsigned short  fsenttoday1;        /* feedbacks today */
  42.       unsigned char   num_extended;           /* num lines of ext desc */
  43.       unsigned char   optional_val;           /* optional lines in msgs */
  44.       char            res[22],                /* reserved bytes */
  45. +                     bbstype[11];            /* visiting sysop's BBS type */
  46.  
  47. II.  NEWUSER.C -- Let the sysops tell you about themselves
  48.  
  49.      A.  In 'void newuser', at the end of the 'thisuser.whatever' assignments:
  50.      
  51.        thisuser.bwcolors[6]=143;
  52.        thisuser.bwcolors[7]=112;
  53.        
  54.        thisuser.bbstype[0]=0;
  55.      
  56. +      realsl=thisuser.sl;
  57.  
  58.  
  59.      B.  Add a call to 'void sysop_check()' to 'void newuser':
  60.      
  61.          input_age(&thisuser);
  62.          input_comptype();
  63.          input_screensize();
  64.          input_ansistat();
  65. /* If you've installed the pick-a-default-editor and pick-a-default-protocol 
  66.    mods from MrBill, they will appear here.  Just don't want to confuse you 
  67.    forgetful modders out there. */
  68.          nl();
  69.          print("Here's your password: ",thisuser.pw,"");
  70.          nl();
  71.          prt(5,"Would you rather have another one (Y/N)? ");
  72.          if (yn())
  73.            input_pw();
  74. +        nl();
  75. +        prt(5,"Are you a masochist .. er sysop of another BBS?");
  76. +        if (yn())                           
  77. +           check_sysop();
  78.         } 
  79.   
  80.  
  81.        if (!hangup)
  82.          do {
  83.  
  84.  
  85.      C.  Add 'void check_sysop()' just before 'void newuser()':
  86.      
  87. void check_sysop()
  88. {
  89.    char s[81];
  90.    
  91.    nl();
  92.    pl("Please enter your BBS name and number");
  93.    outstr(":");                                
  94.    inputl(thisuser.note,40);                   
  95.    thisuser.exempt=31;     /* Set these to whatever you want.  The exemptions
  96.                               are bit-mapped and defined in VARDEC */
  97.    thisuser.restrict=0;    /* Also bit-mapped.  See your VARDEC for details */
  98.    nl();
  99.    pl("5Which type of BBS is this: ");      /* Beware! WWIV colors be    */
  100.    pl("5  1. Plain WWIV (no net)");         /* here.  To hard code the   */  
  101.    pl("5  2. WWIVLink");                    /* colors in, hold ALT while */
  102.    pl("5  3. WWIVNet");                     /* tapping in 3 (for ^C).    */
  103.    pl("5  4. Other (specify)");             /* If using Turbo C's editor */
  104.    pl("5  N. Never mind");                  /* use ^P^C.                 */
  105.    prt(2,"Pick 1-4,N: ");
  106.    switch(onek("N1234")) {
  107.       case '1':
  108.         strcpy(thisuser.bbstype,"WWIV NoNet");
  109.         sprintf(s,"**> %s registered as WWIV sysop",nam(&thisuser,usernum));
  110.       case '2':
  111.         if (!thisuser.bbstype[0]) {
  112.           strcpy(thisuser.bbstype,"WWIVLink");
  113.           sprintf(s,"**> %s registered as WWIVLink sysop"
  114.                     ,nam(&thisuser,usernum));
  115.         }
  116.       case '3':
  117.         nl();
  118.         if (!thisuser.bbstype[0]) {
  119.           strcpy(thisuser.bbstype,"WWIVNet");
  120.           sprintf(s,"**> %s registered as WWIVNet sysop"
  121.                     ,nam(&thisuser,usernum));
  122.         }
  123.         sysoplog("#*#*#* Auto-validation of WWIV SysOp");
  124.         thisuser.sl=60;
  125.         thisuser.dsl=60;
  126.         thisuser.sysstatus ^= sysstatus_expert;
  127.         printfile("wsysopax.msg");
  128.         pausescr();
  129.         break;
  130.       case '4':
  131.         nl();
  132.         prt(2,"What is your BBS software (10 char max)? ");
  133.         mpl(10);
  134.         inputl(thisuser.bbstype,10);
  135.         sprintf(s,"**> %s registered as %s sysop",
  136.                   nam(&thisuser,usernum),thisuser.bbstype);
  137.         sysoplog("#*#*#* Auto-validation of SysOp");
  138.         thisuser.sl=50;
  139.         thisuser.dsl=50;
  140.         printfile("sysopax.msg");
  141.         pausescr();
  142.         break;
  143.       case 'N':
  144.         nl();
  145.         thisuser.note[0]=0;
  146.         thisuser.bbstype[0]=0;
  147.         s[0]=0;
  148.         thisuser.exempt=0;
  149.         thisuser.restrict=syscfg.newuser_restrict;
  150.         break;
  151.   }
  152.   if (s[0]) 
  153.     ssm(1,0,s);
  154. }
  155.  
  156. /*
  157. Note on this procedure:
  158.      This is the framework.  It does what the Vaporboard's does: gets the BBS 
  159.      name, and sends a message to the sysops in their SMW that the user logged 
  160.      on as a particular type of sysop.  If the user is a non-WWIV sysop, it 
  161.      gets the name of the software and sends a note.  Note that control falls 
  162.      through the first two cases.  That's because all WWIV sysops get the same 
  163.      treatment.  You could probably figure out from here what else to do to 
  164.      further make it suit your needs.  You can change other things separately, 
  165.      use registered/nonregistered, etc.
  166.      Note also that you need two .MSG files in your GFILES directory.  You can 
  167.      have more, if you wish.  Here's what we have:
  168.           WSYSOPAX.MSG is what WWIV sysops see when they register.  Says 
  169.           something to the effect that the earth will swallow them up if they 
  170.           turn out to be non-sysops.  Mentions the priveleges they get, too.
  171.           SYSOPAX.MSG is similar, but it is written for the non-WWIV sysops.  
  172.           It makes the same threats.
  173. */
  174.  
  175. III  SYSOPF.C --  Now to edit the 'bbstype' in UEDIT
  176.  
  177.      A.  In 'void print_data()':
  178.      
  179.        if (u->note[0])
  180.          print("Note: ",(u->note),"");
  181. +      if (u->bbstype[0])
  182. +        print("BBS : ",(u->bbstype),"");
  183.        if (u->ass_pts){
  184.          itoa(u->ass_pts,s,10);
  185.          print("Ass : ",s,"");
  186.  
  187.  
  188.      B.  And in 'void print_short()':
  189.  
  190.        print("Comp: ",&(ctypes[u->comp_type][0]),"");
  191.        if (u->note[0])
  192.          print("Note: ",(u->note),"");
  193. +      if (u->bbstype[0])
  194. +        print("BBS : ",(u->bbstype),"");
  195.        if (u->ass_pts){
  196.          itoa(u->ass_pts,s,10);
  197.          print("Ass : ",s,"");
  198.  
  199.  
  200.      C.  Now we'll let you EDIT it in UEDIT.  First add the "B" option:
  201.      
  202.       if ((realsl==255) || (wfc))
  203. *       ch=onek("Q[]{}/,.?UDRNLCPOGMSTEXYZAIB~:*");
  204.       else
  205. *       ch=onek("Q[]{}/,.?UDRNLCPOGMSTEXYZAIB");
  206.  
  207.  
  208.      D.  Now add the case for it (right after case 'I' is good):
  209.      
  210.         case 'B':
  211.           nl();
  212.           pl("1) WWIV (no nets); 2) WWIVLink; 3) WWIVNet;");
  213.           pl("4) Other (specify); or N)one");
  214.           nl();outstr("Which (1-4,N)? ");
  215.           switch(onek("N1234") {
  216.             case '1':
  217.                strcpy(u.bbstype,"WWIV NoNet"); break;
  218.             case '2':
  219.                strcpy(u.bbstype,"WWIVLink"); break;
  220.             case '3':
  221.                strcpy(u.bbstype,"WWIVNet"); break;
  222.             case '4':
  223.               nl();
  224.               prt(2,"What is the BBS software (10 char max)?");
  225.               mpl(10);
  226.               inputl(u.bbstype,10);
  227.               break;
  228.             case 'N':
  229.               u.bbstype[0]=0; break;
  230.           }
  231.           prt(2,"Don't forget to update the SL, DSL, Note, ");nl();
  232.           prt(2,"and other info accordingly."); nl();
  233.           pausescr();
  234.           write_user(un,&u);
  235.           break;
  236.  
  237.  
  238. IV.  CONIO.C -- Showing it in the top-screen data
  239.  
  240. There are two 'void topscreen()' procedures in CONIO.C.  The first is within 
  241. the "#ifdef OLD_STUFF" condition, and the other is in the "#ELSE" condition.  
  242. Just to be safe (who knows what "OLD_STUFF" is for, anyway?), we'll change 
  243. both:
  244.      A.  The first place to change is about line 969.  Simply change 
  245.      'thisuser.callsign' to 'thisuser.bbstype':
  246.      
  247.      movecsr(0,1);
  248.      sprintf(ol,         /* this line split so it'll fit in an 80 col. line*/
  249.  "SL =%-3d  AR =%-16s  LO=%-5d F=%-5d  W=%-3d %-6s  %c%c%-3d Ex=%-3d FW=%-2d",
  250.       thisuser.sl,ar,thisuser.logons,thisuser.feedbacksent,thisuser.waiting,
  251. *     thisuser.bbstype,thisuser.sex,ch,thisuser.age,thisuser.exempt,fwaiting);
  252.      outs(ol);
  253.      
  254.      B.  The second place is at about line 1182.  Make the same change here:
  255.      
  256.        movecsr(0,1);
  257.        sprintf(ol,"%-20s %12s %-7s DL=%4d/%6ld DL=%3d TO=%5.0ld ES=%4d",
  258. *          thisuser.realname,thisuser.phone,thisuser.bbstype,
  259.            thisuser.downloaded,thisuser.dk,thisuser.dsl,
  260.            ((long) ((thisuser.timeon+timer()-timeon)/60.0)),
  261.            thisuser.emailsent+thisuser.emailnet);
  262.        outs(ol);
  263.        
  264. Note that in both cases you will only have 6 or 7 letters of the bbstype 
  265. showing.  That's because there is simply no space for expanding to the 
  266. required 10 letters.  But you will see enough of it to know what it is, right?
  267. ------------------------------------------------------------------------------
  268.  
  269. And that's it!  That's all you need to have a means of keeping track of your 
  270. visiting sysops.  I thought of getting it to acccept the Net/Link node 
  271. numbers, too, but changed my mind.
  272.  
  273. Disclaimer:  No problems so far.  Would be happy to hear any problems.  This 
  274. is my biggest mod to date.  I'm really impressed with myself.  It's not my 
  275. fault if:
  276.      Your motherboard loses the smoke that makes it run;
  277.      Your users scream at you for keeping the board down while you install 
  278.           this mod;
  279.      The BBS starts throwing random garbage on the screen;
  280.      Your computer comes in contact with Elvis (who needs boats);
  281.      Or any other sort of random system crash that could happen with or 
  282.      without this mod.
  283.      
  284.  
  285.  
  286. Filo #1 @5252
  287. Thu Mar 15 11:29:55 1990
  288. Tuck #1 @3652
  289. Sun Mar 04 22:07:01 1990
  290.                      Auto-validation of WWIV SysOps
  291.                               by MrBill
  292.  
  293. If you put in the mod right before this one, just put this after the last line
  294. of it. if not, then you will be searching for input_ansistat() and put this 
  295. right after it. This is all in NEWUSER.C in void newuser.
  296.  
  297.  
  298.  
  299.    nl();                                               /* add */
  300.   prt(5,"Are you currently a WWIV SysOp?");            /* add */
  301.   if (yn()){                                           /* add */
  302.   pl("Please enter your BBS name and number");         /* add */
  303.    outstr(":");                                        /* add */
  304.   inputl(thisuser.note,40);                            /* add */
  305.   sysoplog("#*#*#* Auto-validation of WWIV SysOp");    /* add */
  306.   thisuser.sl=60;        /* put the security level that you want here */
  307.   thisuser.dsl=60;       /* put the d/l security level that you want here */
  308.   thisuser.exempt=1;     /* put if you want exempt from d/l ration */
  309.   thisuser.restrict=0;   /* put if no restrictions */
  310.   thisuser.ar=12;        /* see note */                /* add */
  311.   thisuser.dar=12;       /* see note */                /* add */
  312.    nl();                                               /* add */
  313.   prt(1,"You have just been validated as a visiting ");/* add */ 
  314.   prt(1,"WWIV sysop. If I find any of ");nl();         /* add */
  315.   prt(1,"this info to be false, I will delete you ");  /* add */
  316.   prt(1,"and inform others about you.");               /* add */
  317.    nl();                                               /* add */
  318.    nl();                                               /* add */
  319.    pausescr();                                         /* add */
  320.   }                                                    /* add */
  321. if (!hangup)
  322.  
  323. NOTE: the AR's and DAR's are bitmaped. I have my bbs set up for if you are
  324. a WWIV sysop, you get the AR and DAR of C and D, and normal (non-WWIV) sysops
  325. just get D for their AR and DAR to access my sysop sub. To figure out what 
  326. number to assign for the AR's and DAR's in autovalidation look at the 
  327. following chart and then figure out (with a hex to dec calculator or if
  328. your smart enough in your head) what the decimal value would be for the
  329. hexidecimal number that you need. And thanks to Gord the Rogue who explained
  330. all this to me awhile ago.
  331.  
  332. 0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
  333. |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
  334. 1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1
  335. |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |
  336. A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P
  337.  
  338. so if you need your AR to be just A for sysop the number would be:
  339. 1000000000000000
  340. or for the AR to be set to C and M it would be:
  341. 1010000000001000
  342. the DAR's are done the same way
  343. (if anyone has a hex to deci conversion program please send it to me!)