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

  1.  
  2.    ┌┬─── ──  ─     ─  ── ───────────────────────────────────────────────────┬─ ∙∙
  3.    ││             Alternative Worlds Presents              │
  4.    └┼─────────────────────────────────────────────────────────────────────┐
  5.    ││ Mod Name       » FMD-43.MOD                                         │∙
  6.    ││ Difficulty     » █▒▒▒▒▒▒▒▒▒▒ (1/10)                                 │:
  7.    ││ WWIV Version   » 4.24                                               ││
  8.    ││ Date Affected  » 06/03/95                                           ││
  9.    :│ Files Affected » MSGBASE.C / NETSUP.C / SYSOPF.C                    ││
  10.    ∙│ Description    » More Precise Regions (The Region Mod)              ││
  11.     └─────────────────────────────────────────────────────────────────────┼┐
  12.     │       A French Mod Division Release - (C) 1995 FMD Software         ││
  13. ∙∙ ─┴─────────────────────────────────────────────────── ──  ─     ─  ── ───└┘
  14.  
  15.  ┌┬══════════════════┐
  16.  ││ Long Description ││
  17.   └══════════════════┴┘
  18.  
  19.    This modification will allow you to have a very accurate system location,
  20. this will determine from where is a post, or where is located a network system
  21. evaluating the exchange code. This files requires that you download the file
  22. REGIONS!.ZIP that can be found on many systems. The source of this file is
  23. the Sandbox ][, 704-480-0456 (SysOp: Sandman 1@6050 on WWIVnet)
  24.  
  25.   This modification is not originally by us, the one we used to use is done
  26. by Sandman, as REGIONS.423, but we found that his code needed to be optimized
  27. a little and updated, and we think that this is much easier to install. All
  28. the credits goes to the author of the original, we in fact, just worked a bit
  29. with his code.
  30.  
  31.  ┌┬═══════┐
  32.  ││ Tests ││
  33.   └═══════┴┘
  34.  
  35.   This modification has been tested on a virgin WWIV v4.24 source using
  36.   Borland C++ v4.0
  37.  
  38. ──────────────────────────────────────────────────────────────────────────────
  39.                    Legend
  40.               ╔═══╤══════════════════┐
  41.               │ + │ Add This Line     │
  42.               │ - │ Delete This Line │
  43.               │ * │ Modify This Line │
  44.               │ = │ Existing Line     │
  45.               └═══╧══════════════════╝
  46. ───[Step 1]────────────────────────────────────────────────────────────────────
  47.  
  48. Load MSGBASE.C and do the following modifications at the top:
  49.  
  50. = #include <mem.h>
  51. = #include <errno.h>
  52. = #include <io.h>
  53. + #include <ctype.h>
  54. = #include "subxtr.h"
  55. =
  56. = int hasrip=0;
  57.  
  58. Then just a little lower, replace the following 2 functions:
  59.  
  60. void describe_area_code(char *areacode, char *description)
  61. {
  62.   int f,done=0,i;
  63.   char ext[4];
  64.   char s[81],*ss,*ss1, ac[81];
  65.  
  66.   strcpy(ac, areacode);
  67.  
  68.   for (i=0;i<=2;i++)
  69.     ext[i]=ac[i+4];
  70.  
  71.   ext[3]=0;
  72.   ac[3]=0;
  73.   description[0]=0;
  74.  
  75.   memset(s,0,sizeof(s));
  76.   sprintf(s, "REGION\\REGIONS.%s", ac);
  77.   f=sh_open1(s,O_RDWR | O_TEXT);
  78.   if (f<1)
  79.     return;
  80.   ss=malloca(filelength(f));
  81.   i=read(f,ss,filelength(f));
  82.   ss[i]=0;
  83.   sh_close(f);
  84.   ss1=strtok(ss,"\n");
  85.   while (ss1 && (!done)) {
  86.     if (isdigit(ss1[0])) {
  87.       if (strcmp(ss1,ext)==0)
  88.         done=1;
  89.     } else
  90.       strcpy(description,ss1);
  91.     ss1=strtok(NULL,"\n");
  92.   }
  93.   farfree(ss);
  94. }
  95.  
  96. void setorigin(int sysnum, int usernum)
  97. {
  98.   int i;
  99.   char acode[8];
  100.   char s[81],s1[81],st[12],ch;
  101.   net_system_list_rec *csne;
  102.  
  103.   if (net_num_max>1)
  104.     sprintf(s1,"%s - ",net_networks[net_num].name);
  105.   else
  106.     s1[0]=0;
  107.  
  108.   origin_str[0]=0;
  109.   origin_str2[0]=0;
  110.  
  111.   if (sysnum && (net_type == net_type_wwivnet)) {
  112.     csne=next_system(sysnum);
  113.     if (csne) {
  114.       strcpy(st,"");
  115.       if (usernum==1) {
  116.         if (csne->other & other_net_coord)
  117.           strcpy(st,get_string(1189));
  118.         else if (csne->other & other_group_coord)
  119.           sprintf(st,"{GC%d}",csne->group);
  120.         else if (csne->other & other_coordinator)
  121.           strcpy(st,get_string(1190));
  122.       }
  123.       strncpy(acode,csne->phone,7);
  124.       acode[7]=0;
  125.       describe_area_code(acode,s);
  126.       if (s[0]) {
  127.         sprintf(origin_str,"%s%s [%s] %s",s1,csne->name,csne->phone,st);
  128.         strcpy(origin_str2,s);
  129.       } else {
  130.         sprintf(origin_str,"%s%s [%s] %s",s1,csne->name,csne->phone,st);
  131.         strcpy(origin_str2,get_string(1007));
  132.       }
  133.     } else {
  134.       strcpy(origin_str,s1);
  135.       strcat(origin_str,get_string(622));
  136.       strcpy(origin_str2,get_string(1007));
  137.     }
  138.   }
  139. }
  140.  
  141. ───[Step 2]────────────────────────────────────────────────────────────────────
  142.  
  143. Load NETSUP.C and do the following change to function do_callout:
  144.  
  145. =          npr("%s ",net_name);
  146. =        npr("@%u",sn);
  147. =        nl();
  148. *        describe_area_code(csne->phone,s1); // removed the atoi stuff
  149. =        npr("%s%s",get_string(999),s1);
  150. =        nl();
  151. =        if ((i2!=-1) && (net_networks[net_num].ncn[i2].bytes_waiting)) {
  152.  
  153. ───[Step 3]────────────────────────────────────────────────────────────────────
  154.  
  155. Load SYSOPF.C and do the following modification to print_net_listing:
  156.  
  157. =          pla(get_string(1304),&abort);
  158. =        } else {
  159. =          if ((useregion) && (strncmp(s,csne.phone,3)!=0)) {
  160. =            strcpy(s,csne.phone);
  161. *            describe_area_code(csne.phone,s3); // removed the atoi stuff
  162. =            sprintf(s4,"\r\n%s%s\r\n",get_string(1305),s3);
  163. =            pla(s4,&abort);
  164. =            pla(get_string(1303),&abort);
  165. =            pla(get_string(1304),&abort);
  166. =          }
  167.  
  168.  
  169. ───[Step 4]────────────────────────────────────────────────────────────────────
  170.  
  171. Go to your main WWIV dir, create a directory called "REGION", and unzip the
  172. file REGIONS!.ZIP into that directory.
  173.  
  174. ───[Step 5]────────────────────────────────────────────────────────────────────
  175.  
  176. Do a MAKE FCNS and compile back the BBS, you are ready to enjoy a very
  177. simple modification that gives you a lot more information.
  178.  
  179. French Proverb: Bon chien chasse de race
  180.  
  181. For comments, bug report and suggestion, e-mail at the following address:
  182.  
  183. Nicolas LeBlanc  2@20302.WWIVnet (aka Spotnick)
  184.                  -> spotnick@gamemaster.qc.ca
  185. Martin Bourdages 242@20306 / 3@20302.WWIVnet (aka Dark Shadow)
  186.                  -> martin.bourdages@radio.magicnet.com
  187.  
  188.                  =>   French Mod Division Support Sub   <=
  189.                                 SubType: FMD
  190.                            Host: @20302 (WWIVnet)
  191.                       Scan sublist for other networks
  192.  
  193.         Read PRODUCTS.FMD for the full list of our support systems.
  194.  
  195. ───[EOF]──────────────────────────────────────────────────────────────────────
  196.