home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / CEREBRUM / WT138A.ZIP / WT-3.MOD < prev    next >
Text File  |  1997-03-28  |  3KB  |  77 lines

  1. This mod, #3 in the WWIVToss series, enables the user to manually input
  2. a TO: line for Fido-type networks, if they are 'P'osting a message, and
  3. not writing one 'W'ith regards to another one.
  4.  
  5. Minor changes/fixes added by Weatherman.
  6.  
  7. Load up MSGBASE.C.  Look for these lines:
  8.  
  9.   if (!fsed) {
  10.     outstr(get_string(627));
  11.     pln(maxli);
  12.     pl(get_string(628));
  13.  
  14. and add these 2 lines *above* it.
  15.  
  16.     if (irt_name[0]==0)
  17.         get_to_name(aux);
  18.  
  19.  
  20.         A Little further down, look for the "exists" section, and add the
  21.         marked lines.
  22.  
  23.       if (irt[0]!='½')                                          /* Add    */
  24.       {                                                         /* Add    */
  25.          sprintf(s,"%s%s",get_string(940),irt);                 /* Exists */
  26.          addline(b,s,&l1);                                      /* Exists */
  27.          if (irt_sub[0]) {                                      /* Exists */
  28.            sprintf(s,"%s%s", get_string(1509), irt_sub);        /* Exists */
  29.            addline(b,s,&l1);                                    /* Exists */
  30.          }                                                      /* Exists */
  31.       }                                                         /* Add    */
  32.       else                                                      /* Add    */
  33.         irt_name[0]=0;                                          /* Add    */
  34.  
  35.       if (irt_name[0] && !(strcmp(aux, "EMAIL"))) {             /* Exists */
  36.         sprintf(s,"%s%s",get_string(941),irt_name);             /* Exists */
  37.         addline(b,s,&l1);                                       /* Exists */
  38.       }                                                         /* Exists */
  39.       addline(b,"",&l1);                                        /* Exists */
  40.     }                                                           /* Exists */
  41.                                                                 /* Exists */
  42.     if (fsed) {                                                 /* Exists */
  43.  
  44.  
  45.  
  46.  
  47.  
  48. Add this function at the end of the file.
  49.  
  50. void get_to_name(char *aux)
  51. {
  52.     char s[80];
  53.     int i;
  54.     xtrasubsnetrec *xnp;
  55.     if (xsubs[curlsub].num_nets)
  56.     {
  57.         for (i=0; i<xsubs[curlsub].num_nets; i++)
  58.         {
  59.             xnp=&xsubs[curlsub].nets[i];
  60.             if ((net_networks[xnp->net_num].type) && strcmp(aux, "EMAIL"))
  61.             {
  62.                 npr("1Who Should This Message Be Addressed To? ([ENTER] for All)\r\n");
  63.                 mpl(40);
  64.                 inputl(s,40);
  65.                 if (s[0]==0)
  66.                   strcpy(irt_name,"ALL");
  67.                 else
  68.                   strcpy(irt_name,s);
  69.                 strcpy(irt,"½");
  70.             }
  71.         }
  72.     }
  73. }
  74.  
  75. Don't forget to prototype get_to_name in FCNS.H.  You'll have
  76. to recompile the whole BBS, but it should work just fine.
  77.