home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / MODS / ALLMODS.ZIP / EDIT11.ZIP / EDIT11.MOD next >
Encoding:
Text File  |  1995-06-30  |  3.3 KB  |  81 lines

  1. Apollo #1 @11138
  2. Sun Jun 25 22:41:13 1995
  3. ┌──────────────────────────────────────────────────────Filo─Header─(c)────┐
  4. │ Mod Name: Edit11.424    Mod Authors: Editor 149                         │
  5. │ Difficulty: ██▒▒▒▒▒▒▒▒(1.5/10)       @11138.WWIVNet                     │
  6. │ WWIV Version: v4.24                  @2939 TERRANet, IceNet, SierraLink │
  7. │ Date: 08/18/94                       @2938 CyberNet                     │
  8. │ Files Affected: UTILITY.C                                               │
  9. │ Description: Enables External Event to be run by ERRORLEVEL from main   │
  10. │              BBS Batch File                                             │
  11. └─────────────────────────────────────────────────────────────────────────┘
  12.  
  13. Extended Description:
  14. The code was partially there, but not implemented, and I found that for
  15. many things that I do in the External event batch file I really needed
  16. both instances closed down, so I added this to my source code.  If the
  17. name for the external event is set to nothing, but the time is set to
  18. anything but 0:00, the BBS will exit with an ERRORLEVEL of EVENT_LEVEL,
  19. which is 4 (unless you changed it) on instance 1, and an errorlevel of
  20. oklevel (usually 0) for all other instances.  I then test for the errorlevel
  21. in WWIV1.BAT and run EXTERNAL.BAT.
  22.  
  23. Copyright Disclaimer:
  24. (c) 1995 Editor a.k.a #149@Retreat of the Gods  (209) 537-2808
  25. This mod is written for use by REGISTERED WWIV SysOps, as they are the only
  26. ones who should have the source code.  SysOps may freely upload this mod to
  27. any BBS or online service provided it is not edited in any way except to
  28. remove messge headers and/or taglines.  Shareware CDROM vendors are prohibited
  29. from distributing this mod without EXPRESS WRITTEN CONSENT from the author &
  30. Wayne Bell, Author of WWIV BBS Software.
  31. Parts of the code shown in this mod are:
  32.                 Copyright (C) 1988-1993 by Wayne Bell.
  33.  
  34. BACKUP your source
  35.  
  36. LEGEND:
  37. = old code, Search for this
  38. + new code
  39. - Remove or comment out this line
  40.  
  41. Open: UTILITY.C
  42. Find: void run_event(void)
  43. = if ((do_event) && (syscfg.executetime)) {
  44. -/* do_event=0;                       Removed for Edit11.424 */
  45. =   nl();
  46. =   pl(get_string(920));
  47. =   nl();
  48. =   if (syscfg.executestr[0]) {
  49. =     if (instance==1) {
  50. =       holdphone(1);
  51. =       shrink_out(syscfg.executestr,0,0,0,1);
  52. =       /* run_external(syscfg.executestr); */
  53. =       holdphone(0);
  54. =     }
  55. +   } else {                          /* Edit11.424 */
  56. +     if (instance==1) {              /* Edit11.424 */
  57. +       holdphone(1);                 /* Edit11.424 */
  58. +       end_bbs(EVENT_LEVEL);         /* Edit11.424 */
  59. +       do_event=0;                   /* Edit11.424 */
  60. +       holdphone(0);                 /* Edit11.424 */
  61. +     } else {                        /* Edit11.424 */
  62. +       holdphone(1);                 /* Edit11.424 */
  63. +       end_bbs(oklevel);             /* Edit11.424 */
  64. +       holdphone(0);                 /* Edit11.424 */
  65. +     }                               /* Edit11.424 */
  66. +   }                                 /* Edit11.424 */
  67. +   read_status();                    /* Edit11.424 */
  68. -/*   read_status();
  69. -   } else
  70. -     end_bbs(oklevel);               Removed for Edit11.424 */
  71. = }
  72. = clrscrb();
  73.  
  74.  
  75. Done.
  76.  
  77. Save, Recompile and run.
  78. As you can see, it's very easy and you only have to change one file!
  79.  
  80. Editor
  81.