home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / SYSOP / MODS1.ZIP / SPV-013A.MOD < prev    next >
Text File  |  1993-12-10  |  5KB  |  138 lines

  1. SPV-013A.MOD [Send SSM's locally or over the network.]
  2. Papa Bear #1 @5079
  3. 7Tuesday1, 7December 71, 71993 2 96:200 am
  4. 0R: net33: @4056 (via @4061) [08:41 12/10/93]
  5. 0R: net33: @4050 (via @4064) [05:33 12/10/93]
  6. 0R: net33: @4064 (via @1040) [05:10 12/10/93]
  7. 0R: net33: @1040 (via @2050) [13:37 12/09/93]
  8. 0R: net34: @2050 [11:35 12/09/93]
  9. 0R: net34: @2050 (via @1040) [05:54 12/09/93]
  10. 0R: net33: @1040 (via @1114) [04:39 12/09/93]
  11. 0R: net33: @5079 [09:05 12/07/93]
  12. 4Msg. Status:3▄ 15Please reply!
  13. 3 ▀▀▀▀▀▀▀▀▀▀▀▀
  14.  
  15. ┌────────────────────────────────────────────────────────────────────────────┐
  16. │ Mod Name: SPV-013A.MOD     Mod Authors: Pâpâ ßêâr (1@5079 WWIV/IceNET)     │
  17. │ Difficulty: ▓░░░░░░░░░     [02/08/93] [12/06/93]  (1@5050 SEX/JAMDnet)     │
  18. │ WWIV Version: 4.23 [any version that uses SSM's]   (1@15061 WWIVlink)      │
  19. │ Files Affected: FCNS.H BBS.C MISCCMD.C               (1@18 CARDNet)        │
  20. │ Description: Allows user to send SSM's locally, or over the network.  Puts │
  21. │the author's name and node number [if applicable] in the line.              │
  22. ╞═────────────────────────────────────═╤═───────────────────────────────────═╡
  23. │ StarPort Valhalla [510]522-3583 ASV 14.4kbps  Home of the SPV mod series!  │
  24. ╘═────────────────────────────────────═╧═───────────────────────────────────═╛
  25.  Word of Warning:  You installed it, you're responsible! Make back-ups BEFORE
  26.  attempting to install this modification!  Read all text before beginning.
  27. -----------------------------------------------------------------------------
  28.  LEGEND:
  29.  ==  Original Code [use this to search on]
  30.  ++  Add this Line [mods ALWAYS add stuff, don't they?]
  31. -----------------------------------------------------------------------------
  32.  LONG DESCRIPTION:  I had a mod for pre-4.22 that did something like this.
  33. However, it did NOT allow for the multiple networks that 4.22 supports so
  34. easily.  A big THANK YOU to Captain EJ (1@5057 WWIVnet) for pointing this out
  35. and giving me the idea to do this.
  36.  Now updated for 4.23.  Just minor, mostly cosmetic, changes.
  37. -----------------------------------------------------------------------------
  38. STEP 1:  ADD ENTIRE FUNCTION TO END OF MISCCMD.C
  39.  
  40. void send_ssm(void)
  41. {
  42.   char s1[81],s2[81],s3[81],*ss;
  43.   int i;
  44.   unsigned short un,sy;
  45.  
  46.   nl();
  47.   npr("Transmit a short message to another user? ");
  48.   if (yn()) {
  49.     printfile("SSMNOTE.MSG");
  50.     npr(": ");
  51.     mpl(20);
  52.     input(s1,20);
  53.     nl();
  54.     pl("Checking to see if this is a network address.");
  55.     nl();
  56.     parse_email_info(s1,&un,&sy);
  57.     nl();
  58.     if (!sy) {
  59.       pl("Not a network address, checking for local user.");
  60.       nl();
  61.       un=finduser1(s1);
  62.     }
  63.     if ((!un && !sy) || !un) {
  64.       pl("This is not a valid network address, nor a local user.");
  65.       return;
  66.     } else {
  67.       pl("Please enter your short message now, 50 characters!");
  68.       npr(": ");
  69.       mpl(50);
  70.       inli(s1,"",50,1);
  71.       if (un && sy) {
  72.         if (thisuser.restrict & restrict_net) {
  73.           nl();
  74.           npr("You are restricted from sending SSM's off %s.",
  75.                syscfg.systemname);
  76.           return;
  77.         } else {
  78.           sprintf(s3,"%s ",nam1(&thisuser,usernum,net_sysnum));
  79.           strcat(s3,s1);
  80.           ssm(un,sy,s3);
  81.           nl();
  82.           pl("Your short message hass been transmitted over the network!");
  83.           nl();
  84.         }
  85.       } else {
  86.         sprintf(s3,"%s says: ",nam(&thisuser,usernum));
  87.         strcat(s3,s1);
  88.         ssm(un,0,s3);
  89.         nl();
  90.         pl("Your short message has been transmitted locally");
  91.         nl();
  92.       }
  93.     }
  94.   }
  95. }
  96. -----------------------------------------------------------------------------
  97. STEP 2: ADD A FILE TO THE GFILES DIRECTORY.  Call it SSMNOTE.MSG.  In this
  98.         file, describe to the user HOW to use this mod.
  99.  
  100.   In case you're curious, here's my SSMNOTE.MSG file:
  101.  
  102. EXAMPLE OF MY SSMNOTE.MSG
  103. -------------------------
  104.  
  105. Enter caller's name (local) or number and node (net).
  106. Examples: For a local message, just enter the users name or number.
  107.           For a net message, use the format 131@5079.
  108.  
  109. END EXAMPLE OF SSMNOTE.MSG
  110. -----------------------------------------------------------------------------
  111. STEP 3:  ADD A NEW COMMAND TO BBS.C IN FUNCTION mainmenu(void)
  112.  
  113. ==  if (strcmp(s,"/E")==0)
  114. ==    slash_e();
  115. ++  if (strcmp(s,"/M")==0)
  116. ++    send_ssm();
  117. ==  if (strcmp(s,"/O")==0)
  118. -----------------------------------------------------------------------------
  119. STEP 4:  ADD A LINE TO FCNS.H IN THE LIST OF FUNCTIONS FOR MISCCMD.C
  120.  
  121. == void remotenotify(char *name, char *desc);
  122. == int remoteupload(char *message);
  123. == int getnetnum(char *netnam);
  124. ++ void send_ssm(void);
  125. ==
  126. == /* File: multinst.c */
  127. -----------------------------------------------------------------------------
  128. STEP 5:  RECOMPILE THE WHOLE ENCHILADA
  129.  
  130.   That's it.  Pretty easy, eh?  As always, if you have problems, or if
  131. youeven decide to use this, I'd appreciate some E-Mail!
  132.  
  133. 1-7=3*6>2Pâpâ ßêâr6<3*7=1-0
  134.  
  135. 84StarPort Valhalla ASV 510-522-3583════════════════────────────────────────────
  136. ---
  137. 6*2FLASH6* 2Energizer bunny arrested for battery!
  138.