home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / MODS / ALLMODS.ZIP / LSD-001A.ZIP / LSD-001A.MOD < prev   
Encoding:
Text File  |  1995-06-13  |  7.1 KB  |  200 lines

  1. Flashman #1 @1630
  2. Sat Jun 10 11:11:04 1995
  3. ┌────────────────────────────────────────────────────────────────────────────┐
  4. │ Mod Name      : LSD-001A.424         Mod Author: Flashman 1@1630  WWIVNet  │
  5. │ Difficulty    : [▓▓▓░░░░░░░] (3/10)                       1@9930  TerraNet │
  6. │ WWIV Version  : 4.24                                      1@9918  IceNET   │
  7. │ Mod Date      : 6/7/95                       ndpj16c@prodigy.com  Internet │
  8. │ Files Affected: BBS.C, FCNS.H                                              │
  9. │ Description : The ORIGINAL Ring Distinction mod for voice/data linesharing │
  10. │               (Revision "A" containing MANY more features than stock!)     │
  11. └────────────────────────────────────────────────────────────────────────────┘
  12. NOTE: THIS MOD FORMAT HAS BEEN SHAMELESSLY STOLEN FROM JAFO!
  13. ══[ Extended Description ]════════════════════════════════════════════════════
  14. With this mod, sysops can now run a BBS *and* take voice calls on the same
  15. phone line. All you need to do is install this mod, and make sure that you
  16. have a distinctive ring service from your phone company. Don't worry though,
  17. these services normally only cost from $2-$3 a month and are MUCH cheaper than
  18. installing a new phone line.
  19.  
  20. Services this mod should theoretically work with:
  21.         ■ GTE's "Smart Ring" (Mod tested on, works at 100% efficiency)
  22.         ■ AT&T's "IdentiCall"
  23.         ■ Pacific Bell's "Priority Ringing"
  24. ...Or any other service which provides 2 phone numbers to 1 phone line, in
  25. which one of the numbers makes the phone 'double-ring' when calls come in,
  26. whereas the other number single rings. Here's an example. 2 phone numbers,
  27. but only 1 physical line.
  28. NUMBER                  PHONE RINGING SOUND
  29. -------------------------------------------------------
  30. 555-1234                Ring....       Ring....       Ring....
  31. 555-6789                Ring-Ring....  Ring-Ring....  Ring-Ring....
  32.  
  33. Anyway, that's my explanation. If you have one of the above listed phone
  34. services or something like it, you may install this mod. If you DON'T, either
  35. GET the service and install this mod, or don't. If you still don't understand
  36. the PURPOSE of this mod, hit yourself on the head with a mallet and take a
  37. nap for a while.
  38.  
  39. Revision A:
  40.   ■ All voice calls are logged to the sysop log, giving the date, time, and
  41.     number of rings on the voice call received.
  42.   ■ If VOICE_RING is #defined, the computer will make an attractive ringing
  43.     sound, just as a phone would, when a voice call is ringing through. This
  44.     may be useful for sysops who turn the ringer off on their phone to avoid
  45.     the bothersome ringing when someone calls the BBS.
  46.   ■ Eye-catching flashing red on-screen message when voice call is received.
  47.   ■ No more inconvenient pausing for a set 30 or 60 seconds when a voice call
  48.     is received. Instead, the BBS will return to "waiting mode" as soon as the
  49.     phone stops ringing.
  50.  
  51. If you're upgrading, you must start over and complete the entire mod.
  52.  
  53. ══[ Legend ]══════════════════════════════════════════════════════════════════
  54.  
  55.   =  Existing line - Do not change
  56.   +  Add this line
  57.   -  Remove this line
  58.  
  59. ══[ Disclaimer ]══════════════════════════════════════════════════════════════
  60.  
  61. This mod has ONLY been tested with GTE's Smart Ring service. My assumption
  62. that it will work on any similar service is strictly theoretical.
  63.  
  64. ══[ Step 1 ]══════════════════════════════════════════════════════════════════
  65.  
  66. Make backups of the files affected by this mod as listed in the mod header.
  67.  
  68. ══[ Step 2 ]══════════════════════════════════════════════════════════════════
  69.  
  70. Load BBS.C. Find void getuser() and remove this chunk of code. You will need
  71. to replace it with a NEW chunk of code given in step 3.
  72.         
  73.         
  74.         outs("* ");
  75.         if (mode_switch(1.0,0)==mode_ring)
  76.           answer_phone();
  77.         else if (modem_mode == mode_con) {
  78.           incom=outcom=1;
  79.           if (!(modem_flag & flag_ec))
  80.             wait1(45);
  81.           else
  82.             wait1(2);
  83.         }
  84.       }
  85.     }
  86.  
  87. ══[ Step 3 ]══════════════════════════════════════════════════════════════════
  88.  
  89. You now need to make a decision. Do you want the BBS to pick up on the single
  90. ring, or on the double ring? If you want the BBS to answer the phone on the
  91. special double-ring, SKIP THIS STEP and go to step 4. However, if you'd like
  92. the BBS to answer on the regular, single ring, replace the code taken out of
  93. BBS.C in Step 2 with the following:
  94.  
  95.         outs("* ");
  96.         if (mode_switch(1.0,0)==mode_ring) {
  97.           if (mode_switch(2.0,0)==mode_ring) {
  98.             voice_call();
  99.             incom=outcom=1;
  100.             if (!(modem_flag & flag_ec))
  101.               wait1(45);
  102.             else
  103.               wait1(2);
  104.           } else
  105.             answer_phone();
  106.         }
  107.       }
  108.     }
  109.  
  110. ══[ Step 4 ]══════════════════════════════════════════════════════════════════
  111.  
  112. Alternate method - ONLY DO THIS IF YOU SKIPPED STEP 3!!!
  113. To make the BBS pick-up on the double-ring instead, replace the code you took
  114. out of BBS.C in Step 2 with this:
  115.  
  116.         outs("* ");
  117.         if (mode_switch(1.0,0)==mode_ring)
  118.           if (mode_switch(2.0,0)==mode_ring)
  119.             answer_phone();
  120.           else {
  121.             voice_call();
  122.             if (!(modem_flag & flag_ec))
  123.               wait1(45);
  124.             else
  125.               wait1(2);
  126.           }  
  127.       }
  128.     }
  129.  
  130. ══[ Step 5 ]══════════════════════════════════════════════════════════════════
  131.  
  132. Only do this step if you'd like your computer to make a ringing phone sound
  133. whenever a voice call is received. Go back up to the top of BBS.C, and add the
  134. line of code as shown:
  135.  
  136. = #pragma hdrstop
  137. = #define _DEFINE_GLOBALS_
  138. + #define VOICE_RING
  139. = #include "vars.h"
  140. = #include "subxtr.h"
  141. = #include <math.h>
  142.  
  143. ══[ Step 6 ]══════════════════════════════════════════════════════════════════
  144.  
  145. Add the two following voids at the bottom of BBS.C:
  146.  
  147. #ifdef VOICE_RING
  148. void ring_sound(void)
  149. {
  150.   int i;
  151.   for (i=0; i<15; i++) {
  152.     sound(750); delay(50);
  153.     sound(600); delay(50);
  154.   }
  155.   nosound();
  156. }
  157. #endif
  158.  
  159. void voice_call(void)
  160. {
  161.   int r=0,i;
  162.   char s[81],s1[12];
  163.  
  164.   outs("\x0c");
  165.   i=curatr;
  166.   curatr=8*16+12;
  167.   outs("Voice call detected.");
  168.   sprintf(s,"Voice call received at %s on %s, ",times(),date());
  169.   nl();
  170.   do {
  171. #ifdef VOICE_RING
  172.   ring_sound();
  173. #endif
  174.   if (mode_switch(1.0,0)==mode_ring)
  175.     ;
  176.   r++;
  177.   } while (mode_switch(5.0,0)==mode_ring);
  178.   sprintf(s1,"%d rings.",r);
  179.   strcat(s,s1);
  180.   sl1(0,s);
  181.   curatr=i;
  182. }
  183.  
  184. ══[ Step 7 ]══════════════════════════════════════════════════════════════════
  185.  
  186. Type MAKE FCNS to add the new functions to FCNS.H.  Now compile your source.
  187.  
  188. ══[ Final Note ]══════════════════════════════════════════════════════════════
  189.  
  190. If you use this mod, I'd like to know. E-mail me at one of these contact
  191. addresses and let me know how you like it. Or if you haven't tried it out yet,
  192. let me know how you like the idea. Feel free to send any additional questions
  193. or comments as well.
  194.  
  195. Flashman 1@1630  WWIVNet 
  196.          1@9930  TerraNet
  197.          1@9918  IceNET
  198.          Internet address: ndpj16c@prodigy.com
  199.