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,7 +470,8 @@ 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.available) {
for (i = 0; i < 6; i++) {
if (fidonet.zone[i]) {
want->zone = fidonet.zone[0];
want->net = 0;
@ -483,6 +484,8 @@ void gold_akamatch(FILE *fp)
tidy_faddr(ta);
}
}
}
}
free(want);
fprintf(fp, ";\n");
@ -494,11 +497,13 @@ 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) {
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");
fprintf(fp, "LOOKUPECHO NO\n");