home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / MODS / ALLMODS.ZIP / FMD-16A.ZIP / FMD-16A.MOD
Encoding:
Text File  |  1995-06-09  |  6.5 KB  |  229 lines

  1. Nicolas Leblanc #2 @20302
  2. Tue Jun 06 02:03:57 1995
  3. 0R 34 06/09 07:13 WWIVNET 4051->8421
  4. 0R 34 06/08 18:18 WWIVNet 4001->4051
  5. 0R 34 06/08 14:07 WWIVnet 4000->4001
  6. 0R 34 06/08 05:34 WWIVnet ->4000
  7. 0R 34 06/07 01:09 WWIVnet 4001->4000
  8. 0R 34 06/07 07:32 WWIVnet 20001->4001
  9. 0R 34 06/06 02:14 WWIVnet 20302->20001
  10. 0R 34 06/06 02:10 WWIVnet ->20302
  11.  
  12.    ┌┬─── ──  ─   ─  ── ───────────────────────────────────────────────────┬─ ∙∙
  13.    ││                    Alternative Worlds Presents                      │
  14.    └┼─────────────────────────────────────────────────────────────────────┐
  15.    ││ Mod Name       » FMD-16a.MOD                                        │∙
  16.    ││ Difficulty     » █▒▒▒▒▒▒▒▒▒▒ (1/10)                                 │:
  17.    ││ WWIV Version   » 4.24                                               ││
  18.    ││ Date Affected  » 06/01/95                                           ││
  19.    :│ Files Affected » SR.C                                               ││
  20.    ∙│ Description    » Enhance The Display of Protocols                   ││
  21.     └─────────────────────────────────────────────────────────────────────┼┐
  22.     │       A French Mod Division Release - (C) 1995 FMD Software         ││
  23. ∙∙ ─┴─────────────────────────────────────────────────── ──  ─   ─  ── ───└┘
  24.  
  25.  ┌┬══════════════════┐
  26.  ││ Long Description ││
  27.   └══════════════════┴┘
  28.  
  29.   Enhance your display of file protocols. This modification will not only
  30. show the protocols in the way it should be listed, but it will show
  31. automatically the protocols if the user has no default protocols defined.
  32. (Coming from a Morgul modification). Update to SPOT019.MOD.
  33.  
  34. Should look like this:
  35.  
  36. 3Available Protocols :1
  37.  
  38. [QAbort Transfer(s)
  39. [0Don't Transfer
  40. [1ASCII
  41. [2Xmodem
  42. [XXmodem-CRC
  43. [YYmodem
  44. [BBatch
  45. [ZZmodem
  46. [HHS/Link
  47. 0
  48.  
  49.  ┌┬═══════┐
  50.  ││ Tests ││
  51.   └═══════┴┘
  52.  
  53.   This modification has been tested on a virgin WWIV v4.24 source using
  54.   Borland C++ v4.5
  55.  
  56. ──────────────────────────────────────────────────────────────────────────────
  57.                                    Legend
  58.                           ╔═══╤══════════════════┐
  59.                           │ + │ Add This Line    │
  60.                           │ - │ Delete This Line │
  61.                           │ * │ Modify This Line │
  62.                           │ = │ Existing Line    │
  63.                           └═══╧══════════════════╝
  64. ───[Step 1]────────────────────────────────────────────────────────────────────
  65.  
  66. **Load SR.C and replace the following function.
  67.  
  68.  
  69. int get_protocol(xfertype xt)
  70. {
  71.   char s[81],s1[81],oks[81],ch,oks1[81],*ss,ch1,fl[80];
  72.   int i,i1,prot,maxprot,done,only,oks1p,c1;
  73.  
  74.   if (ok_prot(thisuser.defprot, xt))
  75.     prot=thisuser.defprot;
  76.   else
  77.     prot=0;
  78.  
  79.   c1=thisuser.colors[8];
  80.   thisuser.colors[8]=1;
  81.   oks1p=0;
  82.   oks1[0]=0;
  83.   strcpy(oks,"Q?0");
  84.   i1=strlen(oks);
  85.   only=0;
  86.   maxprot=5+numextrn;
  87.   for (i=1; i<=maxprot; i++)
  88.   {
  89.     fl[i]=0;
  90.     if (ok_prot(i,xt))
  91.     {
  92.       if (i<10)
  93.         oks[i1++]='0'+i;
  94.       else
  95.         oks[i1++]=BASE_CHAR+i-10;
  96.       if (only==0)
  97.         only=i;
  98.       else
  99.         only=-1;
  100.       if (i>=3) {
  101.         ch1=upcase(*prot_name(i));
  102.         if (strchr(oks1,ch1)==0)
  103.         {
  104.           oks1[oks1p++]=ch1;
  105.           oks1[oks1p]=0;
  106.           fl[i]=1;
  107.         }
  108.       }
  109.     }
  110.   }
  111.   oks[i1]=0;
  112.   strcat(oks,oks1);
  113.   if (only>0)
  114.     prot=only;
  115.  
  116.   if ((only==0) && (xt != xf_none))
  117.   {
  118.     nl();
  119.     pl(get_string(894));
  120.     nl();
  121.     return(-1);
  122.   }
  123.  
  124.   done=0;
  125.   if (prot)
  126.   {
  127.     ss=prot_name(prot);
  128.     sprintf(s,"%s%s) : ", get_string(895),ss);
  129.     strcpy(s1,oks);
  130.     strcat(s1,"\r");
  131.   } else {
  132.     strcpy(s,get_string(896));
  133.     strcpy(s1,oks);
  134.   }
  135.   if (!prot)
  136.   {
  137.     nl();
  138.     pl("3Available Protocols :1");
  139.     nl();
  140.     pl("8[7Q8] 1Abort Transfer(s)");
  141.     pl("8[708] 1Don't Transfer");
  142.     for (i=1; i<=maxprot; i++)
  143.     {
  144.       if (ok_prot(i,xt))
  145.       {
  146.         ch1=upcase(*prot_name(i));
  147.         if (fl[i]==0)
  148.           npr("8[7%c8] 1%s\r\n",(i<10)?(i+'0'):(i+BASE_CHAR-10),
  149.                prot_name(i));
  150.         else
  151.           npr("8[7%c8] 1%s\r\n",*prot_name(i), prot_name(i));
  152.       }
  153.     }
  154.     nl();
  155.   }
  156.   do
  157.   {
  158.     nl();
  159.     prt(7,s);
  160.     ch=onek(s1);
  161.     if (ch=='?')
  162.     {
  163.       nl();
  164.       pl("4Available Protocols :1");
  165.       nl();
  166.       pl("8[7Q8] 1Abort Transfer(s)");
  167.       pl("8[708] 1Don't Transfer");
  168.       for (i=1; i<=maxprot; i++)
  169.       {
  170.         if (ok_prot(i,xt))
  171.         {
  172.           ch1=upcase(*prot_name(i));
  173.           if (fl[i]==0)
  174.             npr("8[7%c8] 1%s\r\n",(i<10)?(i+'0'):(i+BASE_CHAR-10),
  175.                  prot_name(i));
  176.           else
  177.             npr("8[7%c8] 1%s\r\n",*prot_name(i), prot_name(i));
  178.         }
  179.       }
  180.       nl();
  181.     } else
  182.       done=1;
  183.   } while ((!done) && (!hangup));
  184.   thisuser.colors[8]=c1;
  185.   if (ch==13)
  186.     return(prot);
  187.   if ((ch>='0') && (ch<='9'))
  188.     return(ch-'0');
  189.   else {
  190.     if (ch=='Q')
  191.       return(-1);
  192.     else {
  193.       i1=ch-BASE_CHAR+10;
  194.       if (i1<numextrn+6)
  195.         return(ch-BASE_CHAR+10);
  196.       for (i=3; i<numextrn+6; i++)
  197.       {
  198.         if (upcase(*prot_name(i))==ch)
  199.           return(i);
  200.       }
  201.     }
  202.   }
  203.   return(-1);
  204. }
  205.  
  206. ───[Step 2]────────────────────────────────────────────────────────────────────
  207.  
  208.  
  209. Just compile back your source and enjoy the change. A nice and easy
  210. modification once again to enhance your bulletin board.
  211.  
  212. French Proverb: Qui aime bien, châtie bien.
  213.  
  214. For comments, bug report and suggestion, e-mail at the following address:
  215.  
  216. Nicolas LeBlanc  2@20302.WWIVnet (aka Spotnick)
  217.                  -> spotnick@gamemaster.qc.ca
  218. Martin Bourdages 242@20306 / 3@20302.WWIVnet (aka Dark Shadow)
  219.                  -> martin.bourdages@radio.magicnet.com
  220.  
  221.                  =>   French Mod Division Support Sub   <=
  222.                                 SubType: FMD
  223.                            Host: @20302 (WWIVnet)
  224.                       Scan sublist for other networks
  225.  
  226.         Read PRODUCTS.FMD for the full list of our support systems.
  227.  
  228. ───[EOF]──────────────────────────────────────────────────────────────────────
  229.