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

  1. Apollo #1 @11138
  2. Sun Jun 25 22:36:49 1995
  3. ┌──────────────────────────────────────────────────────Filo─Header─(c)────┐
  4. │ Mod Name: Edit00.424    Mod Authors: Editor 149                         │
  5. │ Difficulty: ██▒▒▒▒▒▒▒▒(1.5/10)       @11138.WWIVNet                     │
  6. │ WWIV Version: v4.24                  @2939 TERRANet, IceNet, SierraLink │
  7. │ Date: 06/19/95                       @2938 CyberNet                     │
  8. │ Files Affected: BBSUTL.C                                                │
  9. │ Description: Use seperate string file for Editor's strings              │
  10. │ Fix Logging Language Problems.                                          │
  11. └─────────────────────────────────────────────────────────────────────────┘
  12.  
  13. Extended Description:
  14. I don't know about you, but I keep my strings External to save on Dgroup
  15. space, and I really don't like it when my logs contain several different
  16. languages, so I wrote this mod.
  17.  
  18. Copyright Disclaimer:
  19. (c) 1995 Editor a.k.a #149@Retreat of the Gods  (209) 537-2808
  20. This mod is written for use by REGISTERED WWIV SysOps, as they are the only
  21. ones who should have the source code.  SysOps may freely upload this mod to
  22. any BBS or online service provided it is not edited in any way except to
  23. remove messge headers and/or taglines.  Shareware CDROM vendors are prohibited
  24. from distributing this mod without EXPRESS WRITTEN CONSENT from the author &
  25. Wayne Bell, Author of WWIV BBS Software.
  26. Parts of the code shown in this mod are:
  27.                 Copyright (C) 1988-1993 by Wayne Bell.
  28.  
  29. BACKUP your source
  30.  
  31. LEGEND:
  32. =   Old code, Search for this
  33. +   New code, Add this
  34. -   Remove or comment out this
  35. ... Go down several lines in the same function
  36.  
  37. Open: BBSUTL.C
  38. Find: int set_language_1(int n)
  39. =     printf("Copy ENGLISH.STR from the distribution archive to %sBBS.STR\n",
  40. =            languagedir);
  41. =   }
  42. =   fail=1;
  43. = }
  44. =
  45. = if (n==0) {
  46. -/* if (set_strings_fn(1, languagedir, "SYSOPLOG.STR", 0)) {
  47. -                                     Removed for Edit00.424 */
  48. +   if (set_strings_fn(1, syscfg.gfilesdir, "SYSOPLOG.STR", 0)) {
  49. +                                     /* Edit00.424 */
  50. -/*   printf("Couldn't open %sSYSOPLOG.STR for language #%d\n",
  51. -            languagedir, n);
  52. -                                     Removed for Edit00.424 */
  53. +     printf("Couldn't open %sSYSOPLOG.STR for language #%d\n",
  54. +            syscfg.gfilesdir, n);
  55. +                                     /* Edit00.424 */
  56. -/*   printf("Copy SYSOPLOG.STR from the distribution archive to %sSYSOPLOG.STR\n",
  57. -            languagedir  );
  58. -                                     Removed for Edit00.424 */
  59. +     printf("Copy SYSOPLOG.STR from the distribution archive to %sSYSOPLOG.STR\n",
  60. +             syscfg.gfilesdir);
  61. +                                     /* Edit00.424 */
  62. =     fail=1;
  63. =   }
  64. = }
  65. .
  66. .
  67. .
  68. =   return(fail);
  69. =
  70. = set_strings_fn(2, languagedir, "YES.STR", 0);
  71. = set_strings_fn(3, languagedir, "NO.STR", 0);
  72. + set_strings_fn(6, syscfg.gfilesdir, "EDITOR.STR", 0);
  73. +                                     /* Edit00.424 */
  74. =
  75. = strncpy(str_yes,get_string(1), sizeof(str_yes)-1);
  76. = strncpy(str_no,get_string(2), sizeof(str_no)-1);
  77. = strncpy(str_quit,get_string(929), sizeof(str_quit)-1);
  78.  
  79. In order to use EDITOR.STR you only need to do a get_stringx(6,#) where #
  80. is the string number in the EDITOR.STR file, and put that call anyplace you
  81. want to add a sting to your source.  Put EDITOR.STR and SYSOPLOG.STR in your
  82. gfiles directory.
  83.  
  84.  
  85. Done.
  86.  
  87. Save, Recompile and run.
  88. As you can see, it's very easy and you only have to change one Function!
  89.  
  90. Editor
  91.