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

  1. Parker Prospect #1 @9964
  2. Sat Mar 17 10:07:09 1990
  3. Add titles to read mail! This is sort of an out-of-the-way mod, but you may
  4. like is. I saw this done on  Social Graces (@9954), but I couldn't find the
  5. mod anywhere.  So guess what?  I wrote it myself.
  6.  
  7. This mod  will print UP  TO 40 characters  of the title  (Yes, it does take
  8. into  account colored  titles--to a  degree) when  the user  reads his mail
  9. (both at the 'M'  prompt and when he first logs on).  It lists the username
  10. that the mail is from (just like  it always does), then it spaces to column
  11. 41 (I have a soft spot in my heart for C64/128 users), where it prints most
  12. of the title.  Happy modding!
  13.  
  14. Example:
  15.  
  16. Hit return or enter number.
  17. :
  18. You have mail from:
  19.  
  20. GARATH #12                              "Validation"
  21. 1 @9972                                 "Jeff, my BBS crashed again"
  22. 21 @9971                                "Access to your net RPG"
  23.  
  24. ************************************
  25. ************** Legend **************
  26. ************************************
  27. * %% Delete Line                   *
  28. * -- Search for Line, DON'T CHANGE *
  29. * ++ Add Line                      *
  30. * -+ Modify Line                   *
  31. ************************************
  32.  
  33.  
  34. ------------------------------------------------------------------------
  35. Step #1
  36.  
  37. Look for "void readmail" in the file MSGBASE1.C.  Change the following
  38. code using the legend shown above.
  39.  
  40. --  char s[81],s1[81],s2[81],fn[81],*b;
  41. --  mailrec m;
  42. --  slrec ss;
  43. --  userrec u;
  44. --  char ch;
  45. --  long len;
  46. ++  char work[81];
  47. ++  size_t namelen;
  48. ++  int counter;
  49.  
  50. --  ss=syscfg.sl[thisuser.sl];
  51. --  strcpy(fn,&(syscfg.datadir[0]));
  52. --  strcat(fn,"EMAIL.DAT");
  53. --  f=open(fn,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
  54. --  if (f<0) {
  55.  
  56. ------------------------------------------------------------------------
  57. Step #2
  58.  
  59. Scan down a little farther until you find this code (also in "void
  60. readmail").  Again, change according the the legend above...
  61.  
  62. --        } else {
  63. --    sprintf(s1,"User %d @%d",m.fromuser,m.fromsys);
  64. --          strcat(s,s1);
  65. --        }
  66. --      }
  67. ++      prt(0, s);
  68. ++      work[0]=0;
  69. ++      namelen=strlen(s);
  70. ++      s[0]=0;
  71. ++      for (counter=namelen; counter<42; counter++)
  72. ++        strcat(work, " ");
  73. ++      prt(0, work);
  74. ++      strcpy(work, m.title);
  75. ++      work[36]=0;
  76. ++      if (work[35]==3) {
  77. ++        work[36]=48;
  78. ++        work[37]=0;
  79. ++      }
  80. ++      s[0]=34;
  81. ++      s[1]=0;
  82. ++      strcat(s, work);
  83. ++      namelen=strlen(s);
  84. ++      s[namelen]=34;
  85. ++      s[namelen+1]=0;
  86. --      pl(s);
  87. --    }
  88. --    nl();
  89. --    helpl=10;
  90. --    pl("Hit return, or enter number");
  91. --    outstr(":");
  92.  
  93. ------------------------------------------------------------------------
  94. Step #3
  95.  
  96. [Told ya it was a short mod] - Compile and run!
  97.  
  98. ------------------------------------------------------------------------
  99. Disclaimer
  100.  
  101. I, Jeff Garzik, claim no liability for this mod, or for any damage that
  102. may have resulted from the use of this mod.  I also attach no
  103. warranty, expressed OR implied, to this product.
  104.  
  105. BTW, if you like  this mod, 6PLEASE0 send me a donation  of $5 or more. I
  106. am  trying to  save up  for a  USR 9600  HST, and  being a 15-year-old high
  107. school sophomore, I need all the support I can get.
  108.  
  109. Send donations to:
  110.  
  111.   Jeff Garzik
  112.   117 Harrell St
  113.   Greenville, NC 27858
  114.  
  115. or call my board
  116.  
  117.   The East Carolina Connection
  118.   919-756-2939 :::: 1200 baud (temporary)
  119.   24hrs
  120.   Autovalidation of WWIV sysops (first call)
  121.  
  122. Thanks Wayne for writing such great software!