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

  1. Ed O'Brien #1 @7701
  2. Fri Apr 20 14:28:59 1990
  3. /*
  4.  
  5.      Hello again....
  6.  
  7.    Last night I watched a newuser repeatedly hit "#" to go to a sub.
  8.  My wife then sez: "Why don't you make that key do something?"
  9.  So I did. Now when the user hits # it will prompt him/her for the sub
  10.  or dir number they wanna go to, or list them, etc.
  11.  
  12.    It's easy to add and it doesn't take long to do.
  13.  
  14. */
  15.  
  16.  
  17.  
  18. /*
  19. First, go to BBS.C in void mainmenu and do this:
  20. */
  21.  
  22.  
  23. void mainmenu()
  24. {
  25.   char *s,*num,s1[100],s2[81];     /* <- add the *num  */
  26.   int i,done1;                     /*  add the done1   */
  27.  
  28. /*
  29. Now go down further and add this case  above case 'A':
  30. */
  31.  
  32.       case '#':
  33.         do {
  34.           done1=0;
  35.           nl();
  36.           prt(2,"Go to which sub number? (?=List): ");
  37.           num=mmkey(0);
  38.           if (strcmp(num,"?")==0)
  39.             sublist();
  40.           for (i=0; i<32; i++)
  41.             if (strcmp(usub[i].keys,num)==0) {
  42.               cursub=i;
  43.               done1=1;
  44.             }
  45.         } while ((!hangup) && (!done1));
  46.         break;                            /* added to original mod */
  47.  
  48. /*
  49. Now go down even farther to dlmainmenu() and do this:
  50. */
  51.  
  52. void dlmainmenu()
  53. {
  54.   char *s,*num,s1[81],s2[81];     /* Again, add the *num  */
  55.   int i,i1,abort,done1;           /* Again, add the done1 */
  56.  
  57. /*
  58. Now go down and add this case before case 'A':
  59. */
  60.  
  61.  
  62.       case '#':
  63.         do {
  64.           done1=0;
  65.           nl();
  66.           nl();
  67.           prt(2,"Go to which directory number? (?=List): ");
  68.           num=mmkey(1);
  69.           if (strcmp(num,"?")==0)
  70.             dirlist();
  71.           for (i=0; i<64; i++)
  72.             if (strcmp(udir[i].keys,num)==0) {
  73.               curdir=i;
  74.               done1=1;
  75.             }
  76.         } while ((!hangup) && (!done1));
  77.         break;
  78.  
  79.  
  80. /*
  81. There. Now hit F9 and compile. This won't take long.
  82.  
  83.              << DISCLAIMER >>
  84. If it doesn't work, it's your fault, not mine.
  85.  
  86.                   There.
  87.  
  88.                        7Captain Learjet0
  89.                             113@787550
  90. */
  91.  
  92. This mod was corrected by:
  93.  
  94.                         Ed O'Brien
  95.                          1@7701