home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / SYSOP / MODS1.ZIP / SPV-029D.MOD < prev    next >
Text File  |  1995-06-04  |  17KB  |  398 lines

  1. Papa Bear #1 @11579
  2. 7Thursday1, 7June 11, 71995 2 66:221 am
  3. 0R 34 06/04 18:34 WWIVnet ->8339
  4. 0R 34 06/04 16:40 WWIVnet 8314->8304
  5. 0R 34 06/04 08:31 WWIVNET 4001->8314
  6. 0R 34 06/04 11:42 WWIVnet 4000->4001
  7. 0R 34 06/03 07:50 WWIVnet ->4000
  8. 0R 34 06/01 10:03 WWIVnet 4001->4000
  9. 0R 34 06/01 17:26 WWIVnet 11579->4001
  10. 0R 34 06/01 06:21 WWIVnet ->11579
  11. 4Msg. Status:9▄ 5Please reply!
  12. 9 ▀▀▀▀▀▀▀▀▀▀▀▀
  13. ┌────────────────────────────A CEREBRUM RELEASE!─────────────────────────────┐
  14. │ Mod Name: SPV-029D.MOD     Mod Authors: Pâpâ ßêâr (1@11579.wwivnet)        │
  15. │ Difficulty: ▓▓▓░░░░░░░     First .... [12/29/93]                           │
  16. │ WWIV Version: 4.24         Last ..... [06/01/95]                           │
  17. │ Files Affected: LILO.C UEDIT.C FCNS.H NEWUSER.C DEFAULTS.C                 │
  18. │ Description: Preforms a "birth date" CHECK for security reasons.  Uses pre-│
  19. │existing [but unused] code.  Now with BACKUP PASSWORD chacking and forced   │
  20. │E-Mail [w/logoff if aborted] if bad birthdate!                              │
  21. ╞═────────────────────────────────────═╤═───────────────────────────────────═╡
  22. │ StarPort Valhalla [   ]   -     ASV 28.8kbps  Home of the SPV mod series!  │
  23. └─────────────────────────────────────═╧═────────────────────────────────────┘
  24.  
  25.                      >>> OFFICIAL WWIV SUPPORT SITE! <<<
  26.  
  27.  Word of Warning:  You installed it, you're responsible! Make back-ups BEFORE
  28.  attempting to install this modification!  Read all text before beginning.
  29. ─────────────────────────────────────────────────────────────────────────────
  30.  LEGEND:
  31.  ==  Original Code [use this to search on]
  32.  ++  Add this Line [mods ALWAYS add stuff, don't they?]
  33.  --  Delete this Line [or comment out, its not needed]
  34.  -+  Change this Line [I usually comment these lines]
  35. ─────────────────────────────────────────────────────────────────────────────
  36.  LONG DESCRIPTION: This piece of code was requested by Snowman (1@7763).
  37.  What it does is allow you turn toggle on or off a "Birthday Check" in UEDIT
  38. [either from the BBS proper or WFC].
  39.  
  40.  When it is toggled ON, the following happens:
  41.  The next time the user logs on, they'll be asked to re-enter their birth
  42. date as a routine deal.  If they enter the SAME as when they first logged on,
  43. then it allows them to continue to log on as normal.  If they are incorrect,
  44. then it asks them to enter the backup password [Just as a secondary check for
  45. you, the SysOp, to see if they get it right.  No action is taken by the BBS
  46. against their account either way.]  Then it lowers their SL and DSL, sends
  47. you a SSM as notification, makes a SYSOPLOG entry, and forces them to leave
  48. you E─Mail [in which, will have a RE: line telling you what went wrong].  If
  49. they abort the E-Mail, they are auto-logged off.
  50.  This can be used as a "security" feature to your BBS.
  51.  Thanks to Okinawa Ranger (1@157 IceNET) for pointing out a bug!
  52. ─────────────────────────────────────────────────────────────────────────────
  53. FEATURES:
  54.  o B command toggles ON/OFF the checking in UEDIT.
  55.  o Places banner at top of user's account letting you know if its on when
  56.    you're in UEDIT.
  57.  o Fault tolerant for user.  Forces them to use mm/dd/yy format before
  58.    critical checking takes place.
  59.  o Easily modified to use your specified SL/DSL's.
  60.  o LOCAL [does not show up remotely] reporting of user's birth date as it
  61.    appears in the userrec when they log on and the checking is active.
  62.  o Automatically toggles check OFF after the user completes it. [Successfully
  63.    or not...]
  64. REVISION "B" NOTES
  65.  o Fixes a bug in SPV─029.MOD
  66.  o Adds a backup password.  This backup password is entered when a user logs
  67.    on for the first time, _OR_ if they already have an account, will prompt
  68.    them to enter a backup password during the first call (only) after you
  69.    install this.  The backup password uses the pre─existing [but frequently
  70.    unused] CALL SIGN field in the userrec.
  71.  o Forces them to leave E─Mail if they fail the birthday check.  Kicks them
  72.    off the BBS if they abort leaving mail.
  73.  o Leaves you an SSM and SYSOPLOG entries built as they fail checks, so
  74.    you'll no exactly when and what they failed.
  75.  o Builds and inserts a RE: line into their E─Mail [see above].
  76.  o If an existing user has birthdate checking on, and they haven't entered a
  77.    backup password, it will ask them for the P/W during the first call after
  78.    this is installed, and their birthdate on the second call after
  79.    installation.  This is to insure that they aren't asked for the backup
  80.    password [for checking purposes] during the same call in which they
  81.    entered it in the first place!
  82.  o Ensures that the backup password and the main password cannot be the same!
  83.  o Enforces three character backup password checking so they can't just press
  84.    ENTER and get it wrong.
  85. REVISION "C" NOTES
  86.  o Where it did not allow a backup p/w - p/w match, it WOULD allow a p/w -
  87.    backup p/w match IF the user changed their password after they entered
  88.    their backup password.  This has been fixed.
  89. REVISION "D" NOTES
  90.  o Updated for WWIV 4.24
  91.  o Changed from using sysstatus_rip to using thisuser.cbv.
  92.  
  93. NOTE: I'd check to see if any users currently have information in their
  94. callsign field, and, if they do, zero it out immediately after installing
  95. this mod and before the first user calls.  That way you make sure everyone
  96. has a backup passoword.
  97. ─────────────────────────────────────────────────────────────────────────────
  98.  STEP 1: Open up LILO.C and add these lines in function: void logon(void)
  99.  
  100. ==  int i,i1,dv,win,f;
  101. ==  long len,pos;
  102. ==  long l;
  103. ++  char Check_Against[11],User_Input[11],Check_Backup[7];        // SPV-029D
  104. ++  int bdok,buok,ch_mail;                                        // SPV-029D
  105. ==
  106. ==  if (usernum<1) {
  107. ==    hangup=1;
  108. ─────────────────────────────────────────────────────────────────────────────
  109. STEP 2: Futher down in the same function [all the way to the end] add this
  110.         chunk 'o code:
  111.  
  112. ==       setuconf(CONF_SUBS, curconfsub, -1);
  113. ==     }
  114. ==   }
  115. ==   rip_cls();
  116. ==   autox = -1;
  117. // START SPV-029D BLOCK COPY
  118.   if ((thisuser.cbv) && (thisuser.callsign[0]!=NULL)) {
  119.     sprintf(Check_Against,"%2.2d/%2.2d/%2.2d",
  120.             thisuser.month,thisuser.day,thisuser.year);
  121.     printf("\r\nThis user's birthday = %s\r\n",Check_Against);
  122.     nl();
  123.     do {
  124.       bdok=0;
  125.       pl("5We must now preform a routine birthday check0");
  126.       npr(
  127.      "5Please enter your birthdate in the format 1mm5/1dd5/1yy2: 0");
  128.       mpl(8);
  129.       input(User_Input,8);
  130.       if ((User_Input[2]!='/') || (User_Input[5]!='/') ||
  131.           (strlen(User_Input)<8)) {
  132.         nl();
  133.         pl("6Incorrect format! Use 01/17/63 or 12/02/94!0");
  134.         nl();
  135.         bdok=1;
  136.       }
  137.     } while ((!hangup) && (bdok));
  138.     nln(2);
  139.     if (strcmp(Check_Against,User_Input)==0)
  140.       pl("5Thank you for completing this check!0");
  141.     else {
  142.       sprintf(irt,"2%s 6failed B/D check0",nam(&thisuser,usernum));
  143.    pl(
  144.     "2The birthdate you entered was NOT the same as the one you entered0");
  145.    pl("2when you first logged on.  Please enter your backup password.0");
  146.       do {
  147.         buok=0;
  148.         nl();
  149.         npr(": ");
  150.         mpl(7);
  151.         input(Check_Backup,7);
  152.         if (strlen(Check_Backup)<3) {
  153.           buok=1;
  154.           nl();
  155.           pl(
  156.        "5You 6*2MUST6*5 enter your backup password, 3─6 characters.0");
  157.           nl();
  158.         }
  159.       } while ((!hangup) && (buok));
  160.       if (stricmp(Check_Backup,thisuser.callsign)!=0)
  161.         strcat(irt,"6 & Backup P/W check0");
  162.       nl();
  163.       pl("2You will now E─Mail the SysOp. Explain why you could not0");
  164.       pl("2remember your birthday/backup password.  This is MANDATORY!0");
  165.       pl("2You will be LOGGED OFF if you do not leave mail!0");
  166.       nln(2);
  167.       ssm(1,0,irt);
  168.       sysoplog(irt);
  169.       ch_mail=thisuser.feedbacksent;
  170.       email(1,0,1,0);
  171.       thisuser.sl=10;                                             // NOTE 1
  172.       thisuser.dsl=10;                                            // NOTE 1
  173.       changedsl();
  174.       nln(2);
  175.       read_user(usernum,&thisuser);
  176.       if (ch_mail==thisuser.feedbacksent) {
  177.         pl("\007\0076You did not leave E─Mail.  Now logging you off!0");
  178.         hangup=1;
  179.         dtr(0);
  180.       } else {
  181.         pl("5Thank you for leaving mail. Access levels ARE temporarily0");
  182.         pl("5decreased until the SysOp can read your E─Mail.0");
  183.       }
  184.     }
  185.     thisuser.cbv=0;
  186.   } else if (thisuser.callsign[0]==NULL) {
  187.     nl();
  188.     pl("3We have started using a 'backup' password system. Enter a 3-60");
  189.     pl(
  190.      "3letter password.  Make sure to write this down. You may be asked0");
  191.     pl("3to re-enter it sometime in the future!0");
  192.     input_callsign();
  193.     nl();
  194.     pl("5Thank you for entering your 'backup' password! Remember it!0");
  195.     nl();
  196.   }
  197. // END SPV-029D BLOCK COPY
  198. == }
  199. ==
  200. == void logoff(void)
  201. == {
  202. ==   long l;
  203.  
  204. NOTE!!! OK, OK, so I used thisuser.cbv. In the STOCK 4.23 code, it is in
  205.         there, but not used for anything.  I borrowed it for this mod.  If
  206.         this is used in any future versions of WWIV, or is changed, I'll
  207.         update the mod then to reflect the changes.
  208. NOTE 1: This is where the SL/DSL are set.  Change these values to whatever
  209.         you want to give the user if they FAIL their birthday checking.
  210. ─────────────────────────────────────────────────────────────────────────────
  211. STEP 3: Add the following in UEDIT.C, function:
  212.         void print_data(int un, userrec *u, int lng, int cls)
  213.  
  214. ==    pl(get_string(236));
  215. ==    nl();
  216. ==  }
  217. // SPV-029D BEGIN
  218. ++  if (u->cbv) {
  219. ++    pl("6>> 4This account is marked for birthday checking!0 6<<0");
  220. ++    nl();
  221. ++  }
  222. // SPV-029D END
  223. ==  outstr_x2(get_string(1005)); pl(nam(u,un));
  224. ==  outstr_x2(get_string(238)); pl(u->realname);
  225. ─────────────────────────────────────────────────────────────────────────────
  226. STEP 4: In UEDIT.C, function: void uedit(int usern, int other) change this:
  227.  
  228. ==      prt(2,get_string(266));
  229. ==      if ((thisuser.sl==255) || (wfc))
  230. -+        ch=onek("ABCDEGILMNOPQRSTUXYZ0123456789[]{}/,.?~%:");  // Add the B
  231. ==      else
  232. ==        ch=onek("ACDEGILMNOPQRSTUYZ0123456789[]{}/,.?%");
  233. ==      switch(ch) {
  234.  
  235. NOTE: This change adds the B command to UEDIT.  Changing it here allows on
  236.       local people and 255's to [de]activate the birth date checking.
  237. ─────────────────────────────────────────────────────────────────────────────
  238. STEP 5: SAME bat─file, SAME bat─function, SAME bat─time :)  Add this:
  239.  
  240. ==              u.ar ^= (1 << ch1);
  241. ==              write_user(un,&u);
  242. ==            }
  243. ==          }
  244. ==          break;
  245. // SPV-029D START
  246. ++        case 'B':
  247. ++          u.cbv^=1;
  248. ++          write_user(un,&u);
  249. ++          break;
  250. // SPV-029D END
  251. ==        case 'C':
  252. ==          nl();
  253. ─────────────────────────────────────────────────────────────────────────────
  254. STEP 6: In NEWUSER.C replace the input_callsign(void) with this one:
  255.  
  256. // SPV-029D void input_callsign(void) REPLACEMENT START
  257. void input_callsign(void)
  258. {
  259.   int ok;
  260.  
  261.   do {
  262.     ok=0;
  263.     nl();
  264.     pl(get_string(525));
  265.     npr(":");
  266.     mpl(6);
  267.     input(thisuser.callsign,6);
  268.     nl();
  269.     if (strlen(thisuser.callsign)<3) {
  270.       ok=1;
  271.       pl("\007\0076You must enter a 3-6 letter 'backup' password!0");
  272.       nl();
  273.     }
  274.   } while ((!hangup) && ((ok) || (pw_check())));
  275. }
  276. // SPV-029D void input_callsign(void) REPLACEMENT END
  277. ─────────────────────────────────────────────────────────────────────────────
  278. STEP 7: Still in NEWUSER.C, function void newuser(void) remove this line:
  279.  
  280. ==            hang_it_up();
  281. ==            return;
  282. ==          }
  283. ==        }
  284. ==      }
  285. ==    }
  286. --    input_callsign();                           // remove me - SPV-029D.MOD
  287. ==    input_sex();
  288. ==    input_age(&thisuser);
  289. ==    input_comptype();
  290. ─────────────────────────────────────────────────────────────────────────────
  291. STEP 8: STILLLLL in NEWUSER.C, STILLL in void newuser(void) add this line:
  292.  
  293. ==    prt(5,get_string(572));
  294. ==    if (yn())
  295. ==      input_pw();
  296. ++    input_callsign();                                           // SPV-029D
  297. ==
  298. ==    if (sysinfo.flags & OP_FLAGS_SIMPLE_ASV) {
  299. ==      if ((sysinfo.asv.sl>syscfg.newusersl) &&
  300. ==          (sysinfo.asv.sl<100)) {
  301. ─────────────────────────────────────────────────────────────────────────────
  302. STEP 9: Will we ever get out of NEWUSER.C?
  303.         void newuser(void) :
  304.  
  305. ==        case '7': input_comptype(); break;
  306. ==        case '8': input_screensize(); break;
  307. // START SPV-029D CHANGES
  308. --        case '9': input_pw(); break;                          // REMOVE ME!
  309. ++        case '9':
  310. ++          do {
  311. ++            input_pw();
  312. ++          } while ((!hangup) && (pw_check()));
  313. ++          break;
  314. // END SPV-029D CHANGES
  315. ==        case 'A': input_street(); break;
  316. ==        case 'B': input_city(); break;
  317. ─────────────────────────────────────────────────────────────────────────────
  318. STEP 10: Add this function to the end of NEWUSER.C
  319.  
  320. // SPV-029D START
  321. int pw_check(void)
  322. {
  323.   if (stricmp(thisuser.pw,thisuser.callsign)==0) {
  324.     nl();
  325.     pl(
  326.   "\007\0076Your main password and backup password may not be the same!0");
  327.     nl();
  328.     return(1);
  329.   }
  330.   return(0);
  331. }
  332. // SPV─029D END
  333. ─────────────────────────────────────────────────────────────────────────────
  334. STEP 11: Now in DEFAULTS.C, void defaults(void)
  335.  
  336. ==      case '5':
  337. ==        config_qscan();
  338. ==        break;
  339. ==      case '6':
  340. // START SPV-029D CHANGES
  341. --        input_pw1();                                          // REMOVE ME!
  342. ++        do {
  343. ++          input_pw1();
  344. ++        } while ((!hangup) && (pw_check()));
  345. // END SPV-029D CHANGES
  346. ==        break;
  347. ==      case '7':
  348. ==        make_macros();
  349. ─────────────────────────────────────────────────────────────────────────────
  350. STEP 12: Prototype the new function in FCNS.H
  351.  
  352. == int check_dupes(char *phone);
  353. ++ int pw_check(void);                                            // SPV-029D
  354. ==
  355. == /* File: readmail.c */
  356. ==
  357. == int same_email(tmpmailrec *tm, mailrec *m);
  358. ─────────────────────────────────────────────────────────────────────────────
  359. STEP 13: Recompile
  360. ─────────────────────────────────────────────────────────────────────────────
  361. STEP 14: Open BBS.STR and change the following strings:
  362.  
  363.      #270 ─ "New backup password? "
  364.      #271 ─ "Delete backup password? "
  365.      #525 - [ZERO THIS STRING OUT!]
  366.      #526 ─ "Please enter your 'backup' password.  3─6 characters."
  367.      #575 ─ "3. Backup P/W    : "
  368.  
  369. NOTE:  Do not include the quotes.  Pay attention to spacing!
  370. ─────────────────────────────────────────────────────────────────────────────
  371. SIDE NOTE...  Steps 7 and 8 can be skipped...  All I did was make it so a new
  372. user was asked for their backup password after they entered the main
  373. password...  It seemed odd to have the BBS ask them for it after they entered
  374. their country and before their sex.
  375.  
  376.   That should be it!  If you have any problems, please E─Mail me.  Hell,
  377. E─Mail me anyway!
  378.  
  379.     This mod is copyright 1993,1994 by Tracy Baker, aka Papa Bear, and is
  380.  distributed as freeware.  Permission is granted to distribute and post this
  381.    mod on BBS systems and online services, provided no alterations are made
  382.   (removal of message headers/taglines allowed).  This mod may contain some
  383.   parts of WWIV source code, which is copyright 1988─1994 by Wayne Bell and
  384.     licensed only to registered users of WWIV.  Use of WWIV source without
  385.      registration constitutes a license violation and could lead to legal
  386.                         prosecution and certain doom.
  387.    Shareware distributors and CD─ROM publishers may not distribute this mod
  388.  without express written permission of the Author or WWIV Software Services.
  389.  
  390. 7-9=1*6>2Pâpâ ßêâr6<1*9=7-0
  391.  
  392. 8311579.wwivnet1· 2 ╪╫9≡8║7⌐¬4¥5╓╥╖1·     ·     2▒1 ·   2▒       3(510)522-35831    ·
  393. 732.sexnet  1∙   6 ·0░░▒▒▓▓6∞0▓▒░6·2 StarPort   ▒   ▒ 2 ▒1  ·2▒   ▒ ▒1 ·2 ▒   ▒1  ·2▒     ▒ 1·
  394. 6315061.wwivlink    0 ████1 ·     .       2  ▒ ▒  ▒ ▒  ▒1 · 2▒▒▒  ▒ ▒  ▒   ▒    ▒ ▒
  395. 535079.icenet 1.  .  0 │└6·0└6· 1     ∙         2 ▒  ▒   ▒ ▒▒▒ ▒ ▒ ▒1 ·2 ▒ ▒▒▒ ▒▒▒ ▒1 ∙ 2▒
  396. ---
  397. 1ATTENTION!  Elvis has left this subboard.
  398.