home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / MODS / ALLMODS.ZIP / FMD-44.ZIP / FMD-44.MOD < prev    next >
Encoding:
Text File  |  1995-07-03  |  7.8 KB  |  280 lines

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