Code cleanup for nodelist processing

This commit is contained in:
Michiel Broek 2004-07-10 14:16:21 +00:00
parent 89efacbf9d
commit 74e6c0db1b
2 changed files with 22 additions and 15 deletions

View File

@ -46,6 +46,8 @@ v0.61.1 20-Jun-2004.
displayed stays around the last area.
If a message area is deleted and a rulefile is present, this
rulefile is deleted too.
When a new golded.inc file is written, only fidonet records
that are active are written.
v0.61.0 06-Jun-2004 - 20-Jun-2004

View File

@ -470,18 +470,21 @@ void gold_akamatch(FILE *fp)
fread(&fidonethdr, sizeof(fidonethdr), 1, fido);
while ((fread(&fidonet, fidonethdr.recsize, 1, fido)) == 1) {
for (i = 0; i < 6; i++)
if (fidonet.zone[i]) {
want->zone = fidonet.zone[0];
want->net = 0;
want->node = 0;
want->point = 0;
want->name = NULL;
want->domain = NULL;
ta = bestaka_s(want);
fprintf(fp, "AKAMATCH %d:* %s\n", fidonet.zone[i], ascfnode(ta, 0xf));
tidy_faddr(ta);
if (fidonet.available) {
for (i = 0; i < 6; i++) {
if (fidonet.zone[i]) {
want->zone = fidonet.zone[0];
want->net = 0;
want->node = 0;
want->point = 0;
want->name = NULL;
want->domain = NULL;
ta = bestaka_s(want);
fprintf(fp, "AKAMATCH %d:* %s\n", fidonet.zone[i], ascfnode(ta, 0xf));
tidy_faddr(ta);
}
}
}
}
free(want);
@ -494,10 +497,12 @@ void gold_akamatch(FILE *fp)
fprintf(fp, "NODEPATH %s/\n", CFG.nodelists);
fseek(fido, fidonethdr.hdrsize, SEEK_SET);
while ((fread(&fidonet, fidonethdr.recsize, 1, fido)) == 1) {
fprintf(fp, "NODELIST %s.*\n", fidonet.nodelist);
for (i = 0; i < 6; i++)
if (strlen(fidonet.seclist[i].nodelist) || fidonet.seclist[i].zone)
fprintf(fp, "NODELIST %s.*\n", fidonet.seclist[i].nodelist);
if (fidonet.available) {
fprintf(fp, "NODELIST %s.*\n", fidonet.nodelist);
for (i = 0; i < 6; i++)
if (strlen(fidonet.seclist[i].nodelist) || fidonet.seclist[i].zone)
fprintf(fp, "NODELIST %s.*\n", fidonet.seclist[i].nodelist);
}
}
// fprintf(fp, "USERLIST golded.lst\n");
fprintf(fp, "LOOKUPNET YES\n");