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

  1. Bruce Guthrie #28 @2900
  2. Fri Apr 27 20:37:42 1990
  3. +-----------------------------------------------------------------------------+
  4.  
  5.                         * User Name in Sub Title Scan *
  6.                             BRUCE01.MOD   Version 2
  7.  
  8.                               by Bruce Guthrie #28
  9.                       Maxie's Toy BBS - @2900 - Modesto, CA
  10.  
  11. +-----------------------------------------------------------------------------+
  12.  
  13.         You know how the "email waiting" list normally just shows the names
  14. that the email is from? Well, a mod came across the net recently, by Jeff
  15. Garzik, that added the title of the email to that display:
  16.  
  17. You have mail from:
  18.  
  19. 1. Billy Richards #81                   "Sure thing, so you are going to be th"
  20. 2. Sharon Frey #162                     "Ha!"
  21. 3. Philip Latenser #210                 "Docs..."
  22. 4. User 1 @4550                         "net"
  23.  
  24.  
  25.         I then changed that mod a bit, mostly so it would work with the color
  26. title mod, and then moved it to the sub title scan. Previously, when scanning
  27. the messages in a sub, it would only show the titles. Now it also shows the
  28. name of the person who wrote the message:
  29.  
  30.   (122)  User 9 @3300                   "I have watched this conversation on p"
  31.   (123)  Raij #129                      "They do.."
  32.   (124)  User 46 @2901                  "So"
  33. * (125)  User 99 @3300                  "Hazel"
  34. * (126)  User 66 @3300                  "Here's an interesting thought......"
  35. * (127)  Hazel #93                      "As I've said"
  36.  
  37.  
  38.         Pretty simple mod. All in MSGBASE1.C, in "void scan".
  39.  
  40.  
  41. Step One: (Add two variables)
  42.  
  43. = void scan(int msgnum, int optype, int *nextsub)
  44. = {
  45. =   char s[81],s1[81],s2[81],*b,*ss1;
  46. =   int i,i1,i2,done,quit,abort,next,val,realexpress;
  47. =   slrec ss;
  48. +   userrec u;            /* Add this */
  49. +   unsigned short usr;   /* Add this */
  50. =   long l,len;
  51. =   postrec p,p1;
  52.  
  53.  
  54. Step Two: (Replace the entire case)
  55.  
  56. +       case 1: /* List Titles */
  57. +         i=0;
  58. +         abort=0;
  59. +         if (msgnum>=nummsgs)
  60. +           abort=1;
  61. +         ansic(0);
  62. +         ss=syscfg.sl[thisuser.sl];
  63. +         while ((!abort) && (!hangup) && (++i<=10)) {
  64. +           ++msgnum;
  65. +           if (msgs[msgnum].qscan>thisuser.qscnptr[curlsub])
  66. +             strcpy(s,"* ");
  67. +           else
  68. +             strcpy(s,"  ");
  69. +           if (msgnum<100)
  70. +             strcat(s," ");
  71. +           if (msgnum<10)
  72. +             strcat(s," ");
  73. +           itoa(msgnum,s2,10);
  74. +           usr=msgs[msgnum].owneruser;
  75. +           if ((msgs[msgnum].ownersys==0) && (usr==usernum))
  76. +             sprintf(s1,"%s[%s]  ",s,s2);
  77. +           else
  78. +             sprintf(s1,"%s(%s)  ",s,s2);
  79. +           outstr(s1);
  80. +           if ((msgs[msgnum].anony & anony_sender) && ((ss.ability & ability_read_post_anony)==0))
  81. +             sprintf(s,">UNKNOWN<");
  82. +           else
  83. +             if (msgs[msgnum].ownersys==0) {
  84. +               read_user(usr,&u);
  85. +               sprintf(s,"%s",nam(&u,usr));
  86. +             } else
  87. +               sprintf(s,"User %u @%u",usr,msgs[msgnum].ownersys);
  88. +           outstr(s);
  89. +           i1=41-strlen(s)-strlen(s1);
  90. +           for (i2=1; i2<i1; i2++)
  91. +             outstr(" ");
  92. *           sprintf(s,"\3%c\"%s\3%c\"",'0',msgs[msgnum].title,'0');
  93. *           if (strlen(s)>42) {
  94. *             if (s[39]==3)
  95. *               s[39]=32;
  96. *             s[40]=3;
  97. *             s[41]=48;
  98. *             s[42]=34;
  99. *             s[43]=0;
  100. *           }
  101. +           pla(s,&abort);
  102. +           if (msgnum>=nummsgs)
  103. +             abort=1;
  104. +         }
  105. +         optype=0;
  106. +         break;
  107.  
  108.  
  109. Note: The lines marked with "*" only apply if you're using the Color Title
  110.       mod. If you aren't, use the following lines instead:
  111.  
  112. *           sprintf(s,"\"%s\"",msgs[msgnum].title);
  113. *           if (strlen(s)>39) {
  114. *             s[39]=34;
  115. *             s[40]=0;
  116. *           }
  117.  
  118.  
  119. +-----------------------------------------------------------------------------+
  120.  
  121. 2=3*2=3  Maxie's Toy  2=3*2=3  Modesto, CA  2=3*2=0