home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / MODS / FMD-44A.ZIP / FMD-44A.MOD < prev   
Encoding:
Text File  |  1995-07-05  |  8.1 KB  |  289 lines

  1. Nicolas Leblanc #2 @20302
  2. Mon Jul 03 02:22:19 1995
  3.    ┌┬─── ──  ─     ─  ── ───────────────────────────────────────────────────┬─ ∙∙
  4.    ││             Alternative Worlds Presents              │
  5.    └┼─────────────────────────────────────────────────────────────────────┐
  6.    ││ Mod Name       » FMD-44a.MOD                                        │∙
  7.    ││ Difficulty     » █▒▒▒▒▒▒▒▒▒▒ (1/10)                                 │:
  8.    ││ WWIV Version   » 4.24                                               ││
  9.    ││ Date Affected  » 07/03/95                                           ││
  10.    :│ Files Affected » BBSOVL1.C                                          ││
  11.    ∙│ Description    » Better Email System (WWIVnet/Internet/Fidonet)     ││
  12.     └─────────────────────────────────────────────────────────────────────┼┐
  13.     │       A French Mod Division Release - (C) 1995 FMD Software         ││
  14. ∙∙ ─┴─────────────────────────────────────────────────── ──  ─     ─  ── ───└┘
  15.  
  16.  ┌┬══════════════════┐
  17.  ││ Long Description ││
  18.   └══════════════════┴┘
  19.  
  20.  This modification will prompt your user when he wants to send an email to
  21. know if he wants to send an email over WWIVnet, Internet, Fidonet or local.
  22. This will ease the user's work by converting the addresses for him and sending
  23. it through a good gateway.
  24.  
  25.  This modification is based on a modification done by Secret Agent Man, for
  26. v4.23, except that this one is not a mail room modification, it's simply
  27. a prompt, your email routine is not affected and it just looks like stock
  28. WWIV, there is no graphical user interface.
  29.  
  30.  There is extra informations if you're not in expert mode on this modification,
  31. we guess that if your user is able to know all commands of WWIV by his heart,
  32. he's able to figure how this will work by himself.
  33.  
  34.  This modification is also configurable with WWIV.INI, but it's not required.
  35.  
  36. Revision A:
  37.  
  38.  A mistery happened, I have no idea why the mod wasn't working right when
  39. it was on my system, I looked in the code and found out many errors. If you
  40. are upgrading, change the send_inet_mail and send_fido_mail functions, and add
  41. "@" in WWIV.INI before the node numbers.
  42.  
  43.  ┌┬═══════┐
  44.  ││ Tests ││
  45.   └═══════┴┘
  46.  
  47.   This modification has been tested on a virgin WWIV v4.24 source using
  48.   Borland C++ v4.5
  49.  
  50. ──────────────────────────────────────────────────────────────────────────────
  51.                    Legend
  52.               ╔═══╤══════════════════┐
  53.               │ + │ Add This Line     │
  54.               │ - │ Delete This Line │
  55.               │ * │ Modify This Line │
  56.               │ = │ Existing Line     │
  57.               └═══╧══════════════════╝
  58. ───[Step 1]────────────────────────────────────────────────────────────────────
  59.  
  60. Load BBSOVL1.C and replace function send_email by this one:
  61.  
  62. void send_email(void)
  63. {
  64.   char s1[81], ch;
  65.   unsigned short sy,un;
  66.  
  67.   write_inst(INST_LOC_EMAIL,0,INST_FLAGS_NONE);
  68.   helpl=14;
  69.   nl();
  70.   ansic(1);
  71.   pl("Select mail type:");
  72.   nl();
  73.   npr("2L7)1 Local mail\r\n");
  74.   npr("2F7)1 Fidonet mail\r\n");
  75.   npr("2I7)1 Internet mail\r\n");
  76.   npr("2W7)1 WWIVnet mail\r\n");
  77.   npr("2Q7)1 Quit\r\n");
  78.   nl();
  79.   npr("2Which type, <C/R>=Local) ? ");
  80.   mpl(1);
  81.   ch=onek("LFIWQ\r");
  82.   switch(ch)
  83.   {
  84.     case 'F': send_fido_mail(); break;
  85.     case 'I': send_inet_mail(); break;
  86.     case 'W':
  87.       pl("4WWIVnet E-mail.0");
  88.       nl();
  89.       if ((sysstatus_expert & thisuser.sysstatus)==0)
  90.       {
  91.         pl("To send a WWIVnet email, you need to send your email this way:");
  92.         nl();
  93.         pl("1UserNumber7@1WWIVnetAddress");
  94.         pl("1UserName7@1WWIVnetAddress");
  95.         nl();
  96.         pl("Example:");
  97.         nl();
  98.         pl("232@55512");
  99.         pl("JOHN DOE @55512");
  100.       }
  101.       nl();
  102.     case '\r':
  103.     case 'L':
  104.       nln(2);
  105.       pl(get_string(15));
  106.       outstr(":");
  107.       input(s1,75);
  108.       helpl=0;
  109.       irt[0]=0;
  110.       irt_name[0]=0;
  111.       parse_email_info(s1,&un,&sy);
  112.       grab_quotes(NULL, NULL);
  113.       if (un || sy)
  114.         email(un,sy,0,0);
  115.       break;
  116.     case 'Q': return;
  117.   }
  118. }
  119.  
  120. ───[Step 2]────────────────────────────────────────────────────────────────────
  121.  
  122. Block copy the following 3 functions just below the send_email function:
  123.  
  124. char *s_and_r(char *string,char old,char nw)
  125. {
  126.    short i= 0;
  127.  
  128.    do {
  129.      if (string[i]==old)
  130.        string[i]=nw;
  131.      i++;
  132.    } while(string[i]!='\0');
  133.    return(string);
  134. }
  135.  
  136. void send_inet_mail(void)
  137. {
  138.   char *s,s1[81],s2[81],*ss;
  139.   unsigned short sy,un;
  140.  
  141.   outchr(12);
  142.   write_inst(INST_LOC_EMAIL,0,INST_FLAGS_NONE);
  143.   nl();
  144.   nl();
  145.   npr("4Internet E-mail.0\r\n");
  146.   nl();
  147.   if ((sysstatus_expert & thisuser.sysstatus)==0)
  148.   {
  149.     pl("To send an Internet email, you need to send your email this way:");
  150.     nl();
  151.     pl("1UserName7@1server");
  152.     nl();
  153.     pl("Example:");
  154.     nl();
  155.     pl("john.doe@nowhere.com");
  156.   }
  157.   nl();
  158.   pl("Enter the Internet E-mail address.");
  159.   outstr(":");
  160.   inputl(s1,60);
  161.   strupr(s1);
  162.   if (s1[0]==0)
  163.   {
  164.     pl(get_string(14));
  165.     return;
  166.   }
  167.   s=s_and_r(s1,64,35);
  168.   helpl=0;
  169.   irt[0]=0;
  170.   irt_name[0]=0;
  171.   strcpy(s2,"@9023");
  172.   if (ini_init("WWIV.INI", "FMD", NULL)==0)
  173.   {
  174.     if ((ss=ini_get("INTERNET_GATEWAY_NODE", -1, NULL))!=NULL)
  175.     {
  176.       strcpy(s2, ss);
  177.     }
  178.     ini_done();
  179.   }
  180.   strcat(s, s2);
  181.   parse_email_info(s,&un,&sy);
  182.   grab_quotes(NULL, NULL);
  183.   if (un || sy)
  184.     email(un,sy,0,0);
  185.   else
  186.     pl("Invalid address format.");
  187. }
  188.  
  189. void send_fido_mail(void)
  190. {
  191.   char s[81],s1[81],s2[81],s3[81],*ss;
  192.   unsigned short sy,un;
  193.  
  194.   outchr(12);
  195.   write_inst(INST_LOC_EMAIL,0,INST_FLAGS_NONE);
  196.   helpl=14;
  197.   npr("4Fidonet E-mail.0\r\n");
  198.   nl();
  199.   if ((sysstatus_expert & thisuser.sysstatus)==0)
  200.   {
  201.     pl("To send a Fidonet email, you will be prompted for 2 things:");
  202.     nl();
  203.     pl("1User Name");
  204.     pl("1Fidonet Address");
  205.     nl();
  206.     pl("Example:");
  207.     nl();
  208.     pl("John Doe");
  209.     pl("1:167/999");
  210.   }
  211.   nl();
  212.   pl("Enter the Name of the person you want to email.");
  213.   outstr(":");
  214.   inputl(s1,31);
  215.   strupr(s1);
  216.   if (s1[0]==0)
  217.   {
  218.     pl(get_string(14));
  219.     return;
  220.   }
  221.   pl("Enter the Fidonet address of that person.");
  222.   outstr(":");
  223.   input(s2,15);
  224.   if (s2[0]==0)
  225.   {
  226.     pl(get_string(14));
  227.     return;
  228.   }
  229.   helpl=0;
  230.   irt[0]=0;
  231.   irt_name[0]=0;
  232.   sprintf(s,"%s (%s) ",s1,s2);
  233.   strcat(s3,"@1020");
  234.   if (ini_init("WWIV.INI", "FMD", NULL)==0)
  235.   {
  236.     if ((ss=ini_get("FIDONET_GATEWAY_NODE", -1, NULL))!=NULL)
  237.     {
  238.       strcpy(s3, ss);
  239.     }
  240.     ini_done();
  241.   }
  242.   strcat(s, s3);
  243.   parse_email_info(s,&un,&sy);
  244.   grab_quotes(NULL, NULL);
  245.   if (un || sy)
  246.     email(un,sy,0,0);
  247.   else
  248.     pl("Invalid address format.");
  249. }
  250.  
  251. ───[Step 3]────────────────────────────────────────────────────────────────────
  252.  
  253. Load WWIV.INI, if you don't have a [FMD] section, create it and add the
  254. following lines:
  255.  
  256. [FMD]
  257. ; Node of the Internet Gateway
  258. INTERNET_GATEWAY_NODE = @9023
  259. ; Node of the Fidonet Gateway
  260. FIDONET_GATEWAY_NODE = @1020
  261.  
  262. Please change those value to the closest gateways from your system, I found
  263. those by searching the WWIVnet listing, and I'm not sure they are working
  264. (they should). I have not been able to retrace the addresses from Secret Agent
  265. Man's modification since they were pre-changeover nodes.
  266.  
  267. ───[Step 4]────────────────────────────────────────────────────────────────────
  268.  
  269. Do a MAKE FCNS and compile back the BBS, you are ready to enjoy a very
  270. simple modification that gives you a lot more tools for your WWIV system.
  271.  
  272. French Proverb: Il n'y a que la vérité qui blesse.
  273.  
  274. For comments, bug report and suggestion, e-mail at the following address:
  275.  
  276. Nicolas LeBlanc  2@20302.WWIVnet (aka Spotnick)
  277.                  -> spotnick@gamemaster.qc.ca
  278. Martin Bourdages 242@20306 / 3@20302.WWIVnet (aka Dark Shadow)
  279.                  -> martin.bourdages@radio.magicnet.com
  280.  
  281.                  =>   French Mod Division Support Sub   <=
  282.                                 SubType: FMD
  283.                            Host: @20302 (WWIVnet)
  284.                       Scan sublist for other networks
  285.  
  286.         Read PRODUCTS.FMD for the full list of our support systems.
  287.  
  288. ───[EOF]──────────────────────────────────────────────────────────────────────
  289.