home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / WWIVMODS / MODS420.ZIP / PUNY02.MOD < prev    next >
Text File  |  1992-01-21  |  5KB  |  172 lines

  1. PUNY02.MOD - Creation of a dynamic pause string
  2.  
  3. By:    Punisher 1@2402 [Bunch 'o Bull]
  4. Date:  December 9th, 1991
  5. Time:  It takes about ten minutes to install and compile.
  6. WWIV:  WWIV 4.20
  7. Files: VARDEC.H, bbsutl1.c, bbs.c
  8.  
  9. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  10.  
  11. This is a very handy modifcation. It adds a lot to a BBS to customize the text
  12. display.  As set up by Wayne Bell, WWIV uses [PAUSE] to ask for a keypress.  To
  13. me, this seemed a little boring, so I changed it to something a little more
  14. interesting.  ([cows])  I decided it would be worth it to make a modification
  15. so that I could change the pause string whenever I wanted.
  16.  
  17. Basically what it does is this - it creates another field in the dynamic system
  18. record that is saved and updated every time a user logs off.  The pause string
  19. is changed by pressing '%' at the WFC or by using the '//PAUSEEDIT' command at
  20. the main menu.  Anybody with sysop access can change the pause string.
  21.  
  22. (That's how I have it set up on _my_ system.. you can, of course, change it to
  23. whatever your system might require.)
  24.  
  25. On my system I have a modification called "BACKSPAC.412" (by Goose) installed
  26. that affects the inli function.  The reason I mention this is because my system
  27. allows color in the inli function using Ctrl-P and I'm not sure whether the
  28. standard inli allows this.  THE POINT IS THIS:  If you install this 
  29. modification
  30. only to discover that you can't use color when making your pause prompt, you
  31. can do one of two things to remedy the problem:  A) You can place some ansic
  32. statements in the void pausescr function I provide or B) you can get the mod
  33. by Goose and install it.  It's good.
  34.  
  35. One more quick thing - if you have users in 40 column mode you should be 
  36. careful
  37. not to make your pause string over 40 actual characters in length.  If you make
  38. it more than 40 you'll have a lot of unhappy Commodore users..
  39.  
  40.  
  41. Here's the modification:
  42.  
  43. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  44.  
  45. STEP 1:
  46.  
  47. Back up your source.  Do it.  I lost my whole source once because I didn't back
  48. it up.  It was a pain.  Back up your source.
  49.  
  50.  
  51. STEP 2:
  52.  
  53. Load up VARDEC.H.  Here's a listing of my code;  a line beginning with '%'
  54. already exists.. a line beginning with '+' you should add into the code.
  55.  
  56.  
  57.  
  58. %  #define QSCN(i) (thisuser.qscnptr[i])
  59. %  #endif
  60. %
  61. +  #define MAXLEN_PAUSE 60   /* Add this line for PUNY02.MOD */
  62. %
  63. %  
  64. /****************************************************************************/
  65. %
  66. %
  67. %  /* DATA FOR EVERY USER */
  68.  
  69.  
  70. Now search for "net_req_free".  Here's a listing of my code with the same key:
  71.  
  72.  
  73. %          long            last_connect,           /* date last connect.net */
  74. %                          last_bbslist;           /* date last bbslist.net */
  75. %          float           net_req_free;           /* net free factor def 3 */
  76. %          char            res[31];                /* RESERVED */
  77. +          char          pausestring[MAXLEN_PAUSE];/* Added for dynamic pause 
  78. */
  79. %
  80. %  } statusrec;
  81.  
  82.  
  83. That's all you have to do in VARDEC.H - save the file now.
  84.  
  85.  
  86. STEP 3:
  87.  
  88. Load up BBSUTL1.C.  Go to the very end of the file and block read in this
  89. function:
  90.  
  91.  
  92. void change_pausestring()
  93. /* This function added for PUNY02.MOD - the dynamic pause string. */
  94. {
  95.   char def[MAXLEN_PAUSE];
  96.  
  97.   strcpy(def,status.pausestring);
  98.   ansic(0);
  99.   npr("Current pause string - %s\r\n", status.pausestring);
  100.   npr("Enter the new pause string.. maximum %d characters:\r\n", MAXLEN_PAUSE);
  101.   npr("Remember that each time you change color it counts as two characters.");
  102.   npr("\r\n\r\n");
  103.   inli(status.pausestring, def, MAXLEN_PAUSE, 1);
  104.   nl();
  105.   npr("The new pausestring:  \r\n\r\n");
  106.   pausescr();
  107. }
  108.  
  109.  
  110.  
  111. Save BBSUTL1.C.
  112.  
  113.  
  114. STEP 4:
  115.  
  116. Load BBS.C.  Search for ""BOARDEDIT"".  Here's a listing of my code with the
  117. same key:
  118.  
  119.  
  120. %    if (so()) {
  121. %      if (strcmp(s,"BOARDEDIT")==0) {
  122. %        sysoplog("@ Ran Boardedit");
  123. %        boardedit();
  124. %      }
  125. +      if (strcmp(s,"PAUSEEDIT")==0) {  /* This code added with PUNY02.MOD */
  126. +        change_pausestring();
  127. +        sprintf(s,"@ Changed pause to [%s].", status.pausestring);
  128. +        sysoplog(s);
  129. +        strcpy(s,"PAUSEEDIT");
  130. +      }
  131. %      if (strcmp(s,"DIREDIT")==0) {
  132.  
  133.  
  134. Now search for "Log on?".  This will take you to the WFC case list.  Here's a
  135. list of my code (this case could be added anywhere in the case list):
  136.  
  137.  
  138. %            }
  139. %            break;
  140. +          case '%': /* or any other unused character */
  141. +            change_pausestring();  /* This code added with PUNY02.MOD */
  142. +            break;
  143. %          case ' ':
  144. %            outs("Log on? ");
  145. %            d=timer();
  146.  
  147.  
  148. That's it.  Save BBS.C.
  149.  
  150.  
  151. STEP 5:
  152.  
  153. Re-compile your BBS program, which has been improved 329182739%.  It will take
  154. a while to re-compile since VARDEC.H was modified; it will have to re-compile
  155. everything.  That's ok.. have a beer.
  156.  
  157.  
  158.  
  159. Standard disclaimer:   "It ain't mah fault."
  160.  
  161.  
  162. Enjoy the modification!  If you use any of my modifications, please take the
  163. time to send me some e-mail.  (If you're a WWIVnet type person, that is.)  My
  164. net address is 1 @2402.  Thanks very much.
  165.  
  166.  
  167. Puny
  168.  
  169.  
  170.  
  171. (This modification is dedicated to the new Red Hot Chili Peppers' album,
  172.  "BloodSugarSexMagik", a true masterpiece.)