home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / WWIVMODS / MODSUNKN.ZIP / MERLIN9.MOD < prev    next >
Text File  |  1990-07-12  |  9KB  |  238 lines

  1. Merlin #4 @6862
  2. Mon Jul 09 10:21:50 1990
  3. v1.0
  4.  
  5. Hello, and welcome to MERLIN9.MOD!  What this mod does, is allow a user
  6. to put in a code in a message or email that prints out a certain
  7. statistic on a user.  For example, if you type <CTRL>-<P><G>, your name will
  8. appear.  When someone else comes along to read it, THEIR name will appear!
  9.  
  10. Now, because this mod will work across the network, I've tried to make
  11. it as compatible as possible with existing mods (namely that of P. Opus's
  12. 8MORECOL.MOD).  This mod assumes that you have the 2 extra colors mod
  13. in; if you do not, simply change every reference of '9' to '7'.
  14.  
  15. As usual with most of these mods, the author (me) takes no resposibility
  16. what-so-ever if this mod causes your cat to jump on your keyboard and
  17. delete every user you have or if your modem decides it doesn't like you
  18. and fries itself, committing datacide...
  19.  
  20. Special thanks goes to ...
  21.  
  22.         The users of the Educated Guess and the Downtown Tower --
  23.         for putting up with the BETA testing.  Gee, do we ALL know
  24.         how it works now??? :)
  25.  
  26.         PC Guru -- for the suggestions and help along the way.
  27.  
  28.         Parker Prospect -- for the friendship.  D.C. will never
  29.         be the same!
  30.  
  31. ALSO!!!  To insure compatibility with EVERYONE, DO NOT, and I repeat DO
  32. NOT, alter, add, or subtract from the letters below!  You might not
  33. realize what a disaster that might be!  For example, let's say that I
  34. use 'G' as the person's name, while Fred T. Smile down the street uses
  35. 'G' as the person's SL -- so, instead of printing the SL on my system,
  36. it prints out the dude/tte's name.  So, in order that everyone remain
  37. compatible, I'm asking that everyone submit a change to me for
  38. authorization -- I'll play the "standardizer" so that everyone keeps
  39. compatible.  I'll post updates of the "prinfo" routine regularly...
  40. Just to cut down on things that are "system-specific", I've defined
  41. the letter 'M' as the letter that every sysop can define on their system.
  42. For example, I have two phone #'s -- a  "phone" and a "voicephone".
  43. <CTRL><P><M> on my system brings up your voicephone.  On someone else's
  44. system, <CTRL><P><M> might bring up the user's horoscope sign.
  45.  
  46. >>>>  SEE THE ACCOMPANYING 'STANDARD.TXT' FOR CURRENT COMMAND SET <<<<
  47.  
  48. Thanks for the support and thanks for trying MERLIN9!
  49.  
  50. |\/|erlin
  51. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  52. WANTED:  Since I'm too lazy to do it, would someone PLEASE add an SL check
  53.          on this puppy.  Seems a lot of users like to abuse this mod for like
  54.          the first few weeks, then it dies off.  Thought maybe an SL check
  55.          (or even an AR) might be handy.  If you do "patch" it, please send
  56.          me a copy and I'll credit YOU with the change.
  57. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  58. |\/|erlin's Tower
  59. WWIVlink: @16850    (That's right guys, another
  60. WWIVnet:  PENDING    dual noded system!)
  61. 3/6/12/2400 8N1                                   TO BE 24 HOURS
  62. (618)-473-2213                               AT A DIFFERENT NUMBER!!!
  63. 1pm-4pm CT Mon-Fri
  64. Running WWIV 4.11 (Reg #10354)              EXPECTED DATE IS AUGUST 20th!
  65. Featuring:
  66.     AUTOMATIC CALLBACK (for local users)
  67.     SysOp Autovalidation
  68.     Close to 300 WWIV Files
  69. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  70.  
  71. /***********************/
  72. /*     L E G E N D     */
  73. /***********************/
  74. /* - = Deleted Line    */
  75. /* + = New Line        */
  76. /* # = Existing Line   */
  77. /* ! = Modified Line   */
  78. /* * = Search For Line */
  79. /***********************/
  80.  
  81. Step    -- #1
  82. File    -- FCNS.H
  83. Routine -- <n/a>
  84. Notes   --
  85.            At the very end of the file, include this...
  86.  
  87.  
  88. +  void prinfo(char ch);     /* MERLIN9 -- utility.c */
  89.  
  90. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  91.  
  92. Step    -- #2
  93. File    -- COM.C
  94. Routine -- outchr
  95.  
  96. *    if ((c >= '0') && (c <= '9'))   /* This might be a 7 on your system */
  97. #      ansic(c - '0');
  98. +    /* MERLIN 9 */
  99. +    else if ((c >= 'G') && (c <= 'Z'))  /* Allows for letters A through Z */
  100. +      prinfo(c);
  101. +    else if ((c >= 'g') && (c <= 'z')) {
  102. +      c=upcase(c);                       /* Cap' it, then send it to prinfo() */
  103. +      prinfo(c);
  104. +     }
  105. +    /* MERLIN 9 */
  106. #    return;
  107.  
  108. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  109.  
  110. Step    -- #3
  111. File    -- UTILITY.C
  112. Routine -- prinfo
  113. Notes   --
  114.            With a little adjustment, this routine could probably go
  115.            someplace else, but I thought this might be the most
  116.            appropriate place.  Anyhow, just add this to the end...
  117.  
  118.            Also, you may notice that I do a check for syscfg_no_alias...
  119.            if this is defined, the real name will actually be in
  120.            thisuser.name instead of thisuser.realname and the city/state
  121.            info will be located in thisuser.realname -- what a pain. You
  122.            may have to redo the latter if you played with your newuser()
  123.            routine.
  124.  
  125.     /* MERLIN 9 */
  126. /* prinfo()  v1.1   */
  127. void prinfo(char ch)
  128. {
  129.   char s[81];
  130.   strcpy(s,"");
  131.  
  132.     switch (ch) {
  133.        case 'G':                         /* User's Name */
  134.          sprintf(s,"%s",thisuser.name);
  135.          break;
  136.        case 'H':                         /* User's Real Name */
  137.          if (syscfg.sysconfig & sysconfig_no_alias)
  138.            sprintf(s,"%s",thisuser.name);
  139.          else
  140.            sprintf(s,"%s",thisuser.realname);
  141.          break;
  142.        case 'I':
  143.          itoa(thisuser.age,s,10);        /* User's Age */
  144.          break;
  145.        case 'J':
  146.          sprintf(s,"%s",thisuser.note);  /* User's Note */
  147.          break;
  148.        case 'K':                         /* User's City/State */
  149. /* 1 */  if (syscfg.sysconfig & sysconfig_no_alias)
  150. /* 2 */    sprintf(s,"%s",thisuser.realname);
  151. /* 3 */  else
  152. /* 4 */    sprintf(s,"%s",thisuser.citystate);
  153.          break;
  154.  
  155. /*        How to config:
  156.  
  157.           NO FROM Mod --   Delete lines #3 & #4
  158.           Aliases     --   Delete lines #1, #2, #3             */
  159.  
  160.        case 'L':
  161.          sprintf(s,"%d",usernum);              /* User's Number */
  162.          break;
  163.        case 'M':
  164.          sprintf(s,"%s",thisuser.voicephone);
  165.  
  166.             /*RESERVED FOR LOCAL SYSTEM'S USE ONLY!
  167.               Since I figured that everyone had something that they would
  168.               want in their spec's--I left this one OPEN for THEIR use.
  169.               If you think that it warrants to become standard, give a yell.
  170.  
  171.               For my system, I have it defined as the voice phone #.
  172.               If you don't have anything to put here, then just delete
  173.               the above line.*/
  174.  
  175.          break;
  176.        case 'N':
  177.          sprintf(s,"%s",thisuser.phone);      /* User's phone number */
  178.          break;
  179.        case 'O':
  180.          itoa(thisuser.sl,s,10);              /* User's SL */
  181.          break;
  182.        case 'P':
  183.          itoa(thisuser.dsl,s,10);             /* user's DSL */
  184.          break;
  185.        case 'Q':
  186.          sprintf(s,"%.0f",thisuser.gold);     /* User's GOLD */
  187.          break;
  188.        case 'R':
  189.          sprintf(s,"%s",syscfg.systemname);   /* BBS System Name */
  190.          break;
  191.        case 'S':                              /* Pause */
  192.          pausescr();
  193.          break;
  194.        case 'T':                              /* Time */
  195.          strcpy(s,times());
  196.          break;
  197.        case 'U':                              /* Date */
  198.          strcpy(s,date());
  199.          break;
  200.        default:
  201.          break;
  202.     }
  203.     outstr(s);
  204. }
  205. /* MERLIN 9 */
  206.  
  207. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  208.  
  209. Step    -- #4
  210. File    -- bbsutl.c
  211. Routine -- inli
  212.  
  213. *          case 16: /* Ctrl-P */
  214. #            if (cp<maxlen-1) {
  215. #              ch=getkey();
  216. +              /* MERLIN 9 */
  217. !              if (((ch>='0') && (ch<='9')) ||   /* This might need to be a */
  218. +                  ((ch>='G') && (ch<='Z')) ||   /* '7' on your system */
  219. +                   ((ch>='g') && (ch<='z'))) {
  220. #                s[cp++]=3;
  221. #                s[cp++]=ch;
  222. #                if((ch>='0') && (ch<='9'))       /* Again, may be a '7' */
  223. #                  ansic(ch-'0');
  224. +                else if ((ch>='G') && (ch<='Z'))
  225. +                  prinfo(ch);
  226. +                else {
  227. +                  ch=upcase(ch);
  228. +                  prinfo(ch);
  229. +                }
  230. #              }
  231. +             /* MERLIN 9 */
  232. #            }
  233. #            break;
  234. #          case 9:  /* Tab */
  235.  
  236. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  237.  
  238. That's it.  Just recompile and cross your fingers!