home *** CD-ROM | disk | FTP | other *** search
-
- ┌┬─── ── ─ ─ ── ───────────────────────────────────────────────────┬─ ∙∙
- ││ Alternative Worlds Presents │
- └┼─────────────────────────────────────────────────────────────────────┐
- ││ Mod Name » FMD-43.MOD │∙
- ││ Difficulty » █▒▒▒▒▒▒▒▒▒▒ (1/10) │:
- ││ WWIV Version » 4.24 ││
- ││ Date Affected » 06/03/95 ││
- :│ Files Affected » MSGBASE.C / NETSUP.C / SYSOPF.C ││
- ∙│ Description » More Precise Regions (The Region Mod) ││
- └─────────────────────────────────────────────────────────────────────┼┐
- │ A French Mod Division Release - (C) 1995 FMD Software ││
- ∙∙ ─┴─────────────────────────────────────────────────── ── ─ ─ ── ───└┘
-
- ┌┬══════════════════┐
- ││ Long Description ││
- └══════════════════┴┘
-
- This modification will allow you to have a very accurate system location,
- this will determine from where is a post, or where is located a network system
- evaluating the exchange code. This files requires that you download the file
- REGIONS!.ZIP that can be found on many systems. The source of this file is
- the Sandbox ][, 704-480-0456 (SysOp: Sandman 1@6050 on WWIVnet)
-
- This modification is not originally by us, the one we used to use is done
- by Sandman, as REGIONS.423, but we found that his code needed to be optimized
- a little and updated, and we think that this is much easier to install. All
- the credits goes to the author of the original, we in fact, just worked a bit
- with his code.
-
- ┌┬═══════┐
- ││ Tests ││
- └═══════┴┘
-
- This modification has been tested on a virgin WWIV v4.24 source using
- Borland C++ v4.0
-
- ──────────────────────────────────────────────────────────────────────────────
- Legend
- ╔═══╤══════════════════┐
- │ + │ Add This Line │
- │ - │ Delete This Line │
- │ * │ Modify This Line │
- │ = │ Existing Line │
- └═══╧══════════════════╝
- ───[Step 1]────────────────────────────────────────────────────────────────────
-
- Load MSGBASE.C and do the following modifications at the top:
-
- = #include <mem.h>
- = #include <errno.h>
- = #include <io.h>
- + #include <ctype.h>
- = #include "subxtr.h"
- =
- = int hasrip=0;
-
- Then just a little lower, replace the following 2 functions:
-
- void describe_area_code(char *areacode, char *description)
- {
- int f,done=0,i;
- char ext[4];
- char s[81],*ss,*ss1, ac[81];
-
- strcpy(ac, areacode);
-
- for (i=0;i<=2;i++)
- ext[i]=ac[i+4];
-
- ext[3]=0;
- ac[3]=0;
- description[0]=0;
-
- memset(s,0,sizeof(s));
- sprintf(s, "REGION\\REGIONS.%s", ac);
- f=sh_open1(s,O_RDWR | O_TEXT);
- if (f<1)
- return;
- ss=malloca(filelength(f));
- i=read(f,ss,filelength(f));
- ss[i]=0;
- sh_close(f);
- ss1=strtok(ss,"\n");
- while (ss1 && (!done)) {
- if (isdigit(ss1[0])) {
- if (strcmp(ss1,ext)==0)
- done=1;
- } else
- strcpy(description,ss1);
- ss1=strtok(NULL,"\n");
- }
- farfree(ss);
- }
-
- void setorigin(int sysnum, int usernum)
- {
- int i;
- char acode[8];
- char s[81],s1[81],st[12],ch;
- net_system_list_rec *csne;
-
- if (net_num_max>1)
- sprintf(s1,"%s - ",net_networks[net_num].name);
- else
- s1[0]=0;
-
- origin_str[0]=0;
- origin_str2[0]=0;
-
- if (sysnum && (net_type == net_type_wwivnet)) {
- csne=next_system(sysnum);
- if (csne) {
- strcpy(st,"");
- if (usernum==1) {
- if (csne->other & other_net_coord)
- strcpy(st,get_string(1189));
- else if (csne->other & other_group_coord)
- sprintf(st,"{GC%d}",csne->group);
- else if (csne->other & other_coordinator)
- strcpy(st,get_string(1190));
- }
- strncpy(acode,csne->phone,7);
- acode[7]=0;
- describe_area_code(acode,s);
- if (s[0]) {
- sprintf(origin_str,"%s%s [%s] %s",s1,csne->name,csne->phone,st);
- strcpy(origin_str2,s);
- } else {
- sprintf(origin_str,"%s%s [%s] %s",s1,csne->name,csne->phone,st);
- strcpy(origin_str2,get_string(1007));
- }
- } else {
- strcpy(origin_str,s1);
- strcat(origin_str,get_string(622));
- strcpy(origin_str2,get_string(1007));
- }
- }
- }
-
- ───[Step 2]────────────────────────────────────────────────────────────────────
-
- Load NETSUP.C and do the following change to function do_callout:
-
- = npr("%s ",net_name);
- = npr("@%u",sn);
- = nl();
- * describe_area_code(csne->phone,s1); // removed the atoi stuff
- = npr("%s%s",get_string(999),s1);
- = nl();
- = if ((i2!=-1) && (net_networks[net_num].ncn[i2].bytes_waiting)) {
-
- ───[Step 3]────────────────────────────────────────────────────────────────────
-
- Load SYSOPF.C and do the following modification to print_net_listing:
-
- = pla(get_string(1304),&abort);
- = } else {
- = if ((useregion) && (strncmp(s,csne.phone,3)!=0)) {
- = strcpy(s,csne.phone);
- * describe_area_code(csne.phone,s3); // removed the atoi stuff
- = sprintf(s4,"\r\n%s%s\r\n",get_string(1305),s3);
- = pla(s4,&abort);
- = pla(get_string(1303),&abort);
- = pla(get_string(1304),&abort);
- = }
-
-
- ───[Step 4]────────────────────────────────────────────────────────────────────
-
- Go to your main WWIV dir, create a directory called "REGION", and unzip the
- file REGIONS!.ZIP into that directory.
-
- ───[Step 5]────────────────────────────────────────────────────────────────────
-
- Do a MAKE FCNS and compile back the BBS, you are ready to enjoy a very
- simple modification that gives you a lot more information.
-
- French Proverb: Bon chien chasse de race
-
- For comments, bug report and suggestion, e-mail at the following address:
-
- Nicolas LeBlanc 2@20302.WWIVnet (aka Spotnick)
- -> spotnick@gamemaster.qc.ca
- Martin Bourdages 242@20306 / 3@20302.WWIVnet (aka Dark Shadow)
- -> martin.bourdages@radio.magicnet.com
-
- => French Mod Division Support Sub <=
- SubType: FMD
- Host: @20302 (WWIVnet)
- Scan sublist for other networks
-
- Read PRODUCTS.FMD for the full list of our support systems.
-
- ───[EOF]──────────────────────────────────────────────────────────────────────
-