home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / WWIVMODS / MODSUNKN.ZIP / BYPASS.MOD < prev    next >
Text File  |  1990-03-20  |  3KB  |  91 lines

  1. Nowhere Fast #25 @7305
  2. Fri Mar 16 18:24:42 1990
  3. ----------------------------------------------------------------------------
  4. Bypass mod 2.0 by Nowhere Fast
  5. 1@7310, Eldritch Boulevard BBS, 703-931-0431
  6.  
  7. The following mod forces a user to read the logon message if he has not
  8. seen it before, but skips it if he has.
  9.  
  10. When I wrote up the 1.0 version of this mod, I did not realize that WWIV
  11. stores the time as well as the date (in the daten field of userrec).  This
  12. update uses that field to compare date/time instead of date only.
  13. ----------------------------------------------------------------------------
  14.  
  15. Load up your Turbo C compiler and the file BBSUTL.C.
  16.  
  17. STEP ONE
  18. At the top of the file, about 20 lines down, you will see the line:
  19.  
  20. #include <alloc.h>
  21.  
  22. After this line, add the line:
  23.  
  24. #include <dos.h>
  25.  
  26. ----------------------------------------------------------------------------
  27.  
  28. STEP TWO
  29. Search for the function "void logon()".
  30.  
  31. After the line
  32.   long len,pos;
  33. insert the lines
  34. /* BYPASS mod variables */
  35.   int fn;
  36.   struct ftime logonmsg;
  37.   struct time ltime;
  38.   struct date ldate;
  39. /* BYPASS mod variables */
  40.  
  41. ----------------------------------------------------------------------------
  42.  
  43. STEP THREE
  44. Now scan down about 20 lines or so until you find the line that
  45. looks like this:
  46.     if (incom && live_user) {
  47.  
  48. and replace the next 5 lines with the following:
  49.  
  50. /* BYPASS mod start */
  51.       if (thisuser.sl!=255) {
  52.         sprintf(s,"%s%s\0",syscfg.gfilesdir,"LOGON.ANS");
  53.         sprintf(s1,"%s%s\0",syscfg.gfilesdir,"LOGON.MSG");
  54.         if ((thisuser.sysstatus & sysstatus_ansi) && (exist(s)))
  55.           fn = open(s,O_RDONLY);
  56.           else fn = open(s1,O_RDONLY);
  57.         if (fn!=-1) {
  58.           getftime(fn,&logonmsg);
  59.           close(fn);
  60.           ltime.ti_hund = 0;
  61.           ltime.ti_min  = logonmsg.ft_min;
  62.           ltime.ti_hour = logonmsg.ft_hour;
  63.           ltime.ti_sec  = logonmsg.ft_tsec * 2;
  64.           ldate.da_year = logonmsg.ft_year + 1980;
  65.           ldate.da_day  = logonmsg.ft_day;
  66.           ldate.da_mon  = logonmsg.ft_month;
  67.  
  68. /*        printf("File date = %u  Last date = %u\n",
  69.                  dostounix(&ldate,<ime), thisuser.daten);
  70.           pausescr();*/
  71.           if (dostounix(&ldate,<ime) > thisuser.daten)
  72.             do {
  73.               i=printfile("LOGON");
  74.             } while(i);
  75.         else pl("System News not updated since your last call.");
  76.       }
  77.     }
  78. /* BYPASS mod end */
  79.  
  80. ----------------------------------------------------------------------------
  81.  
  82. Now save the new BBSUTL.C file (F2) and compile it using the F9 key.
  83. The compiler will compile the new updated BBSUTL.C file and then link
  84. it with the other *.OBJ files to give you a new BBS.EXE file.
  85.  
  86. License granted to freely distribute without compensation and to
  87. modify as needed "to get the job done."  Use at your own risk.
  88. Distributed "as is".  No warranty or guarantee.
  89.  
  90. Any problems call Eldritch Boulevard BBS at 703-931-0431.
  91. Nowhere Fast #1, a.k.a.Hollie Satterfield