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

  1. Pc Guru #1 @3450
  2. Sun Apr 08 05:36:20 1990
  3.             Filter out a Sub
  4.  
  5.  This mod was written to make it easy for the user to QSCAN out a sub.  As
  6. WWIV is written now, the user must quit the new message scan, go to the
  7. defaults section, qscan out the sub, and then start the newscan again.
  8. With this mod, the user can hit 'F' (or, another key of your choosing),
  9. and the current sub will be qscaned out, and advanced one sub.
  10.  
  11.                         PC Guru 1@3450
  12.                     Sysop of The B.S. Box BBS
  13.                         (314) 434-3470
  14.                          USR HST 14.4k
  15.  
  16. ----------------------------------------------------------------------------
  17.  
  18.  
  19. In 'MSGBASE1.C'    search for 'void scan(int msgnum,.....'
  20.  
  21.  
  22.  
  23. void scan(int msgnum, int optype, int *nextsub)
  24. {
  25.   char s[81],s1[81],s2[81],s3[81],s4[81],s5[81],s6[81],*b,*ss1,*f;  /*Add f */
  26.   int i,i1,i2,done,quit,abort,next,val,realexpress;
  27.   int tst,hold,hold1,numrply,hold2;
  28.  
  29.     .
  30.     .
  31.     .    /* Search for case 'B', and add the following after it */
  32.     .
  33.     case 'B':                        /* Search */
  34.        .
  35.        .
  36.        break;
  37.  
  38.  
  39.        /* NOTE - This install this if you have 64 subs  */
  40.        /*        If you only have 32 subs, use the next */
  41.        /*        section of code              */
  42.  
  43.     case 'F':                     /* BEGIN MOD */
  44.           f=usub[cursub].keys;
  45.           for (i=0; i<64; i++)                             /* MOD */
  46.         {                           /* MOD */
  47.         if (strcmp(usub[i].keys,f)==0)                 /* MOD */
  48.            if (usub[i].subnum<32)                      /* MOD */
  49.              thisuser.qscn ^=((1L) << (usub[i].subnum));      /* MOD */
  50.            else                                               /* MOD */
  51.              thisuser.qscn2 ^=((1L) << (usub[i].subnum-32));  /* MOD */
  52.          }                                  /* MOD */
  53.          if (*nextsub!=0)                        /* MOD */
  54.           {                                            /* MOD */
  55.           *nextsub=1;                                  /* MOD */
  56.           done=1;                                      /* MOD */
  57.           quit=1;                                      /* MOD */
  58.           }                                            /* MOD */
  59.         break;                                     /* END MOD */
  60.  
  61.  
  62.  
  63.  
  64.  
  65.        /* NOTE - This install this if you have 32 subs  */
  66.        /*        If you have 64 subs, use the previous  */
  67.        /*        section of code                 */
  68.  
  69.       case 'F':                        /* BEGIN MOD */
  70.         f=usub[cursub].keys;
  71.         for (i=0; i<32; i++) {
  72.           if (strcmp(usub[i].keys,f)==0)
  73.         thisuser.qscn ^=((1L) << (usub[i].subnum));
  74.         }
  75.         if (*nextsub!=0) {
  76.               *nextsub=1;
  77.               done=1;
  78.               quit=1;
  79.               }
  80.         break;                        /* End MOD */
  81.  
  82.  
  83.  
  84. ____________________________________________________________________________
  85.  
  86. A few more lines should probably be added to this code.  A good 2 line addition
  87. would to be prompt the user before it actually qscans the sub out.  A simple
  88. prt and if(yn()) call would to it.  If you can't figure out how to do that on
  89. your own, email me and I'll write up a more complete version.
  90.  
  91.                                 PC Guru 1@3450
  92.  
  93.