home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / WWIVMODS / MODS412.ZIP / PRELOG.MOD < prev    next >
Text File  |  1991-08-06  |  15KB  |  375 lines

  1. 249/254: WMNWLGN2.MOD  neat new ansi logon.. AWESOME!
  2. Name: Wmaster #36 @5852
  3. Date: Sun Jul 28 12:16:04 1991
  4. From: The Logic Board [518-356-5711] (Upstate New York)
  5. ────────────────────────────────────────────────────────────────────────────────
  6. -------    ---------     --------------        --------------       ---
  7.   --------    --------    ---  Mod #18 from the Winds Master   -----   ----
  8.  -----   -----  ----------     The Whirlwind of Information      ----- ---
  9. -----   -------    -------     8 pm Friday to 6 am Monday,   -----    ----
  10.   -------     ------------     (Weekends ONLY!) 765-3093.  ------    -----
  11.  ----     -------    ------                                   ---------
  12.    --------    -------------   I can be reached at 93 @5851 ---------   ---
  13. -----    --------    ----  -------    ---------      ---------     ------
  14.  
  15.  
  16. WMNWLGN2.MOD
  17.  
  18. NOTE:  This mod REQUIRES *MY* prelog.ans file.  You could easily just 
  19. extract the small WWIV Ansi screen in the middle of this file.  It would
  20. work just fine.  Just follow the rules for editing the PRELOG.ANS file
  21. at the end of this mod.
  22.  
  23.  
  24.   First, let me start by saying that this is NOT an original mod.  I got 
  25. the idea and basic ansi file from a mod called (KP02.ZIP).  Well, that 
  26. didn't really work right, and it was VERY sloppy.  I converted the ansi 
  27. a little to accomodate my needs.  And I copied a VERY small portion of his 
  28. mod for mine.  But I did copy some of it so..  give credit to him (sorry,
  29. I forget what his name/alias is).
  30.  
  31.   Ok, that was a very long opening, and I haven't even mentioned what the
  32. mod does.  (One note first, the mod is made for WWIV v4.12 but can be
  33. converted for use with lower versions..)  This mod actually does many 
  34. things.  The main thing that is the big deal, is the new logon thing.  If
  35. the user has ansi, it will pause at the end of the logon ansi, then 
  36. display the prelog.ans file.  It then uses ansi codes to move the cursor 
  37. around and change it's color.  So instead of 
  38.  
  39. NN: Winds Master
  40. PW: XXXXXXXX          
  41. PH: ###-###-XXXX
  42.  
  43. You get this:
  44.  
  45. ┌─────────────────────────────────────────────────────────────────────────────┐
  46. │The Whirlwind of Information BBS - 518-765-3093 - 9pm to 7am Wkdays, 24 Wkend│
  47. └─────────────────────────────────────────────────────────────────────────────┘
  48. ┌─────────────────────────────────────────┐┌──────────────────────────────┐
  49. │  Name:                                  ││ Type 'New' if  you are a new │
  50. └─────────────────────────────────────────┘│ user.  If you are  already a │
  51. ┌─────────────────────────────────────────┐│ member of this bbs, then you │
  52. │ Pass: [XXXXXXXX]  Phone: [518-765-3093] ││ malready know what to do.    │
  53. └─────────────────────────────────────────┘└──────────────────────────────┘
  54.  
  55. Note, all grey (or some might call it white) is intensified.  And before 
  56. the user enters his name, XXX-XXX-XXXX is displayed where the password is.  
  57. And when he enters his name, the first 8 characters are shown..
  58.  
  59. Another Note: You will notice that I moved the line saying "The Whirlwind
  60. of Information BBS etc." to the top.  This is because instead of using
  61. actual cursor positioning codes, I used cursor movement codes.  This is
  62. because some (actually, most) had trouble getting it all to line up 
  63. correctly.  This will be much easier.. and this also enables you to put
  64. whatever you want at the top, and at any length..
  65.  
  66. This mod also has someone's illegal logon, PW and PH notification 
  67.  (you can easily take that out)
  68. NOTE: I had to change the illegal logon notification so that it ONLY 
  69. writes the pw and ph to the Sysop Log, and not send it to the sysop 
  70. and user via ssm, cause the original illegal logon mod changed both ssm() 
  71. and rsm(). But, if you have the illegal logon notification then it would 
  72. be easy to re-install (just a few lines).
  73.  
  74.  
  75. Change from v1: I only auto-senses ansi if there is a user logging in
  76. remotely.  This removes the delay when logging in locally.  It also prints
  77. out Auto Sensing ANSI... before the check_ansi() function.. just looks
  78. different.
  79.  
  80.  
  81. It prints out a small warning message that they might be logged
  82. and/or watched (easy to take out.. but it looks neat :)
  83.  
  84. This mod also changes the maximum number of tries a user get's to log on,
  85. instead of 3 tries he get's 4..
  86.  
  87. I think that is all this mod does..  but there might be more (don't even 
  88. know what my own mod does :\
  89.  
  90. Ok, here is the mod (finally :)
  91.  
  92.  
  93.  
  94. Load up BBSUTL.C and erase getuser(),
  95.  
  96. replace it with this getuser()
  97.  
  98.  
  99.  
  100. void getuser()
  101. {
  102.   char s[81],s2[81], stl[13];  
  103.   char pwused[9], phoneused[5]; 
  104.   int ok,count,net_only,ans;
  105.   long l;
  106.  
  107.   thisuser.sysstatus &= (~sysstatus_ansi);
  108.   net_only=1;
  109.   if (syscfg.netlowtime!= syscfg.nethightime) {
  110.     if (syscfg.nethightime>syscfg.netlowtime) {
  111.       if ((timer()<=(syscfg.netlowtime*60.0)) || 
  112. (timer()>=(syscfg.nethightime*60.0)))
  113.         net_only=0;
  114.     } else {
  115.       if ((timer()<=(syscfg.netlowtime*60.0)) && 
  116. (timer()>=(syscfg.nethightime*60.0)))
  117.         net_only=0;
  118.     }
  119.   } else
  120.     net_only=0;
  121.   count=0;
  122.   ok=0;
  123.   checkit=1;
  124.   okmacro=0;
  125.   if (!net_only) {
  126.     sprintf(s,"%swelcome.ans",syscfg.gfilesdir);
  127.     if (exist(s)) {
  128.       nl();
  129. #ifdef OLD
  130.       outstr("Can you support ANSI graphics? ");
  131.       thisuser.sysstatus=0;
  132.       ans=yn();
  133. #else
  134.       if (incom)                                  
  135.       {                                           
  136.         outstr("Auto-Sensing ANSI...");           
  137.         ans=check_ansi();
  138.       }                                           
  139. #endif
  140.       if (!incom)                                 
  141.       {                                           
  142.          nl();                                    
  143.          outstr("Use ANSI in logon? ");           
  144.          ans=yn();                                
  145.       } else                                      
  146.         if (ans)                                  
  147.           pl("\x1B[0;1;37;40mAnsi sensed.");      
  148.         else                                      
  149.           pl("Ansi NOT sensed. :(");              
  150.       nl();                                       
  151.       if (ans)                                    
  152.       {                                           
  153.         thisuser.sysstatus |= sysstatus_ansi;     
  154.         sprintf(s, "\x1B[5;1;31;40mWARNING!!\x1B[0;1;37m This call may be 
  155. logged and/or monitored.");
  156.         pl(s);                                    
  157.         if (incom) delay(1000);                   
  158.         printfile("welcome.ans");                 
  159.       }                                           
  160.       else
  161.       {                                                 
  162.         pl("WARNING!! This call may be logged and/or monitored.");
  163.         if (incom) delay(1000);                   
  164.         printfile("welcome.msg");                       
  165.       }                                           
  166.     } else {
  167.       pl("WARNING!! This call may be logged and/or monitored.");
  168.       if (incom) delay(1000);                     
  169.       printfile("welcome.msg");                   
  170.     }                                             
  171.   }
  172.   ansic(0);
  173.   do {
  174.     nl();
  175.     if (net_only) {
  176.       pl("This time is reserved for net-mail ONLY.");
  177.       pl("Please try calling back again later.");
  178.     }
  179.     if (!ans)
  180.     {
  181.       pl("Enter your alias, number or NEW.");
  182.       outstr("NN: "); /* DON'T change the NN: prompt. */
  183.       input(s,30);
  184.       usernum=finduser(s);
  185.       if ((net_only) && (usernum!=-2))
  186.         usernum=0;
  187.       if (usernum>0)
  188.       {
  189.         read_user(usernum,&thisuser);
  190.         realsl=thisuser.sl;
  191.         topscreen();
  192.         ok=1;
  193.         outstr("PW: ");
  194.         echo=0;
  195.         input(s,8);
  196.         if ((strcmp(s,thisuser.pw)!=0) && incom)  
  197.           {
  198.             ok=0;
  199.             strcpy(pwused, s);  
  200.                   }
  201.         if ((syscfg.sysconfig & sysconfig_free_phone)==0)
  202.         {
  203.           strcpy(stl, "PH: ");               
  204.           strncat(stl, thisuser.phone, 8);   
  205.           outstr(stl);                       
  206.           input(s,4);
  207.           if ((strcmp(s,&thisuser.phone[8])!=0) && incom)  
  208.           {
  209.             ok=0;
  210.             strcpy(phoneused, s);       
  211.             if ((strlen(s)==4) && (s[3]=='-'))
  212.             {
  213.               nl();
  214.               pl("!! Enter the LAST 4 DIGITS of your phone number ONLY !!");
  215.               nl();
  216.             }
  217.           }
  218.         }
  219.         if ((thisuser.sl==255) && (incom) && (ok)) 
  220.         {
  221.           outstr("SY: ");
  222.           echo=0;
  223.           input(s,20);
  224.           if (strcmp(s,syscfg.systempw)!=0)
  225.             ok=0;
  226.         }
  227.       }
  228.     } else {  /* if user has ansi */                                   
  229.       pausescr();                                                      
  230.       nl();                                                            
  231.       outstr("NN:");                            /* make sure net works */
  232.       outstr("\x1B[2J");                                                  
  233.       printfile("prelog.ans");                                         
  234.       outstr("\x1B[6A\x1B[9C\x1B[0;1;37;44m");                                 
  235.   
  236.       input(s, 30);                                                    
  237.       outstr("\x1B[0;37;40m");                                         
  238.       usernum=finduser(s);                                             
  239.       if ((net_only) && (usernum!=-2))                                 
  240.         usernum=0;                                                     
  241.       if (usernum>0)                                                   
  242.       {                                                                
  243.         read_user(usernum,&thisuser);                                  
  244.         realsl=thisuser.sl;                                            
  245.         ok=1;                                                          
  246.         outstr("\x1B[2B\x1B[9C\x1B[0;1;37;40m");                                       
  247.         echo=0;                                                        
  248.         input(s, 8);                                                   
  249.         if ((strcmp(s,thisuser.pw)!=0) && incom)                       
  250.         {                                                              
  251.           ok=0;                                                        
  252.           strcpy(pwused,s);                                            
  253.         }                                                              
  254.         outstr("\x1B[1A\x1B[29C");                                           
  255.         strncpy(stl,thisuser.phone,8);                                 
  256.         stl[8]=0;                                                      
  257.         outstr(stl);                                                   
  258.         input(s,4);                                                    
  259.         if ((strcmp(s,&thisuser.phone[8])!=0) && incom)                
  260.         {                                                              
  261.           ok=0;                                                        
  262.           strcpy(phoneused,s);                                         
  263.         }                                                              
  264.         if ((thisuser.sl==255) && (incom) && (ok))                     
  265.         {                                                              
  266.           outstr("\x1B[10B\nSY: ");                                       
  267.           echo=0;                                                      
  268.           input(s,20);                                                 
  269.           if (strcmp(s,syscfg.systempw)!=0)                            
  270.             ok=0;                                                      
  271.         }                                                              
  272.         outstr("\x1B[4B\n");                                           
  273.       } else                                                           
  274.         outstr("\x1B[4B\n");                                            
  275.     }                                                                  
  276.       echo=1;                                                          
  277.     if (usernum>0)                                                      
  278.     {                                                                  
  279.       if (ok) {
  280.         changedsl();
  281.       } else {
  282.         ++thisuser.illegal;
  283.         write_user(usernum,&thisuser);
  284.         close_user();
  285.         nl();
  286.         pl("\7ILLEGAL LOGON\7");
  287.         printf("usernum=%d",usernum);                                  
  288.         delay(1000);                                                   
  289.         nl();
  290.         strcpy(s,"### ILLEGAL LOGON for ");
  291.         strcat(s,nam(&thisuser,usernum));
  292.         strcat(s, "   PW: ");  
  293.         strcat(s, pwused);     
  294.         strcat(s, "   PH: ");  
  295.         strcat(s, phoneused);  
  296.         strcat(s, "\r\n");     
  297.         sl1(0,s);
  298.         ssm(usernum, 1, s);    
  299.         if (usernum!=1) ssm(1, 1, s); 
  300.         usernum=0;
  301.       }
  302.     } else                                                             
  303.       if (usernum==-1) 
  304.       {
  305.         newuser();
  306.         ok=1;
  307.       } else
  308.         if (usernum==0) 
  309.         {
  310.             if (net_only)
  311.               nl();
  312.             else
  313.             pl("Unknown User.");
  314.         } else
  315.           if ((usernum==-2) || (usernum==-3)) 
  316.           {
  317.               if (incom) 
  318.               {
  319.               time(&l);
  320.               if (usernum==-2)
  321.                 sprintf(s,"NETWORK /B%u /T%ld",modem_speed,l);
  322.               else
  323.                 sprintf(s,"REMOTE /B%u",modem_speed);
  324.               save_status();
  325.               run_external1(s);
  326.               get_status();
  327.               hangup=1;
  328.               dtr(0);
  329.               global_xx=0;
  330.               wait(1.0);
  331.               dtr(1);
  332.               wait(0.1);
  333.                 cleanup_net();
  334.                 imodem();
  335.               }
  336.               hangup=1;
  337.           }
  338.   } while ((!hangup) && (!ok) && (++count<4));
  339.   if (count==4)
  340.     hangup=1;
  341.   checkit=0;
  342.   okmacro=1;
  343.   if ((!hangup) && (usernum>0) && (thisuser.restrict & restrict_logon) &&
  344.     (strcmp(date(),thisuser.laston)==0) && (thisuser.ontoday>0)) {
  345.     nl();
  346.     plc(9, "Sorry, you can only logon once per day.");          
  347.     nl();
  348.     hangup=1;
  349.   }
  350. }
  351.  
  352.  
  353.  
  354.  
  355.  
  356.                          Rules for editting PRELOG.ANS
  357.  
  358. 1. Don't change around the locations of the info from the 4th line down.
  359.    Everything above that line can be either taken out, changed, or added
  360.    to.
  361.  
  362. 2. If using The Draw, mark a block from the top of the screen, to the last
  363.    line of the file (which should be a solid line).  The save that block.
  364.    Saving with extra lines at the bottom of the file would cause 
  365.    mis-alignment (sp?)
  366.  
  367. 3. E-Mail me any significant changes that you make that could help me in
  368.    future versions.
  369.  
  370. l8r                                     Winds Master
  371.  
  372.  
  373.  
  374.  
  375.