home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / SYSOP / MODS1.ZIP / EARP01C.MOD < prev    next >
Text File  |  1995-06-22  |  7KB  |  177 lines

  1. ``Wyatt Earp`` SierraLink #1 AT 4
  2. Mon Jun 19 06:13:49 1995
  3. This MOD was formerly OLDS01.423 but I have since changed my handle!
  4. ┌────────────────────────────────────────────────────────────────────────────┐
  5. │ Mod Name      : EARP01C.424      Mod Author: Wyatt Earp 1@4     SierraLink │
  6. │ Difficulty    : █▒▒▒▒▒▒▒▒                               1@11131 WWIVnet    │
  7. │ WWIV Version  : 4.24                                    1@2901  FishNet    │
  8. │ Mod Date      : 6/04/95                                 1@2901  TerraNET   │
  9. │ Files Affected: MISCCMD.C, BBS.C, CONIO.C              92@22901 WWIVLink   │
  10. │                                                                            │
  11. │ Description   : Allows user to use timebank when out of time               │
  12. └────────────────────────────────────────────────────────────────────────────┘
  13. ╔════════════════════════════════════════════════════════════════════════════╗
  14. ║   This mod is copyright 1994, by Shane Liptrap, aka Wyatt Earp, and is     ║
  15. ║   distributed as freeware.  Permission is granted to distribute and post   ║
  16. ║   this mod on systems and online services, provided no alternations are    ║
  17. ║   made (removal of message headers/taglines are allowed).  This mod may    ║
  18. ║   contain some parts of WWIV source code, which is copyright 1988-1994 by  ║
  19. ║   Wayne Bell and licensed only to registered users of WWIV.  Use of WWIV   ║
  20. ║   source without registration constitutes a license violation and could    ║
  21. ║   lead to legal prosecution and certain doom.                              ║
  22. ║                                                                            ║
  23. ║   Shareware distributors and CD-ROM publishers may not distribute this mod ║
  24. ║   without express written permission of the Author or WWIV Software        ║
  25. ║   Services.                                                                ║
  26. ╚════════════════════════════════════════════════════════════════════════════╝
  27.      ╓─────────────╖
  28. ─═══─╢ Description ╟─════════════════════════════════════════════════════════─
  29.      ╙─────────────╜
  30.  
  31. This is a really simple MOD.... when a user runs out of time they will be
  32. asked if they want to use the time bank, if they answer yes they can withdraw
  33. time. If no they are loged off of the BBS. And if there is an External event
  34. about to run then the user cannot withdraw time from the timebank (So they wont
  35. complain to you when they lose the 40 minutes they just withdrew because WWIV
  36. will kick them off anyway hehehe.)
  37.  
  38. If you are Upgrading you'll pretty much have to do everything! Warning... if
  39. you've installed EARP04.423 you'll have to remove it. I found a better way to
  40. do this MOD.
  41.  
  42.      ╓───────────╖
  43. ─═══─╢ Revisions ╟─══════════════════════════════════════════════════════════─
  44.      ╙───────────╜
  45.  
  46. Revision A: I changed the MOD to just hangup on users who had NO time in thier
  47.             Timebank.
  48.  
  49. Revision B: When the user doesn't have any time in the timebank the MOD now
  50.             calls the out of time string instead of juts hanging up on them.
  51.             Also Iv added a step that will keep the user from withdrawing time
  52.             from the timebank when an external event is about to run. And a
  53.             few other minor fixes.
  54.  
  55. Revision C: The MOD will now check to see if an external event is about to run
  56.             and will not prompt the user to use the timebank if one is. It
  57.             displays a message about the event and then logs the user off.
  58.  
  59.  
  60.      ╓─────────╖
  61. ─═══─╢ Credits ╟─════════════════════════════════════════════════════════════─
  62.      ╙─────────╜
  63.  
  64. Thanks go to Nirvanna 1@??? (Sorry I forgot hehe) for suggestions on the MOD.
  65. And also to Bull Ship 1@11132 WWIVNet for the suggestions he made. If you
  66. are using this MOD please email me at one of the above nodes, thanks.
  67.  
  68.      ╓────────╖
  69. ─═══─╢ Legend ╟─═════════════════════════════════════════════════════════════─
  70.      ╙────────╜
  71.  
  72.     +  Add line
  73.     -  Remove line
  74.     =  Existing line
  75.     *  Modify line
  76.  
  77.      ╓────────╖
  78. ─═══─╢ Step 1 ╟─═════════════════════════════════════════════════════════════─
  79.      ╙────────╜
  80.  
  81. Please back up your source code. Be a pity to fry your source without making
  82. current back ups huh?!?!?!
  83.  
  84.      ╓────────╖
  85. ─═══─╢ Step 2 ╟─═════════════════════════════════════════════════════════════─
  86.      ╙────────╜
  87. If upgrading simply replace the function VOID TIMEOUT with this new one.
  88.  
  89.  
  90. Open BBS.C and add the following function at the bottom.
  91.  
  92. // Start EARP01C.424
  93. void timeout(void)
  94. {
  95.     if((do_event) && (syscfg.executetime)) {
  96.       prt(7, "[1A System Event is about to run, please call back later7]0");
  97.       hangup=1;
  98. }
  99. else {
  100.     if(thisuser.banktime>0) {
  101.       nl();
  102.       prt(7, "[1You're out of time, would you like to acces the Time Bank?7] ");0
  103.       if (yn()) {
  104.         write_inst(INST_LOC_BANK,0,INST_FLAGS_ONLINE);
  105.         time_bank();
  106.  }
  107.     else {
  108.       prt(1, "Ok, your loss... Cya Later");
  109.       nl();
  110.       hangup=1;
  111.  }
  112. }
  113.    else {
  114.      pl(get_string(926));
  115.      hangup=1;
  116.   }
  117.  }
  118. }
  119. //END EARP01C.424
  120.  
  121. Save BBS.C 
  122.  
  123.      ╓────────╖
  124. ─═══─╢ Step 3 ╟─═════════════════════════════════════════════════════════════─
  125.      ╙────────╜
  126. If upgrading you will have to do this Step.
  127.  
  128. Open MISCCMD.C and search for VOID TIME_BANK and make the following changes.
  129.  
  130. =     case 'W':
  131. +       if (ltime) {
  132. =         nl();
  133. +         prt(7, "[1An External Event is about to run, you cannot Withdraw time7]0
  134. ");     //WORD WRAP
  135. +         delay(500);
  136. +         break;
  137. +   } else
  138. =        if (!thisuser.banktime)
  139. =          break;
  140. =        prt(1,get_string(991));
  141.  
  142.      ╓────────╖
  143. ─═══─╢ Step 4 ╟─═════════════════════════════════════════════════════════════─
  144.      ╙────────╜
  145. If upgrading forget this step... nothing new here
  146.  
  147. Now open CONIO.C and search for Void tleft(void).... down around line 790 or
  148. so you'll have to add in the stated line and remove or comment out the
  149. marked lines.
  150.  
  151. =  if ((x) && (useron))
  152. =    if (nsln==0.0) {
  153. =      nl();
  154. -      pl(get_string(926));
  155. -      nl();
  156. -      hangup=1;
  157. +    timeout();
  158. =    }
  159. =  }
  160.  
  161. Save CONIO.C
  162.  
  163.      ╓────────╖
  164. ─═══─╢ Step 5 ╟─═════════════════════════════════════════════════════════════─
  165.      ╙────────╜
  166.  
  167. Now you'll need to MAKE FCNS to add the new function.
  168.  
  169.      ╓────────╖
  170. ─═══─╢ Step 6 ╟─═════════════════════════════════════════════════════════════─
  171.      ╙────────╜
  172.  
  173. Now compile your BBS... and run... see... too simple.
  174.  
  175. Disclaimer: It works here and you put it in so I'm not responsible if your
  176.         BBS gets fried.
  177.