2001-08-17 05:46:24 +00:00
|
|
|
/*****************************************************************************
|
|
|
|
*
|
2001-11-14 21:37:58 +00:00
|
|
|
* $Id$
|
2001-08-17 05:46:24 +00:00
|
|
|
* Purpose ...............: Nodes Setup Program
|
|
|
|
*
|
|
|
|
*****************************************************************************
|
2006-01-28 15:12:25 +00:00
|
|
|
* Copyright (C) 1997-2006
|
2001-08-17 05:46:24 +00:00
|
|
|
*
|
|
|
|
* Michiel Broek FIDO: 2:280/2802
|
|
|
|
* Beekmansbos 10
|
|
|
|
* 1971 BV IJmuiden
|
|
|
|
* the Netherlands
|
|
|
|
*
|
|
|
|
* This file is part of MBSE BBS.
|
|
|
|
*
|
|
|
|
* This BBS is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License as published by the
|
|
|
|
* Free Software Foundation; either version 2, or (at your option) any
|
|
|
|
* later version.
|
|
|
|
*
|
|
|
|
* MB BBS is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with MB BBS; see the file COPYING. If not, write to the Free
|
2003-08-15 20:05:34 +00:00
|
|
|
* Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
2001-08-17 05:46:24 +00:00
|
|
|
*****************************************************************************/
|
|
|
|
|
2002-06-30 12:48:44 +00:00
|
|
|
#include "../config.h"
|
2004-02-21 17:22:00 +00:00
|
|
|
#include "../lib/mbselib.h"
|
2001-08-17 05:46:24 +00:00
|
|
|
#include "screen.h"
|
|
|
|
#include "mutil.h"
|
|
|
|
#include "ledit.h"
|
|
|
|
#include "grlist.h"
|
|
|
|
#include "stlist.h"
|
|
|
|
#include "m_global.h"
|
|
|
|
#include "m_lang.h"
|
|
|
|
#include "m_ticarea.h"
|
|
|
|
#include "m_marea.h"
|
|
|
|
#include "m_node.h"
|
|
|
|
|
|
|
|
|
|
|
|
int NodeUpdated = 0;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Count nr of nodes records in the database.
|
|
|
|
* Creates the database if it doesn't exist.
|
|
|
|
*/
|
|
|
|
int CountNoderec(void)
|
|
|
|
{
|
2002-07-13 15:10:00 +00:00
|
|
|
FILE *fil;
|
|
|
|
char ffile[PATH_MAX];
|
|
|
|
int count;
|
|
|
|
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(ffile, PATH_MAX, "%s/etc/nodes.data", getenv("MBSE_ROOT"));
|
2002-07-13 15:10:00 +00:00
|
|
|
if ((fil = fopen(ffile, "r")) == NULL) {
|
|
|
|
if ((fil = fopen(ffile, "a+")) != NULL) {
|
|
|
|
Syslog('+', "Created new %s", ffile);
|
|
|
|
nodeshdr.hdrsize = sizeof(nodeshdr);
|
|
|
|
nodeshdr.recsize = sizeof(nodes);
|
|
|
|
nodeshdr.filegrp = CFG.tic_groups * 13;
|
|
|
|
nodeshdr.mailgrp = CFG.toss_groups * 13;
|
|
|
|
fwrite(&nodeshdr, sizeof(nodeshdr), 1, fil);
|
|
|
|
fclose(fil);
|
|
|
|
chmod(ffile, 0640);
|
|
|
|
return 0;
|
|
|
|
} else
|
|
|
|
return -1;
|
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2002-07-13 15:10:00 +00:00
|
|
|
fread(&nodeshdr, sizeof(nodeshdr), 1, fil);
|
|
|
|
fseek(fil, 0, SEEK_SET);
|
|
|
|
fread(&nodeshdr, nodeshdr.hdrsize, 1, fil);
|
|
|
|
fseek(fil, 0, SEEK_END);
|
|
|
|
count = (ftell(fil) - nodeshdr.hdrsize) / (nodeshdr.recsize + nodeshdr.filegrp + nodeshdr.mailgrp);
|
|
|
|
fclose(fil);
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2002-07-13 15:10:00 +00:00
|
|
|
return count;
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Open database for editing. The datafile is copied, if the format
|
|
|
|
* is changed it will be converted on the fly. All editing must be
|
|
|
|
* done on the copied file.
|
|
|
|
*/
|
|
|
|
int OpenNoderec(void)
|
|
|
|
{
|
2002-07-13 15:10:00 +00:00
|
|
|
FILE *fin, *fout;
|
|
|
|
char *fnin, *fnout, group[13];
|
|
|
|
int i, old_fgroups, old_mgroups;
|
2005-10-11 20:49:41 +00:00
|
|
|
int oldsize, oldfilegrp, oldmailgrp;
|
2002-07-13 15:10:00 +00:00
|
|
|
|
|
|
|
fnin = calloc(PATH_MAX, sizeof(char));
|
|
|
|
fnout = calloc(PATH_MAX, sizeof(char));
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(fnin, PATH_MAX, "%s/etc/nodes.data", getenv("MBSE_ROOT"));
|
|
|
|
snprintf(fnout, PATH_MAX, "%s/etc/nodes.temp", getenv("MBSE_ROOT"));
|
2002-07-13 15:10:00 +00:00
|
|
|
|
|
|
|
if ((fin = fopen(fnin, "r")) != NULL) {
|
|
|
|
if ((fout = fopen(fnout, "w")) != NULL) {
|
|
|
|
NodeUpdated = 0;
|
|
|
|
fread(&nodeshdr, sizeof(nodeshdr), 1, fin);
|
|
|
|
fseek(fin, 0, SEEK_SET);
|
|
|
|
fread(&nodeshdr, nodeshdr.hdrsize, 1, fin);
|
|
|
|
if (nodeshdr.hdrsize != sizeof(nodeshdr)) {
|
|
|
|
nodeshdr.hdrsize = sizeof(nodeshdr);
|
|
|
|
nodeshdr.lastupd = time(NULL);
|
|
|
|
NodeUpdated = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* In case we are automatic upgrading the data format
|
|
|
|
* we save the old format. If it is changed, the
|
|
|
|
* database must always be updated.
|
|
|
|
*/
|
|
|
|
oldsize = nodeshdr.recsize;
|
|
|
|
oldfilegrp = nodeshdr.filegrp;
|
|
|
|
oldmailgrp = nodeshdr.mailgrp;
|
|
|
|
old_fgroups = oldfilegrp / 13;
|
|
|
|
old_mgroups = oldmailgrp / 13;
|
|
|
|
if ((oldsize != sizeof(nodes) || (CFG.tic_groups != old_fgroups) || (CFG.toss_groups != old_mgroups))) {
|
|
|
|
NodeUpdated = 1;
|
|
|
|
if (oldsize != sizeof(nodes))
|
|
|
|
Syslog('+', "Upgraded %s, format changed", fnin);
|
|
|
|
else if (CFG.tic_groups != old_fgroups)
|
|
|
|
Syslog('+', "Upgraded %s, nr of tic groups is now %d", fnin, CFG.tic_groups);
|
|
|
|
else if (CFG.toss_groups != old_mgroups)
|
|
|
|
Syslog('+', "Upgraded %s, nr of mail groups is now %d", fnin, CFG.toss_groups);
|
|
|
|
}
|
|
|
|
nodeshdr.hdrsize = sizeof(nodeshdr);
|
|
|
|
nodeshdr.recsize = sizeof(nodes);
|
|
|
|
nodeshdr.filegrp = CFG.tic_groups * 13;
|
|
|
|
nodeshdr.mailgrp = CFG.toss_groups * 13;
|
|
|
|
fwrite(&nodeshdr, sizeof(nodeshdr), 1, fout);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The datarecord is filled with zero's before each read,
|
|
|
|
* so if the format changed, the new fields will be empty.
|
|
|
|
*/
|
|
|
|
memset(&nodes, 0, sizeof(nodes));
|
|
|
|
while (fread(&nodes, oldsize, 1, fin) == 1) {
|
|
|
|
if (oldsize != sizeof(nodes)) {
|
2002-09-28 22:18:49 +00:00
|
|
|
if (strlen(nodes.Spasswd) == 0)
|
|
|
|
strcpy(nodes.Spasswd, nodes.Epasswd);
|
|
|
|
if (nodes.Security.level == 0) {
|
|
|
|
/*
|
|
|
|
* Level is not used, here it is used to mark
|
|
|
|
* the upgrade to default.
|
|
|
|
*/
|
|
|
|
nodes.Security.level = 1;
|
|
|
|
nodes.Security.flags = 1;
|
|
|
|
}
|
2002-07-13 15:10:00 +00:00
|
|
|
}
|
|
|
|
fwrite(&nodes, sizeof(nodes), 1, fout);
|
|
|
|
memset(&nodes, 0, sizeof(nodes));
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copy the existing file groups
|
|
|
|
*/
|
|
|
|
for (i = 1; i <= old_fgroups; i++) {
|
|
|
|
fread(&group, 13, 1, fin);
|
|
|
|
if (i <= CFG.tic_groups)
|
|
|
|
fwrite(&group, 13, 1, fout);
|
|
|
|
}
|
|
|
|
if (old_fgroups < CFG.tic_groups) {
|
|
|
|
/*
|
|
|
|
* The size increased, fill with blank records
|
|
|
|
*/
|
|
|
|
memset(&group, 0, 13);
|
|
|
|
for (i = (old_fgroups + 1); i <= CFG.tic_groups; i++)
|
|
|
|
fwrite(&group, 13, 1, fout);
|
|
|
|
}
|
|
|
|
/*
|
|
|
|
* Copy the existing mail groups
|
|
|
|
*/
|
|
|
|
for (i = 1; i <= old_mgroups; i++) {
|
|
|
|
fread(&group, 13, 1, fin);
|
|
|
|
if (i <= CFG.toss_groups)
|
|
|
|
fwrite(&group, 13, 1, fout);
|
|
|
|
}
|
|
|
|
if (old_mgroups < CFG.toss_groups) {
|
|
|
|
memset(&group, 0, 13);
|
|
|
|
for (i = (old_mgroups + 1); i <= CFG.toss_groups; i++)
|
|
|
|
fwrite(&group, 13, 1, fout);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fclose(fin);
|
|
|
|
fclose(fout);
|
|
|
|
free(fnin);
|
|
|
|
free(fnout);
|
|
|
|
return 0;
|
|
|
|
} else
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
free(fnin);
|
|
|
|
free(fnout);
|
|
|
|
return -1;
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void CloseNoderec(int Force)
|
|
|
|
{
|
2002-07-13 15:10:00 +00:00
|
|
|
char *fin, *fout, group[13];
|
|
|
|
FILE *fi, *fo;
|
|
|
|
int i;
|
|
|
|
st_list *nod = NULL, *tmp;
|
2005-10-11 20:49:41 +00:00
|
|
|
unsigned int crc1, crc2;
|
2002-07-13 15:10:00 +00:00
|
|
|
|
|
|
|
fin = calloc(PATH_MAX, sizeof(char));
|
|
|
|
fout = calloc(PATH_MAX, sizeof(char));
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(fin, PATH_MAX, "%s/etc/nodes.data", getenv("MBSE_ROOT"));
|
|
|
|
snprintf(fout, PATH_MAX, "%s/etc/nodes.temp", getenv("MBSE_ROOT"));
|
2002-07-13 15:10:00 +00:00
|
|
|
|
|
|
|
if (NodeUpdated == 1) {
|
|
|
|
if (Force || (yes_no((char *)"Nodes database is changed, save changes") == 1)) {
|
|
|
|
working(1, 0, 0);
|
|
|
|
fi = fopen(fout, "r");
|
|
|
|
fo = fopen(fin, "w");
|
|
|
|
fread(&nodeshdr, nodeshdr.hdrsize, 1, fi);
|
|
|
|
fwrite(&nodeshdr, nodeshdr.hdrsize, 1, fo);
|
|
|
|
|
|
|
|
while (fread(&nodes, nodeshdr.recsize, 1, fi) == 1) {
|
|
|
|
if (!nodes.Deleted)
|
|
|
|
fill_stlist(&nod, nodes.Sysop, ftell(fi) - nodeshdr.recsize);
|
2004-06-18 19:54:13 +00:00
|
|
|
else {
|
|
|
|
/*
|
|
|
|
* Remove obsolete paths
|
|
|
|
*/
|
|
|
|
unlink(nodes.Dir_out_path);
|
|
|
|
unlink(nodes.Dir_in_path);
|
|
|
|
unlink(nodes.OutBox);
|
|
|
|
}
|
2002-07-13 15:10:00 +00:00
|
|
|
fseek(fi, nodeshdr.filegrp + nodeshdr.mailgrp, SEEK_CUR);
|
|
|
|
}
|
|
|
|
sort_stlist(&nod);
|
|
|
|
|
|
|
|
crc1 = crc2 = 0xffffffff;
|
|
|
|
for (tmp = nod; tmp; tmp = tmp->next) {
|
|
|
|
fseek(fi, tmp->pos, SEEK_SET);
|
|
|
|
fread(&nodes, nodeshdr.recsize, 1, fi);
|
|
|
|
crc2 = upd_crc32((char *)&nodes, crc2, 100);
|
|
|
|
if (crc2 == crc1)
|
|
|
|
WriteError("Removing double noderecord %s %s", nodes.Sysop, aka2str(nodes.Aka[0]));
|
|
|
|
else {
|
|
|
|
fwrite(&nodes, nodeshdr.recsize, 1, fo);
|
|
|
|
for (i = 0; i < ((nodeshdr.filegrp + nodeshdr.mailgrp) / sizeof(group)); i++) {
|
|
|
|
fread(&group, sizeof(group), 1, fi);
|
|
|
|
fwrite(&group, sizeof(group), 1, fo);
|
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
2002-07-13 15:10:00 +00:00
|
|
|
crc1 = crc2;
|
|
|
|
crc2 = 0xffffffff;
|
|
|
|
}
|
|
|
|
|
|
|
|
tidy_stlist(&nod);
|
|
|
|
fclose(fi);
|
|
|
|
fclose(fo);
|
|
|
|
unlink(fout);
|
|
|
|
chmod(fin, 0640);
|
|
|
|
free(fin);
|
|
|
|
free(fout);
|
|
|
|
Syslog('+', "Updated \"nodes.data\"");
|
2004-03-20 23:00:22 +00:00
|
|
|
disk_reset();
|
2002-07-13 15:10:00 +00:00
|
|
|
CreateSema((char *)"scanout");
|
2004-02-05 21:05:31 +00:00
|
|
|
working(6, 0, 0);
|
2002-07-13 15:10:00 +00:00
|
|
|
return;
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
2002-07-13 15:10:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
chmod(fin, 0640);
|
2003-12-04 22:07:33 +00:00
|
|
|
unlink(fout);
|
2002-07-13 15:10:00 +00:00
|
|
|
working(1, 0, 0);
|
|
|
|
free(fin);
|
|
|
|
free(fout);
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int AppendNoderec(void);
|
|
|
|
int AppendNoderec(void)
|
|
|
|
{
|
2002-07-13 15:10:00 +00:00
|
|
|
FILE *fil;
|
|
|
|
char *ffile, group[13];
|
|
|
|
int i;
|
|
|
|
|
|
|
|
ffile = calloc(PATH_MAX, sizeof(char));
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(ffile, PATH_MAX, "%s/etc/nodes.temp", getenv("MBSE_ROOT"));
|
2002-07-13 15:10:00 +00:00
|
|
|
|
|
|
|
if ((fil = fopen(ffile, "a")) != NULL) {
|
|
|
|
memset(&nodes, 0, sizeof(nodes));
|
|
|
|
/*
|
|
|
|
* Fill in the defaults
|
|
|
|
*/
|
|
|
|
nodes.Tic = TRUE;
|
|
|
|
nodes.Notify = FALSE;
|
|
|
|
nodes.AdvTic = FALSE;
|
|
|
|
nodes.Hold = TRUE;
|
2002-11-03 19:32:29 +00:00
|
|
|
nodes.PackNetmail = TRUE;
|
2002-07-13 15:10:00 +00:00
|
|
|
nodes.ARCmailCompat = TRUE;
|
|
|
|
nodes.ARCmailAlpha = TRUE;
|
|
|
|
nodes.StartDate = time(NULL);
|
2002-09-28 22:18:49 +00:00
|
|
|
nodes.Security.level = 1;
|
|
|
|
nodes.Security.flags = 1;
|
2004-02-05 21:05:31 +00:00
|
|
|
nodes.Language = 'E';
|
2002-07-13 15:10:00 +00:00
|
|
|
fwrite(&nodes, sizeof(nodes), 1, fil);
|
|
|
|
memset(&group, 0, 13);
|
|
|
|
for (i = 1; i <= CFG.tic_groups; i++)
|
|
|
|
fwrite(&group, 13, 1, fil);
|
|
|
|
for (i = 1; i <= CFG.toss_groups; i++)
|
|
|
|
fwrite(&group, 13, 1, fil);
|
|
|
|
fclose(fil);
|
|
|
|
NodeUpdated = 1;
|
|
|
|
free(ffile);
|
|
|
|
return 0;
|
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2002-07-13 15:10:00 +00:00
|
|
|
free(ffile);
|
|
|
|
return -1;
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int GroupInNode(char *Group, int Mail)
|
|
|
|
{
|
2002-07-13 15:10:00 +00:00
|
|
|
char *temp, group[13];
|
|
|
|
FILE *no;
|
|
|
|
int i, groups, RetVal = 0;
|
|
|
|
|
|
|
|
temp = calloc(PATH_MAX, sizeof(char));
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(temp, PATH_MAX, "%s/etc/nodes.data", getenv("MBSE_ROOT"));
|
2002-07-13 15:10:00 +00:00
|
|
|
if ((no = fopen(temp, "r")) == NULL) {
|
|
|
|
free(temp);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
free(temp);
|
|
|
|
|
|
|
|
fread(&nodeshdr, sizeof(nodeshdr), 1, no);
|
|
|
|
fseek(no, 0, SEEK_SET);
|
|
|
|
fread(&nodeshdr, nodeshdr.hdrsize, 1, no);
|
|
|
|
|
|
|
|
while ((fread(&nodes, nodeshdr.recsize, 1, no)) == 1) {
|
|
|
|
groups = nodeshdr.filegrp / sizeof(group);
|
|
|
|
for (i = 0; i < groups; i++) {
|
|
|
|
fread(&group, sizeof(group), 1, no);
|
|
|
|
if (strlen(group) && !Mail) {
|
|
|
|
if (!strcmp(group, Group)) {
|
|
|
|
RetVal++;
|
|
|
|
Syslog('-', "File group %s found in node setup %s", Group, aka2str(nodes.Aka[0]));
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
2002-07-13 15:10:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
groups = nodeshdr.mailgrp / sizeof(group);
|
|
|
|
for (i = 0; i < groups; i++) {
|
|
|
|
fread(&group, sizeof(group), 1, no);
|
|
|
|
if (strlen(group) && Mail) {
|
|
|
|
if (!strcmp(group, Group)) {
|
|
|
|
RetVal++;
|
|
|
|
Syslog('-', "Mail group %s found in node setup %s", Group, aka2str(nodes.Aka[0]));
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
2002-07-13 15:10:00 +00:00
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
2002-07-13 15:10:00 +00:00
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2002-07-13 15:10:00 +00:00
|
|
|
fclose(no);
|
|
|
|
return RetVal;
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int CheckAka(fidoaddr);
|
|
|
|
int CheckAka(fidoaddr A)
|
|
|
|
{
|
2002-07-13 15:10:00 +00:00
|
|
|
int mcnt, tcnt;
|
|
|
|
|
|
|
|
working(1, 0, 0);
|
|
|
|
mcnt = NodeInMarea(A);
|
|
|
|
tcnt = NodeInTic(A);
|
|
|
|
if (mcnt || tcnt) {
|
|
|
|
errmsg((char *)"Error aka connected to %d message and/or %d tic areas", mcnt, tcnt);
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return FALSE;
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2004-08-12 14:21:02 +00:00
|
|
|
void E_UplMgr(void);
|
|
|
|
void E_UplMgr(void)
|
|
|
|
{
|
|
|
|
clr_index();
|
|
|
|
set_color(WHITE, BLACK);
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw( 5, 6, "7.10 EDIT NODE - UPLINK MANAGERS");
|
2004-08-12 14:21:02 +00:00
|
|
|
set_color(CYAN, BLACK);
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw( 7, 6, "1. Uplink AreaMgr program");
|
|
|
|
mbse_mvprintw( 8, 6, "2. Uplink AreaMgr password");
|
|
|
|
mbse_mvprintw( 9, 6, "3. Uplink AreaMgr is BBBS");
|
|
|
|
mbse_mvprintw(10, 6, "4. Uplink FileMgr program");
|
|
|
|
mbse_mvprintw(11, 6, "5. Uplink FileMgr password");
|
|
|
|
mbse_mvprintw(12, 6, "6. Uplink FileMgr is BBBS");
|
|
|
|
mbse_mvprintw(13, 6, "7. Our Area/Filemgr passwd");
|
2004-08-12 14:21:02 +00:00
|
|
|
|
|
|
|
for (;;) {
|
|
|
|
set_color(WHITE, BLACK);
|
|
|
|
show_str( 7,35, 8, nodes.UplAmgrPgm);
|
|
|
|
show_str( 8,35,15, (char *)"***************");
|
|
|
|
show_bool( 9,35, nodes.UplAmgrBbbs);
|
|
|
|
show_str( 10,35, 8, nodes.UplFmgrPgm);
|
|
|
|
show_str( 11,35,15, (char *)"***************");
|
|
|
|
show_bool(12,35, nodes.UplFmgrBbbs);
|
2004-08-12 18:32:07 +00:00
|
|
|
show_str( 13,35,15, (char *)"***************");
|
2004-08-12 14:21:02 +00:00
|
|
|
|
2004-08-12 18:32:07 +00:00
|
|
|
switch(select_menu(7)) {
|
2004-08-12 14:21:02 +00:00
|
|
|
case 0: return;
|
|
|
|
case 1: E_STR( 7,35, 8, nodes.UplAmgrPgm, "Name of the uplink ^areamanager program^")
|
|
|
|
case 2: E_STR( 8,35,15, nodes.UplAmgrPass, "Uplink ^areamanager password^ for this node")
|
|
|
|
case 3: E_BOOL( 9,35, nodes.UplAmgrBbbs, "Uplink ^areamanager^ is ^BBBS^ software")
|
|
|
|
case 4: E_STR( 10,35,8, nodes.UplFmgrPgm, "Name of the uplink ^filemanager^ program")
|
|
|
|
case 5: E_STR( 11,35,15, nodes.UplFmgrPass, "Uplink ^filemanager password^ for this node")
|
|
|
|
case 6: E_BOOL(12,35, nodes.UplFmgrBbbs, "Uplink ^filemanager^ is ^BBBS^ software")
|
2004-08-12 18:32:07 +00:00
|
|
|
case 7: E_STR( 13,35,15, nodes.Apasswd, "The area and filemanager ^password^ for this node")
|
2004-08-12 14:21:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2001-08-17 05:46:24 +00:00
|
|
|
void E_Mail(void);
|
|
|
|
void E_Mail(void)
|
|
|
|
{
|
2002-06-24 20:34:07 +00:00
|
|
|
clr_index();
|
|
|
|
set_color(WHITE, BLACK);
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw( 5, 6, "7.4 EDIT NODE - MAIL PROCESSING");
|
2002-06-24 20:34:07 +00:00
|
|
|
set_color(CYAN, BLACK);
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw( 7, 6, "1. PKT password");
|
|
|
|
mbse_mvprintw( 8, 6, "2. Check PKT pwd");
|
|
|
|
mbse_mvprintw( 9, 6, "3. Mail forward");
|
|
|
|
mbse_mvprintw(10, 6, "4. ARCmail comp.");
|
|
|
|
mbse_mvprintw(11, 6, "5. ARCmail a..z");
|
2002-06-24 20:34:07 +00:00
|
|
|
|
|
|
|
for (;;) {
|
2001-08-17 05:46:24 +00:00
|
|
|
set_color(WHITE, BLACK);
|
2002-06-24 20:34:07 +00:00
|
|
|
show_str( 7,25,15, (char *)"***************");
|
|
|
|
show_bool( 8,25, nodes.MailPwdCheck);
|
2004-08-12 14:21:02 +00:00
|
|
|
show_bool( 9,25, nodes.MailFwd);
|
|
|
|
show_bool(10,25, nodes.ARCmailCompat);
|
|
|
|
show_bool(11,25, nodes.ARCmailAlpha);
|
|
|
|
|
|
|
|
switch(select_menu(5)) {
|
|
|
|
case 0: return;
|
|
|
|
case 1: E_STR( 7,25,15, nodes.Epasswd, "The ^Mail (.pkt)^ password^ for this node")
|
|
|
|
case 2: E_BOOL( 8,25, nodes.MailPwdCheck, "Check the ^mail PKT^ password")
|
|
|
|
case 3: E_BOOL( 9,25, nodes.MailFwd, "^Forward^ echomail for this node")
|
|
|
|
case 4: E_BOOL(10,25, nodes.ARCmailCompat, "Use ^ARCmail 0.60^ file naming convention for out of zone mail")
|
|
|
|
case 5: E_BOOL(11,25, nodes.ARCmailAlpha, "Allow ^0..9 and a..z^ filename extensions for ARCmail archives")
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
2002-06-24 20:34:07 +00:00
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void E_Files(void);
|
|
|
|
void E_Files(void)
|
|
|
|
{
|
2002-06-24 20:34:07 +00:00
|
|
|
clr_index();
|
|
|
|
set_color(WHITE, BLACK);
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw( 5, 6, "7.6 EDIT NODE - FILES PROCESSING");
|
2002-06-24 20:34:07 +00:00
|
|
|
set_color(CYAN, BLACK);
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw( 7, 6, "1. Files password");
|
|
|
|
mbse_mvprintw( 8, 6, "2. Incl. message");
|
|
|
|
mbse_mvprintw( 9, 6, "3. Send TIC file");
|
|
|
|
mbse_mvprintw(10, 6, "4. Advanced TIC");
|
|
|
|
mbse_mvprintw(11, 6, "5. Advanced SB");
|
|
|
|
mbse_mvprintw(12, 6, "6. To line in TIC");
|
|
|
|
mbse_mvprintw(13, 6, "7. File forward");
|
2002-06-24 20:34:07 +00:00
|
|
|
|
|
|
|
for (;;) {
|
2001-08-17 05:46:24 +00:00
|
|
|
set_color(WHITE, BLACK);
|
2002-06-24 20:34:07 +00:00
|
|
|
show_str( 7,26,15, (char *)"***************");
|
2004-08-12 18:32:07 +00:00
|
|
|
show_bool( 8,26, nodes.Message);
|
|
|
|
show_bool( 9,26, nodes.Tic);
|
|
|
|
show_bool(10,26, nodes.AdvTic);
|
|
|
|
show_bool(11,26, nodes.TIC_AdvSB);
|
|
|
|
show_bool(12,26, nodes.TIC_To);
|
|
|
|
show_bool(13,26, nodes.FileFwd);
|
|
|
|
|
|
|
|
switch(select_menu(7)) {
|
2004-03-06 21:48:41 +00:00
|
|
|
case 0: return;
|
|
|
|
case 1: E_STR( 7,26,15,nodes.Fpasswd, "The ^TIC^ files ^password^ for this node")
|
2004-08-12 18:32:07 +00:00
|
|
|
case 2: E_BOOL( 8,26, nodes.Message, "Send ^messages^ with files send to this node")
|
|
|
|
case 3: E_BOOL( 9,26, nodes.Tic, "Send ^TIC^ files to this node")
|
|
|
|
case 4: E_BOOL(10,26, nodes.AdvTic, "Send ^advanced^ TIC files to this node")
|
|
|
|
case 5: E_BOOL(11,26, nodes.TIC_AdvSB, "Send ^advanced Seen-By^ lines in ticfiles to this node")
|
|
|
|
case 6: E_BOOL(12,26, nodes.TIC_To, "Send ^To^ line in ticfiles to this node")
|
|
|
|
case 7: E_BOOL(13,26, nodes.FileFwd, "^Forward TIC^ files for this node")
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
2002-06-24 20:34:07 +00:00
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void S_Stat(void);
|
|
|
|
void S_Stat(void)
|
|
|
|
{
|
|
|
|
time_t Now;
|
|
|
|
struct tm *t;
|
|
|
|
int LMiy;
|
|
|
|
|
|
|
|
clr_index();
|
|
|
|
set_color(WHITE, BLACK);
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw( 5, 6, "7.11 NODE STATISTICS");
|
2001-08-17 05:46:24 +00:00
|
|
|
set_color(CYAN, BLACK);
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw( 8,18, " This week Last week This month Last month Total");
|
|
|
|
mbse_mvprintw( 9,18, "---------- ---------- ---------- ---------- ----------");
|
|
|
|
mbse_mvprintw(10,6, "Files sent");
|
|
|
|
mbse_mvprintw(11,6, "Kbytes sent");
|
|
|
|
mbse_mvprintw(12,6, "Files rcvd");
|
|
|
|
mbse_mvprintw(13,6, "Kbytes rcvd");
|
|
|
|
mbse_mvprintw(14,6, "Mail sent");
|
|
|
|
mbse_mvprintw(15,6, "Mail rcvd");
|
2001-08-17 05:46:24 +00:00
|
|
|
set_color(WHITE, BLACK);
|
|
|
|
|
|
|
|
Now = time(NULL);
|
|
|
|
t = localtime(&Now);
|
|
|
|
|
|
|
|
Diw = t->tm_wday;
|
|
|
|
Miy = t->tm_mon;
|
|
|
|
if (Miy == 0)
|
|
|
|
LMiy = 11;
|
|
|
|
else
|
|
|
|
LMiy = Miy - 1;
|
|
|
|
|
2005-10-16 11:37:54 +00:00
|
|
|
mbse_mvprintw(10,18, (char *)"%10u %10u %10u %10u %10u", nodes.FilesSent.tweek,
|
2002-06-24 20:34:07 +00:00
|
|
|
nodes.FilesSent.lweek, nodes.FilesSent.month[Miy], nodes.FilesSent.month[LMiy], nodes.FilesSent.total);
|
2005-10-16 11:37:54 +00:00
|
|
|
mbse_mvprintw(11,18, (char *)"%10u %10u %10u %10u %10u", nodes.F_KbSent.tweek,
|
2002-06-24 20:34:07 +00:00
|
|
|
nodes.F_KbSent.lweek, nodes.F_KbSent.month[Miy], nodes.F_KbSent.month[LMiy], nodes.F_KbSent.total);
|
2005-10-16 11:37:54 +00:00
|
|
|
mbse_mvprintw(12,18, (char *)"%10u %10u %10u %10u %10u", nodes.FilesRcvd.tweek,
|
2002-06-24 20:34:07 +00:00
|
|
|
nodes.FilesRcvd.lweek, nodes.FilesRcvd.month[Miy], nodes.FilesRcvd.month[LMiy], nodes.FilesRcvd.total);
|
2005-10-16 11:37:54 +00:00
|
|
|
mbse_mvprintw(13,18, (char *)"%10u %10u %10u %10u %10u", nodes.F_KbRcvd.tweek,
|
2002-06-24 20:34:07 +00:00
|
|
|
nodes.F_KbRcvd.lweek, nodes.F_KbRcvd.month[Miy], nodes.F_KbRcvd.month[LMiy], nodes.F_KbRcvd.total);
|
2005-10-16 11:37:54 +00:00
|
|
|
mbse_mvprintw(14,18, (char *)"%10u %10u %10u %10u %10u", nodes.MailSent.tweek,
|
2002-06-24 20:34:07 +00:00
|
|
|
nodes.MailSent.lweek, nodes.MailSent.month[Miy], nodes.MailSent.month[LMiy], nodes.MailSent.total);
|
2005-10-16 11:37:54 +00:00
|
|
|
mbse_mvprintw(15,18, (char *)"%10u %10u %10u %10u %10u", nodes.MailRcvd.tweek,
|
2002-06-24 20:34:07 +00:00
|
|
|
nodes.MailRcvd.lweek, nodes.MailRcvd.month[Miy], nodes.MailRcvd.month[LMiy], nodes.MailRcvd.total);
|
2001-08-17 05:46:24 +00:00
|
|
|
set_color(CYAN, BLACK);
|
|
|
|
center_addstr(LINES - 4, (char *)"Press any key");
|
|
|
|
readkey(LINES - 4, COLS / 2 + 8, LIGHTGRAY, BLACK);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fidoaddr e_a(fidoaddr, int);
|
|
|
|
fidoaddr e_a(fidoaddr n, int x)
|
|
|
|
{
|
|
|
|
FILE *fil;
|
2001-10-19 21:10:43 +00:00
|
|
|
char temp[PATH_MAX];
|
2001-08-17 05:46:24 +00:00
|
|
|
int i;
|
|
|
|
|
|
|
|
for (;;) {
|
|
|
|
clr_index();
|
|
|
|
set_color(WHITE, BLACK);
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw( 5, 6, (char *)"7.%d EDIT AKA", x);
|
2001-08-17 05:46:24 +00:00
|
|
|
set_color(CYAN, BLACK);
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw( 7, 6, "1. Zone");
|
|
|
|
mbse_mvprintw( 8, 6, "2. Net");
|
|
|
|
mbse_mvprintw( 9, 6, "3. Node");
|
|
|
|
mbse_mvprintw(10, 6, "4. Point");
|
|
|
|
mbse_mvprintw(11, 6, " Domain");
|
|
|
|
mbse_mvprintw(12, 6, "5. Delete");
|
2001-08-17 05:46:24 +00:00
|
|
|
set_color(WHITE, BLACK);
|
|
|
|
show_int( 7,17, n.zone);
|
|
|
|
show_int( 8,17, n.net);
|
|
|
|
show_int( 9,17, n.node);
|
|
|
|
show_int(10,17, n.point);
|
|
|
|
show_str(11,17,12, n.domain);
|
|
|
|
|
2004-04-04 18:35:21 +00:00
|
|
|
switch(select_menu(5)) {
|
2001-08-17 05:46:24 +00:00
|
|
|
case 0: return n;
|
2004-02-05 21:05:31 +00:00
|
|
|
case 1: n.zone = edit_int_range(7, 17, n.zone, 1, 4095, (char *)"The ^zone^ number 1..4095");
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(temp, PATH_MAX, "%s/etc/fidonet.data", getenv("MBSE_ROOT"));
|
2001-08-17 05:46:24 +00:00
|
|
|
if ((fil = fopen(temp, "r")) != NULL) {
|
|
|
|
fread(&fidonethdr, sizeof(fidonethdr), 1, fil);
|
|
|
|
|
|
|
|
while (fread(&fidonet, fidonethdr.recsize, 1, fil) == 1) {
|
|
|
|
if (fidonet.available) {
|
|
|
|
for (i = 0; i < 6; i++) {
|
|
|
|
if (fidonet.zone[i] == n.zone) {
|
|
|
|
memset(&n.domain, 0, sizeof(n.domain));
|
|
|
|
strcpy(n.domain, fidonet.domain);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fclose(fil);
|
|
|
|
}
|
|
|
|
break;
|
2004-02-05 21:05:31 +00:00
|
|
|
case 2: E_IRC( 8,17,n.net, 1, 32767, "The ^net^ number 1..32767")
|
|
|
|
case 3: E_IRC( 9,17,n.node, 0, 32767, "The ^node^ number 0..32767")
|
|
|
|
case 4: E_IRC(10,17,n.point, 0, 32767, "The ^point^ number 0..32767")
|
2004-04-04 18:35:21 +00:00
|
|
|
case 5: memset(&n, 0, sizeof(n));
|
|
|
|
break;
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void N_Akas(void)
|
|
|
|
{
|
|
|
|
int i, j, m, x, y;
|
|
|
|
fidoaddr a[20];
|
|
|
|
|
|
|
|
for (;;) {
|
|
|
|
clr_index();
|
|
|
|
set_color(WHITE, BLACK);
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw( 5, 6, "7.2 EDIT NODES AKA'S");
|
2001-08-17 05:46:24 +00:00
|
|
|
set_color(CYAN, BLACK);
|
|
|
|
y = 7; x = 6;
|
|
|
|
for (i = 0; i < 20; i++) {
|
|
|
|
if (i == 10) {
|
|
|
|
y = 7; x = 46;
|
|
|
|
}
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw( y, x, (char *)"%d.", i + 1);
|
2001-08-17 05:46:24 +00:00
|
|
|
if (nodes.Aka[i].zone)
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw(y, x + 5, (char *)"%s", aka2str(nodes.Aka[i]));
|
2001-08-17 05:46:24 +00:00
|
|
|
y++;
|
|
|
|
}
|
|
|
|
|
|
|
|
m = select_menu(20);
|
|
|
|
switch(m) {
|
|
|
|
case 0:
|
|
|
|
/*
|
|
|
|
* Pack the aka's
|
|
|
|
*/
|
|
|
|
for (i = 0; i < 20; i++) {
|
|
|
|
a[i] = nodes.Aka[i];
|
|
|
|
memset(&nodes.Aka[i], 0, sizeof(fidoaddr));
|
|
|
|
}
|
|
|
|
j = 0;
|
|
|
|
for (i = 0; i < 20; i++) {
|
|
|
|
if (a[i].zone) {
|
|
|
|
nodes.Aka[j] = a[i];
|
|
|
|
j++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
|
|
|
|
default:
|
|
|
|
if (! CheckAka(nodes.Aka[m - 1]))
|
|
|
|
nodes.Aka[m - 1] = e_a(nodes.Aka[m - 1], 2);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2002-06-24 20:34:07 +00:00
|
|
|
void GeneralScreen(void);
|
|
|
|
void GeneralScreen(void)
|
2001-08-17 05:46:24 +00:00
|
|
|
{
|
2002-06-24 20:34:07 +00:00
|
|
|
clr_index();
|
|
|
|
set_color(WHITE, BLACK);
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw( 5, 2, "7.1 EDIT NODE GENERAL");
|
2002-06-24 20:34:07 +00:00
|
|
|
set_color(CYAN, BLACK);
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw( 7, 2, "1. Sysop name");
|
|
|
|
mbse_mvprintw( 8, 2, "2. Outbox dir");
|
|
|
|
mbse_mvprintw( 9, 2, "3. Pvt. phone");
|
|
|
|
mbse_mvprintw(10, 2, "4. Pvt. fax");
|
|
|
|
mbse_mvprintw(11, 2, "5. Pvt. Cellphone");
|
|
|
|
mbse_mvprintw(12, 2, "6. Pvt. e-mail");
|
|
|
|
mbse_mvprintw(13, 2, "7. Pvt. remark");
|
|
|
|
mbse_mvprintw(14, 2, "8. Route via");
|
|
|
|
mbse_mvprintw(15, 2, "9. Netmail direct");
|
|
|
|
mbse_mvprintw(16, 2, "10. Netmail crash");
|
|
|
|
mbse_mvprintw(17, 2, "11. Netmail hold");
|
|
|
|
mbse_mvprintw(18, 2, "12. Pack mail");
|
|
|
|
|
|
|
|
mbse_mvprintw(16,42, "13. Send notify");
|
|
|
|
mbse_mvprintw(17,42, "14. Language");
|
|
|
|
mbse_mvprintw(18,42, "15. Deleted");
|
2002-06-24 20:34:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void GeneralEdit(void);
|
|
|
|
void GeneralEdit(void)
|
|
|
|
{
|
|
|
|
int i, count;
|
|
|
|
char temp1[32];
|
|
|
|
|
|
|
|
GeneralScreen();
|
|
|
|
for (;;) {
|
2001-08-17 05:46:24 +00:00
|
|
|
set_color(WHITE, BLACK);
|
2002-06-24 20:34:07 +00:00
|
|
|
show_str( 7,23,35, nodes.Sysop);
|
|
|
|
show_str( 8,23,55, nodes.OutBox);
|
|
|
|
show_str( 9,23,16, nodes.Ct_phone);
|
|
|
|
show_str(10,23,16, nodes.Ct_fax);
|
|
|
|
show_str(11,23,20, nodes.Ct_cellphone);
|
|
|
|
show_str(12,23,30, nodes.Ct_email);
|
|
|
|
show_str(13,23,55, nodes.Ct_remark);
|
|
|
|
if (nodes.RouteVia.zone)
|
|
|
|
show_aka(14,23,nodes.RouteVia);
|
|
|
|
show_bool(15,23, nodes.Direct);
|
|
|
|
show_bool(16,23, nodes.Crash);
|
|
|
|
show_bool(17,23, nodes.Hold);
|
|
|
|
show_bool(18,23, nodes.PackNetmail);
|
|
|
|
|
|
|
|
show_bool(16,63, nodes.Notify);
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(temp1, 32, "%c", nodes.Language);
|
2002-06-24 20:34:07 +00:00
|
|
|
show_str(17,63,1, temp1);
|
|
|
|
show_bool(18,63, nodes.Deleted);
|
|
|
|
|
|
|
|
switch(select_menu(15)) {
|
|
|
|
case 0: return;
|
|
|
|
case 1: E_STR( 7,23,35, nodes.Sysop, "The name of the ^sysop^ for this node")
|
|
|
|
case 2: if (strlen(nodes.OutBox) == 0) {
|
|
|
|
if (nodes.Aka[0].zone) {
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(nodes.OutBox, 65, "%s/var/boxes/node%d_%d_%d", getenv("MBSE_ROOT"),
|
2002-06-24 20:34:07 +00:00
|
|
|
nodes.Aka[0].zone, nodes.Aka[0].net, nodes.Aka[0].node);
|
|
|
|
} else {
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(nodes.OutBox, 65, "%s/var/boxes/%s", getenv("MBSE_ROOT"), nodes.Sysop);
|
2002-06-24 20:34:07 +00:00
|
|
|
for (i = (strlen(nodes.OutBox) - strlen(nodes.Sysop)); i < strlen(nodes.OutBox); i++) {
|
|
|
|
nodes.OutBox[i] = tolower(nodes.OutBox[i]);
|
|
|
|
if (nodes.OutBox[i] == ' ')
|
|
|
|
nodes.OutBox[i] = '_';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
E_PTH( 8,23,55, nodes.OutBox, "Private extra ^outbound directory^ for this node", 0770)
|
|
|
|
case 3: E_STR( 9,23,16, nodes.Ct_phone, "Contact info: ^private phone number^")
|
|
|
|
case 4: E_STR(10,23,16, nodes.Ct_fax, "Contact info: ^private fax number^")
|
|
|
|
case 5: E_STR(11,23,20, nodes.Ct_cellphone, "Contact info: ^private cellphone/GSM^")
|
|
|
|
case 6: E_STR(12,23,30, nodes.Ct_email, "Contact info: ^private e-mail address^")
|
|
|
|
case 7: E_STR(13,23,55, nodes.Ct_remark, "Contact info: ^private remark^")
|
|
|
|
case 8: nodes.RouteVia = e_a(nodes.RouteVia, 6); GeneralScreen(); break;
|
|
|
|
case 9: E_BOOL(15,23, nodes.Direct, "Set the ^direct^ flag on netmail")
|
|
|
|
case 10:nodes.Crash = edit_bool(16,23, nodes.Crash, (char *)"Set the ^crash^ flags for this node");
|
|
|
|
if (nodes.Crash)
|
|
|
|
nodes.Hold = FALSE;
|
|
|
|
break;
|
|
|
|
case 11:nodes.Hold = edit_bool(17,23, nodes.Hold, (char *)"Set the ^hold^ flag for this node");
|
|
|
|
if (nodes.Hold)
|
|
|
|
nodes.Crash = FALSE;
|
|
|
|
break;
|
2002-10-31 19:41:25 +00:00
|
|
|
case 12:E_BOOL(18,23, nodes.PackNetmail, "^Pack mail^ for this node")
|
2002-06-24 20:34:07 +00:00
|
|
|
case 13:E_BOOL(16,63, nodes.Notify, "Send ^notify^ messages to this node")
|
|
|
|
case 14:i = PickLanguage((char *)"7.1.14");
|
|
|
|
if (i != '\0')
|
|
|
|
nodes.Language = i;
|
|
|
|
GeneralScreen();
|
|
|
|
break;
|
|
|
|
case 15:count = 0;
|
|
|
|
working(1, 0, 0);
|
|
|
|
for (i = 0; i < 20; i++)
|
|
|
|
if (nodes.Aka[i].zone)
|
|
|
|
count += NodeInMarea(nodes.Aka[i]);
|
|
|
|
if (count) {
|
|
|
|
errmsg((char *)"Node is connected to %d message areas", count);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
count = 0;
|
|
|
|
for (i = 0; i < 20; i++)
|
|
|
|
if (nodes.Aka[i].zone)
|
|
|
|
count += NodeInTic(nodes.Aka[i]);
|
|
|
|
if (count) {
|
|
|
|
errmsg((char *)"Node is connected to %d tic areas", count);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
E_BOOL(18,63, nodes.Deleted, "Is this node ^Deleted^")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void SessionScreen(void);
|
|
|
|
void SessionScreen(void)
|
|
|
|
{
|
|
|
|
clr_index();
|
|
|
|
set_color(WHITE, BLACK);
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw( 5, 6, "7.3 EDIT NODE SESSION");
|
2002-06-24 20:34:07 +00:00
|
|
|
set_color(CYAN, BLACK);
|
|
|
|
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw( 7, 6, "1. Session passwd");
|
|
|
|
mbse_mvprintw( 8, 6, "2. Dial command");
|
|
|
|
mbse_mvprintw( 9, 6, "3. Phone number 1");
|
|
|
|
mbse_mvprintw(10, 6, "4. Phone number 2");
|
|
|
|
mbse_mvprintw(11, 6, "5. Nodelist flags");
|
|
|
|
mbse_mvprintw(12, 6, "6. Inet hostname");
|
|
|
|
mbse_mvprintw(13, 6, "7. Outbound sess.");
|
|
|
|
mbse_mvprintw(14, 6, "8. Inbound sess.");
|
|
|
|
mbse_mvprintw(15, 6, "9. No EMSI");
|
|
|
|
mbse_mvprintw(16, 6, "10. No YooHoo/2U2");
|
|
|
|
mbse_mvprintw(17, 6, "11. No Filerequest");
|
|
|
|
mbse_mvprintw(18, 6, "12. Don't call");
|
|
|
|
mbse_mvprintw(19, 6, "13. 8.3 names");
|
2006-01-28 15:12:25 +00:00
|
|
|
mbse_mvprintw(20, 6, "14. NR mode");
|
|
|
|
|
|
|
|
mbse_mvprintw(13,41, "15. No PLZ");
|
|
|
|
mbse_mvprintw(14,41, "16. No GZ/BZ2");
|
|
|
|
mbse_mvprintw(15,41, "17. No Zmodem");
|
|
|
|
mbse_mvprintw(16,41, "18. No Zedzap");
|
|
|
|
mbse_mvprintw(17,41, "19. No Hydra");
|
|
|
|
mbse_mvprintw(18,41, "20. Binkp old esc");
|
|
|
|
mbse_mvprintw(19,41, "21. No binkp/1.1");
|
|
|
|
mbse_mvprintw(20,41, "22. Ign. Hold");
|
2002-06-24 20:34:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void SessionEdit(void);
|
|
|
|
void SessionEdit(void)
|
|
|
|
{
|
|
|
|
SessionScreen();
|
|
|
|
|
|
|
|
for (;;) {
|
|
|
|
set_color(WHITE, BLACK);
|
|
|
|
show_str( 7,26,15, (char *)"***************");
|
|
|
|
show_str( 8,26,40, nodes.dial);
|
|
|
|
show_str( 9,26,20, nodes.phone[0]);
|
|
|
|
show_str( 10,26,20, nodes.phone[1]);
|
|
|
|
show_str( 11,26,54, nodes.Nl_flags);
|
|
|
|
show_str( 12,26,40, nodes.Nl_hostname);
|
2002-08-03 15:22:40 +00:00
|
|
|
show_sessiontype(13,26,nodes.Session_out);
|
|
|
|
show_sessiontype(14,26,nodes.Session_in);
|
2002-06-24 20:34:07 +00:00
|
|
|
show_bool(15,26, nodes.NoEMSI);
|
|
|
|
show_bool(16,26, nodes.NoWaZOO);
|
|
|
|
show_bool(17,26, nodes.NoFreqs);
|
2003-08-10 11:27:31 +00:00
|
|
|
show_bool(18,26, nodes.NoCall);
|
2004-01-04 16:18:44 +00:00
|
|
|
show_bool(19,26, nodes.FNC);
|
2006-01-28 15:12:25 +00:00
|
|
|
show_bool(20,26, nodes.DoNR);
|
2004-01-04 16:18:44 +00:00
|
|
|
|
2005-07-03 20:32:21 +00:00
|
|
|
show_bool(13,61, nodes.NoPLZ);
|
|
|
|
show_bool(14,61, nodes.NoGZ);
|
2003-11-30 14:36:53 +00:00
|
|
|
show_bool(15,61, nodes.NoZmodem);
|
|
|
|
show_bool(16,61, nodes.NoZedzap);
|
|
|
|
show_bool(17,61, nodes.NoHydra);
|
2003-08-24 12:26:34 +00:00
|
|
|
show_bool(18,61, nodes.WrongEscape);
|
2004-01-04 16:18:44 +00:00
|
|
|
show_bool(19,61, nodes.NoBinkp11);
|
2005-08-21 13:35:22 +00:00
|
|
|
show_bool(20,61, nodes.IgnHold);
|
2002-06-24 20:34:07 +00:00
|
|
|
|
2006-01-28 15:12:25 +00:00
|
|
|
switch(select_menu(22)) {
|
2002-06-24 20:34:07 +00:00
|
|
|
case 0: return;
|
|
|
|
case 1: E_STR( 7,26,15, nodes.Spasswd, "The ^Session password^ for this node")
|
|
|
|
case 2: E_STR( 8,26,40, nodes.dial, "If needed, give a special modem ^dial command^ for this node")
|
|
|
|
case 3: E_STR( 9,26,20, nodes.phone[0], "Enter ^phone number^ to override the nodelist")
|
|
|
|
case 4: E_STR( 10,26,20, nodes.phone[1], "Enter ^phone number^ to override the nodelist")
|
2002-07-13 12:58:35 +00:00
|
|
|
case 5: E_STR( 11,26,54, nodes.Nl_flags, "^Nodelist flags^ override")
|
|
|
|
case 6: E_STR( 12,26,40, nodes.Nl_hostname, "Node internet ^hostname/IP address^ override")
|
2002-08-03 15:22:40 +00:00
|
|
|
case 7: nodes.Session_out = edit_sessiontype(13,26, nodes.Session_out);
|
|
|
|
break;
|
|
|
|
case 8: nodes.Session_in = edit_sessiontype(14,26, nodes.Session_in);
|
|
|
|
break;
|
2002-06-24 20:34:07 +00:00
|
|
|
case 9: E_BOOL(15,26, nodes.NoEMSI, "Disable ^EMSI handshake^ with this node")
|
|
|
|
case 10:E_BOOL(16,26, nodes.NoWaZOO, "Disable ^YooHoo/2U2 handshake^ (FTSC-0006) with this node")
|
|
|
|
case 11:E_BOOL(17,26, nodes.NoFreqs, "Disallow ^file requests^ from this node")
|
2003-08-10 11:27:31 +00:00
|
|
|
case 12:E_BOOL(18,26, nodes.NoCall, "Don't ^call^ this node")
|
2004-01-04 16:18:44 +00:00
|
|
|
case 13:E_BOOL(19,26, nodes.FNC, "Node needs ^DOS 8.3^ filenames")
|
2006-01-28 15:12:25 +00:00
|
|
|
case 14:E_BOOL(20,26, nodes.DoNR, "Use ^NR-mode^ in outgoing binkp sessions")
|
|
|
|
|
|
|
|
case 15:E_BOOL(13,61, nodes.NoPLZ, "Disable ^Binkp PLZ^ compression with this node")
|
|
|
|
case 16:E_BOOL(14,61, nodes.NoGZ, "Disable ^Binkp GZ and BZ2^ compression with this node")
|
|
|
|
case 17:E_BOOL(15,61, nodes.NoZmodem, "Disable ^Zmodem^ protocol with this node")
|
|
|
|
case 18:E_BOOL(16,61, nodes.NoZedzap, "Disable ^Zedzap^ protocol with this node")
|
|
|
|
case 19:E_BOOL(17,61, nodes.NoHydra, "Disable ^Hydra^ protocol with this node")
|
|
|
|
case 20:E_BOOL(18,61, nodes.WrongEscape, "Use the ^old escape^ for long filenames (Argus, Irex)")
|
|
|
|
case 21:E_BOOL(19,61, nodes.NoBinkp11, "Disable ^binkp/1.1^ (fallback to binkp/1.0) mode for this node")
|
|
|
|
case 22:E_BOOL(20,61, nodes.IgnHold, "Ignore node ^Hold or Down^ nodelist status")
|
2002-06-24 20:34:07 +00:00
|
|
|
}
|
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2002-08-03 15:22:40 +00:00
|
|
|
void DirectoryScreen(void);
|
|
|
|
void DirectoryScreen(void)
|
|
|
|
{
|
|
|
|
clr_index();
|
|
|
|
set_color(WHITE, BLACK);
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw( 5, 2, "7.8 EDIT NODE DIRECTORY SESSION");
|
|
|
|
mbse_mvprintw( 7, 2, " Outbound settings");
|
2002-08-03 15:22:40 +00:00
|
|
|
set_color(CYAN, BLACK);
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw( 8, 2, "1. Files path");
|
|
|
|
mbse_mvprintw( 9, 2, "2. Check for lock");
|
|
|
|
mbse_mvprintw( 9,41, "3. Wait clear lock");
|
|
|
|
mbse_mvprintw(10, 2, "4. Check lockfile");
|
|
|
|
mbse_mvprintw(11, 2, "5. Create lock");
|
|
|
|
mbse_mvprintw(12, 2, "6. Create lockfile");
|
2002-08-03 15:22:40 +00:00
|
|
|
|
|
|
|
set_color(WHITE, BLACK);
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw(14, 2, " Inbound settings");
|
2002-08-03 15:22:40 +00:00
|
|
|
set_color(CYAN, BLACK);
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw(15, 2, "7. Files path");
|
|
|
|
mbse_mvprintw(16, 2, "8. Check for lock");
|
|
|
|
mbse_mvprintw(16,41, "9. Wait clear lock");
|
|
|
|
mbse_mvprintw(17, 2, "10. Check lockfile");
|
|
|
|
mbse_mvprintw(18, 2, "11. Create lock");
|
|
|
|
mbse_mvprintw(19, 2, "12. Create lockfile");
|
2002-08-03 15:22:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void DirectoryEdit(void);
|
|
|
|
void DirectoryEdit(void)
|
|
|
|
{
|
|
|
|
int pick, temp;
|
|
|
|
char *p;
|
|
|
|
|
|
|
|
DirectoryScreen();
|
|
|
|
|
|
|
|
for (;;) {
|
|
|
|
set_color(WHITE, BLACK);
|
|
|
|
show_str( 8,23,56, nodes.Dir_out_path);
|
|
|
|
show_bool( 9,23, nodes.Dir_out_chklck);
|
|
|
|
show_bool( 9,62, nodes.Dir_out_waitclr);
|
|
|
|
show_str( 10,23,56, nodes.Dir_out_clock);
|
|
|
|
show_bool(11,23, nodes.Dir_out_mklck);
|
|
|
|
show_str( 12,23,56, nodes.Dir_out_mlock);
|
|
|
|
|
|
|
|
show_str( 15,23,56, nodes.Dir_in_path);
|
|
|
|
show_bool(16,23, nodes.Dir_in_chklck);
|
|
|
|
show_bool(16,62, nodes.Dir_in_waitclr);
|
|
|
|
show_str( 17,23,56, nodes.Dir_in_clock);
|
|
|
|
show_bool(18,23, nodes.Dir_in_mklck);
|
|
|
|
show_str( 19,23,56, nodes.Dir_in_mlock);
|
|
|
|
|
|
|
|
pick = select_menu(12);
|
|
|
|
if (pick == 0)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (pick < 7) {
|
|
|
|
if (nodes.Session_out != S_DIR) {
|
|
|
|
errmsg("Outbound session is not Directory");
|
|
|
|
} else {
|
|
|
|
switch(pick) {
|
|
|
|
case 1: if ((strlen(nodes.Dir_out_path) == 0) && (nodes.Aka[0].zone)) {
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(nodes.Dir_out_path, 65, "%s/var/bbsftp/node%d_%d_%d/outbound", getenv("MBSE_ROOT"),
|
2002-08-03 15:22:40 +00:00
|
|
|
nodes.Aka[0].zone, nodes.Aka[0].net, nodes.Aka[0].node);
|
|
|
|
}
|
|
|
|
E_PTH( 8,23,56, nodes.Dir_out_path, "^Outbound path^ for files and mail to this node", 0770)
|
|
|
|
case 2: temp = edit_bool(9,23, nodes.Dir_out_chklck, (char *)"^Check^ outbound lockfile");
|
|
|
|
if (temp && !nodes.Dir_out_chklck && (strlen(nodes.Dir_out_clock) == 0)) {
|
|
|
|
strcpy(nodes.Dir_out_clock, nodes.Dir_out_path);
|
|
|
|
p = strrchr(nodes.Dir_out_clock, '/');
|
|
|
|
if (p) {
|
|
|
|
p++;
|
|
|
|
*p = '\0';
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(p, 9, "lock.bsy");
|
2002-08-03 15:22:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
nodes.Dir_out_chklck = temp;
|
|
|
|
break;
|
|
|
|
case 3: E_BOOL( 9,62, nodes.Dir_out_waitclr, "^Wait^ for lockfile to ^clear^")
|
|
|
|
case 4: E_STR(10,23,56, nodes.Dir_out_clock, "^Lockfile^ to check before adding files")
|
|
|
|
case 5: temp = edit_bool(11,23, nodes.Dir_out_mklck, (char *)"^Create^ lockfile before adding files");
|
|
|
|
if (temp && !nodes.Dir_out_mklck && (strlen(nodes.Dir_out_mlock) == 0)) {
|
|
|
|
strcpy(nodes.Dir_out_mlock, nodes.Dir_out_path);
|
|
|
|
p = strrchr(nodes.Dir_out_mlock, '/');
|
|
|
|
if (p) {
|
|
|
|
p++;
|
|
|
|
*p = '\0';
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(p, 9, "lock.bsy");
|
2002-08-03 15:22:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
nodes.Dir_out_mklck = temp;
|
|
|
|
break;
|
|
|
|
case 6: E_STR(12,23,56, nodes.Dir_out_mlock, "^Lockfile^ to create while adding files")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if (nodes.Session_in != S_DIR) {
|
|
|
|
errmsg("Inbound session is not Directory");
|
|
|
|
} else {
|
|
|
|
switch(pick) {
|
|
|
|
case 7: if ((strlen(nodes.Dir_in_path) == 0) && (nodes.Aka[0].zone)) {
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(nodes.Dir_in_path, 65, "%s/var/bbsftp/node%d_%d_%d/inbound", getenv("MBSE_ROOT"),
|
2002-08-03 15:22:40 +00:00
|
|
|
nodes.Aka[0].zone, nodes.Aka[0].net, nodes.Aka[0].node);
|
|
|
|
}
|
|
|
|
E_PTH(15,23,56, nodes.Dir_in_path, "^Inbound path^ for files and mail from this node", 0770)
|
|
|
|
case 8: temp = edit_bool(16,23, nodes.Dir_in_chklck, (char *)"^Check^ inbound lockfile");
|
|
|
|
if (temp && !nodes.Dir_in_chklck && (strlen(nodes.Dir_in_clock) == 0)) {
|
|
|
|
strcpy(nodes.Dir_in_clock, nodes.Dir_in_path);
|
|
|
|
p = strrchr(nodes.Dir_in_clock, '/');
|
|
|
|
if (p) {
|
|
|
|
p++;
|
|
|
|
*p = '\0';
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(p, 9, "lock.bsy");
|
2002-08-03 15:22:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
nodes.Dir_in_chklck = temp;
|
|
|
|
break;
|
|
|
|
case 9: E_BOOL(16,62, nodes.Dir_in_waitclr, "^Wait^ for lockfile to ^clear^")
|
|
|
|
case 10:E_STR(17,23,56, nodes.Dir_in_clock, "^Lockfile^ to check before getting files")
|
|
|
|
case 11:temp = edit_bool(18,23, nodes.Dir_in_mklck, (char *)"^Create^ lockfile before getting files");
|
|
|
|
if (temp && !nodes.Dir_in_mklck && (strlen(nodes.Dir_in_mlock) == 0)) {
|
|
|
|
strcpy(nodes.Dir_in_mlock, nodes.Dir_in_path);
|
|
|
|
p = strrchr(nodes.Dir_in_mlock, '/');
|
|
|
|
if (p) {
|
|
|
|
p++;
|
|
|
|
*p = '\0';
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(p, 9, "lock.bsy");
|
2002-08-03 15:22:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
nodes.Dir_in_mklck = temp;
|
|
|
|
break;
|
|
|
|
case 12:E_STR(19,23,56, nodes.Dir_in_mlock, "^Lockfile^ to create while getting files")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2001-08-17 05:46:24 +00:00
|
|
|
/*
|
|
|
|
* Edit one record, return -1 if record doesn't exist, 0 if ok.
|
|
|
|
*/
|
|
|
|
int EditNodeRec(int);
|
|
|
|
int EditNodeRec(int Area)
|
|
|
|
{
|
2002-06-24 20:34:07 +00:00
|
|
|
FILE *fil;
|
|
|
|
char mfile[PATH_MAX];
|
2005-10-11 20:49:41 +00:00
|
|
|
int offset;
|
|
|
|
unsigned int crc, crc1;
|
2002-06-24 20:34:07 +00:00
|
|
|
gr_list *fgr = NULL, *egr = NULL, *tmp;
|
|
|
|
char group[13];
|
|
|
|
int groups, i, j, GrpChanged = FALSE;
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2002-06-24 20:34:07 +00:00
|
|
|
clr_index();
|
|
|
|
working(1, 0, 0);
|
|
|
|
IsDoing("Edit Fido Node");
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(mfile, PATH_MAX, "%s/etc/mgroups.data", getenv("MBSE_ROOT"));
|
2002-06-24 20:34:07 +00:00
|
|
|
if ((fil = fopen(mfile, "r")) != NULL) {
|
|
|
|
fread(&mgrouphdr, sizeof(mgrouphdr), 1, fil);
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2002-06-24 20:34:07 +00:00
|
|
|
while (fread(&mgroup, mgrouphdr.recsize, 1, fil) == 1)
|
|
|
|
fill_grlist(&egr, mgroup.Name);
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2002-06-24 20:34:07 +00:00
|
|
|
fclose(fil);
|
|
|
|
sort_grlist(&egr);
|
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(mfile, PATH_MAX, "%s/etc/fgroups.data", getenv("MBSE_ROOT"));
|
2002-06-24 20:34:07 +00:00
|
|
|
if ((fil = fopen(mfile, "r")) != NULL) {
|
|
|
|
fread(&fgrouphdr, sizeof(fgrouphdr), 1, fil);
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2002-06-24 20:34:07 +00:00
|
|
|
while (fread(&fgroup, fgrouphdr.recsize, 1, fil) == 1)
|
|
|
|
fill_grlist(&fgr, fgroup.Name);
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2002-06-24 20:34:07 +00:00
|
|
|
fclose(fil);
|
|
|
|
sort_grlist(&fgr);
|
|
|
|
}
|
|
|
|
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(mfile, PATH_MAX, "%s/etc/nodes.temp", getenv("MBSE_ROOT"));
|
2002-06-24 20:34:07 +00:00
|
|
|
if ((fil = fopen(mfile, "r")) == NULL) {
|
|
|
|
working(2, 0, 0);
|
|
|
|
tidy_grlist(&egr);
|
|
|
|
tidy_grlist(&fgr);
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
fread(&nodeshdr, sizeof(nodeshdr), 1, fil);
|
|
|
|
offset = nodeshdr.hdrsize + ((Area -1) * (nodeshdr.recsize + nodeshdr.filegrp + nodeshdr.mailgrp));
|
|
|
|
if (fseek(fil, offset, 0) != 0) {
|
|
|
|
working(2, 0, 0);
|
|
|
|
tidy_grlist(&egr);
|
|
|
|
tidy_grlist(&fgr);
|
|
|
|
return -1;
|
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2002-06-24 20:34:07 +00:00
|
|
|
fread(&nodes, nodeshdr.recsize, 1, fil);
|
|
|
|
groups = nodeshdr.filegrp / 13;
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2002-06-24 20:34:07 +00:00
|
|
|
for (i = 0; i < groups; i++) {
|
|
|
|
fread(&group, sizeof(group), 1, fil);
|
|
|
|
if (strlen(group)) {
|
|
|
|
for (tmp = fgr; tmp; tmp = tmp->next)
|
|
|
|
if (!strcmp(tmp->group, group))
|
|
|
|
tmp->tagged = TRUE;
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
2002-06-24 20:34:07 +00:00
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2002-06-24 20:34:07 +00:00
|
|
|
groups = nodeshdr.mailgrp / 13;
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2002-06-24 20:34:07 +00:00
|
|
|
for (i = 0; i < groups; i++) {
|
|
|
|
fread(&group, sizeof(group), 1, fil);
|
|
|
|
if (strlen(group)) {
|
|
|
|
for (tmp = egr; tmp; tmp = tmp->next)
|
|
|
|
if (!strcmp(tmp->group, group))
|
|
|
|
tmp->tagged = TRUE;
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
2002-06-24 20:34:07 +00:00
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2002-06-24 20:34:07 +00:00
|
|
|
fclose(fil);
|
|
|
|
crc = 0xffffffff;
|
|
|
|
crc = upd_crc32((char *)&nodes, crc, nodeshdr.recsize);
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2002-06-24 20:34:07 +00:00
|
|
|
for (;;) {
|
|
|
|
clr_index();
|
|
|
|
set_color(WHITE, BLACK);
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw( 5, 6, "7. EDIT NODE - %s, %s", nodes.Sysop, aka2str(nodes.Aka[0]));
|
2002-06-24 20:34:07 +00:00
|
|
|
set_color(CYAN, BLACK);
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw( 7, 6, "1. General setup");
|
|
|
|
mbse_mvprintw( 8, 6, "2. Aka's setup");
|
|
|
|
mbse_mvprintw( 9, 6, "3. Session setup");
|
|
|
|
mbse_mvprintw(10, 6, "4. Mail setup");
|
|
|
|
mbse_mvprintw(11, 6, "5. Mail groups");
|
|
|
|
mbse_mvprintw(12, 6, "6. Files setup");
|
|
|
|
mbse_mvprintw(13, 6, "7. Files groups");
|
|
|
|
mbse_mvprintw(14, 6, "8. Directory session");
|
|
|
|
mbse_mvprintw(15, 6, "9. Security flags");
|
|
|
|
mbse_mvprintw(16, 6, "10. Area/File managers");
|
|
|
|
mbse_mvprintw(17, 6, "11. Statistics");
|
2002-06-24 20:34:07 +00:00
|
|
|
|
2004-08-12 14:21:02 +00:00
|
|
|
switch(select_menu(11)) {
|
2002-06-24 20:34:07 +00:00
|
|
|
case 0: crc1 = 0xffffffff;
|
|
|
|
crc1 = upd_crc32((char *)&nodes, crc1, nodeshdr.recsize);
|
|
|
|
if ((crc != crc1) || GrpChanged) {
|
|
|
|
if (yes_no((char *)"Record is changed, save") == 1) {
|
|
|
|
working(1, 0, 0);
|
|
|
|
Syslog('+', "Updated node record %s", nodes.Sysop);
|
|
|
|
if ((fil = fopen(mfile, "r+")) == NULL) {
|
|
|
|
working(2, 0, 0);
|
|
|
|
return -1;
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
2002-06-24 20:34:07 +00:00
|
|
|
fseek(fil, offset, 0);
|
|
|
|
fwrite(&nodes, nodeshdr.recsize, 1, fil);
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2002-06-24 20:34:07 +00:00
|
|
|
groups = nodeshdr.filegrp / 13;
|
|
|
|
i = 0;
|
|
|
|
for (tmp = fgr; tmp; tmp = tmp->next)
|
|
|
|
if (tmp->tagged) {
|
|
|
|
i++;
|
|
|
|
memset(&group, 0, 13);
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(group, 13, "%s", tmp->group);
|
2002-06-24 20:34:07 +00:00
|
|
|
fwrite(&group, 13, 1, fil);
|
|
|
|
}
|
|
|
|
|
|
|
|
memset(&group, 0, sizeof(group));
|
|
|
|
for (j = i; j < groups; j++)
|
|
|
|
fwrite(&group, 13, 1, fil);
|
|
|
|
|
|
|
|
groups = nodeshdr.mailgrp / 13;
|
|
|
|
i = 0;
|
|
|
|
for (tmp = egr; tmp; tmp = tmp->next)
|
|
|
|
if (tmp->tagged) {
|
|
|
|
i++;
|
|
|
|
memset(&group, 0, 13);
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(group, 13, "%s", tmp->group);
|
2002-06-24 20:34:07 +00:00
|
|
|
fwrite(&group, 13, 1, fil);
|
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2002-06-24 20:34:07 +00:00
|
|
|
memset(&group, 0, sizeof(group));
|
|
|
|
for (j = i; j < groups; j++)
|
|
|
|
fwrite(&group, 13, 1, fil);
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2002-06-24 20:34:07 +00:00
|
|
|
fclose(fil);
|
|
|
|
NodeUpdated = 1;
|
2004-02-05 21:05:31 +00:00
|
|
|
working(6, 0, 0);
|
2002-06-24 20:34:07 +00:00
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
2002-06-24 20:34:07 +00:00
|
|
|
tidy_grlist(&egr);
|
|
|
|
tidy_grlist(&fgr);
|
|
|
|
IsDoing("Browsing Menu");
|
|
|
|
return 0;
|
|
|
|
case 1: GeneralEdit();
|
|
|
|
break;
|
|
|
|
case 2: N_Akas();
|
|
|
|
break;
|
|
|
|
case 3: SessionEdit();
|
|
|
|
break;
|
|
|
|
case 4: E_Mail();
|
|
|
|
break;
|
|
|
|
case 5: if (E_Group(&egr, (char *)"7.5 MAIL GROUPS"))
|
|
|
|
GrpChanged = TRUE;
|
|
|
|
break;
|
|
|
|
case 6: E_Files();
|
|
|
|
break;
|
|
|
|
case 7: if (E_Group(&fgr, (char *)"7.7 FILE GROUPS"))
|
|
|
|
GrpChanged = TRUE;
|
|
|
|
break;
|
2002-08-03 15:22:40 +00:00
|
|
|
case 8: DirectoryEdit();
|
|
|
|
break;
|
2002-09-29 20:08:32 +00:00
|
|
|
case 9: nodes.Security = edit_nsec(nodes.Security, (char *)"7.9 NODE SECURITY FLAGS");
|
2002-09-28 22:18:49 +00:00
|
|
|
break;
|
2004-08-12 14:21:02 +00:00
|
|
|
case 10:E_UplMgr();
|
|
|
|
break;
|
|
|
|
case 11:S_Stat();
|
2002-06-24 20:34:07 +00:00
|
|
|
break;
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
2002-06-24 20:34:07 +00:00
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void EditNodes(void)
|
|
|
|
{
|
2003-01-31 21:49:29 +00:00
|
|
|
int records, i, o, x, y;
|
|
|
|
char pick[12], temp[PATH_MAX];
|
|
|
|
FILE *fil;
|
2005-10-11 20:49:41 +00:00
|
|
|
int offset;
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2003-01-31 21:49:29 +00:00
|
|
|
clr_index();
|
|
|
|
working(1, 0, 0);
|
|
|
|
IsDoing("Browsing Menu");
|
|
|
|
if (config_read() == -1) {
|
|
|
|
working(2, 0, 0);
|
|
|
|
return;
|
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2003-01-31 21:49:29 +00:00
|
|
|
records = CountNoderec();
|
|
|
|
if (records == -1) {
|
|
|
|
working(2, 0, 0);
|
|
|
|
return;
|
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2003-01-31 21:49:29 +00:00
|
|
|
if (OpenNoderec() == -1) {
|
|
|
|
working(2, 0, 0);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
o = 0;
|
|
|
|
if (! check_free())
|
|
|
|
return;
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2003-01-31 21:49:29 +00:00
|
|
|
for (;;) {
|
|
|
|
clr_index();
|
|
|
|
set_color(WHITE, BLACK);
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw( 5, 6, "7. NODES SETUP");
|
2003-01-31 21:49:29 +00:00
|
|
|
set_color(CYAN, BLACK);
|
|
|
|
if (records != 0) {
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(temp, PATH_MAX, "%s/etc/nodes.temp", getenv("MBSE_ROOT"));
|
2003-01-31 21:49:29 +00:00
|
|
|
working(1, 0, 0);
|
|
|
|
if ((fil = fopen(temp, "r")) != NULL) {
|
|
|
|
fread(&nodeshdr, sizeof(nodeshdr), 1, fil);
|
|
|
|
x = 4;
|
|
|
|
y = 7;
|
2001-08-17 05:46:24 +00:00
|
|
|
set_color(CYAN, BLACK);
|
2003-01-31 21:49:29 +00:00
|
|
|
for (i = 1; i <= 20; i++) {
|
|
|
|
if (i == 11) {
|
|
|
|
x = 42;
|
|
|
|
y = 7;
|
|
|
|
}
|
|
|
|
if ((o + i) <= records) {
|
|
|
|
offset = sizeof(nodeshdr) + (((o + i) - 1) * (nodeshdr.recsize + nodeshdr.filegrp + nodeshdr.mailgrp));
|
|
|
|
fseek(fil, offset, 0);
|
|
|
|
fread(&nodes, nodeshdr.recsize, 1, fil);
|
|
|
|
if (strlen(nodes.Sysop))
|
|
|
|
set_color(CYAN, BLACK);
|
|
|
|
else
|
|
|
|
set_color(LIGHTBLUE, BLACK);
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(temp, 81, "%3d. %s (%s)", o + i, nodes.Sysop, strtok(aka2str(nodes.Aka[0]), "@"));
|
2003-01-31 21:49:29 +00:00
|
|
|
temp[37] = 0;
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw(y, x, temp);
|
2003-01-31 21:49:29 +00:00
|
|
|
y++;
|
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
2003-01-31 21:49:29 +00:00
|
|
|
fclose(fil);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
strcpy(pick, select_record(records, 20));
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2003-01-31 21:49:29 +00:00
|
|
|
if (strncmp(pick, "-", 1) == 0) {
|
|
|
|
CloseNoderec(FALSE);
|
|
|
|
open_bbs();
|
|
|
|
return;
|
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2003-01-31 21:49:29 +00:00
|
|
|
if (strncmp(pick, "A", 1) == 0) {
|
|
|
|
if ((records < CFG.toss_systems) && (records < CFG.tic_systems)) {
|
|
|
|
working(1, 0, 0);
|
|
|
|
if (AppendNoderec() == 0) {
|
|
|
|
records++;
|
|
|
|
working(1, 0, 0);
|
|
|
|
} else
|
|
|
|
working(2, 0, 0);
|
|
|
|
} else {
|
|
|
|
if ((records + 1) > CFG.toss_systems) {
|
2003-10-31 20:53:06 +00:00
|
|
|
errmsg("Cannot add node, change global setting in menu 1.11.11");
|
2003-01-31 21:49:29 +00:00
|
|
|
} else {
|
2003-10-31 20:53:06 +00:00
|
|
|
errmsg("Cannot add node, change global setting in menu 1.10.4");
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
2003-01-31 21:49:29 +00:00
|
|
|
}
|
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2003-01-31 21:49:29 +00:00
|
|
|
if (strncmp(pick, "N", 1) == 0)
|
|
|
|
if ((o + 20) < records)
|
|
|
|
o = o + 20;
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2003-01-31 21:49:29 +00:00
|
|
|
if (strncmp(pick, "P", 1) == 0)
|
|
|
|
if ((o - 20) >= 0)
|
|
|
|
o = o - 20;
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2003-01-31 21:49:29 +00:00
|
|
|
if ((atoi(pick) >= 1) && (atoi(pick) <= records)) {
|
|
|
|
EditNodeRec(atoi(pick));
|
|
|
|
o = ((atoi(pick) - 1) / 20) * 20;
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
2003-01-31 21:49:29 +00:00
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2001-10-19 21:10:43 +00:00
|
|
|
void InitNodes(void)
|
|
|
|
{
|
|
|
|
CountNoderec();
|
|
|
|
OpenNoderec();
|
|
|
|
CloseNoderec(TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2001-08-17 05:46:24 +00:00
|
|
|
fidoaddr PullUplink(char *Hdr)
|
|
|
|
{
|
|
|
|
static fidoaddr uplink;
|
|
|
|
int records, m, i, o, x, y;
|
|
|
|
char pick[12];
|
|
|
|
FILE *fil;
|
2001-10-19 21:10:43 +00:00
|
|
|
char temp[PATH_MAX];
|
2005-10-11 20:49:41 +00:00
|
|
|
int offset;
|
2001-08-17 05:46:24 +00:00
|
|
|
|
|
|
|
memset(&uplink, 0, sizeof(uplink));
|
|
|
|
clr_index();
|
|
|
|
working(1, 0, 0);
|
|
|
|
if (config_read() == -1) {
|
|
|
|
working(2, 0, 0);
|
|
|
|
return uplink;
|
|
|
|
}
|
|
|
|
|
|
|
|
records = CountNoderec();
|
|
|
|
if (records == -1) {
|
|
|
|
working(2, 0, 0);
|
|
|
|
return uplink;
|
|
|
|
}
|
|
|
|
|
|
|
|
o = 0;
|
|
|
|
|
|
|
|
for (;;) {
|
|
|
|
clr_index();
|
|
|
|
set_color(WHITE, BLACK);
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw( 5, 4, "%s. UPLINK SELECT", Hdr);
|
2001-08-17 05:46:24 +00:00
|
|
|
set_color(CYAN, BLACK);
|
|
|
|
if (records != 0) {
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(temp, PATH_MAX, "%s/etc/nodes.data", getenv("MBSE_ROOT"));
|
2001-08-17 05:46:24 +00:00
|
|
|
working(1, 0, 0);
|
|
|
|
if ((fil = fopen(temp, "r")) != NULL) {
|
|
|
|
fread(&nodeshdr, sizeof(nodeshdr), 1, fil);
|
|
|
|
x = 2;
|
|
|
|
y = 7;
|
|
|
|
set_color(CYAN, BLACK);
|
|
|
|
for (i = 1; i <= 20; i++) {
|
|
|
|
if (i == 11) {
|
|
|
|
x = 42;
|
|
|
|
y = 7;
|
|
|
|
}
|
|
|
|
if ((o + i) <= records) {
|
|
|
|
offset = sizeof(nodeshdr) + (((o + i) - 1) * (nodeshdr.recsize + nodeshdr.filegrp + nodeshdr.mailgrp));
|
|
|
|
fseek(fil, offset, 0);
|
|
|
|
fread(&nodes, nodeshdr.recsize, 1, fil);
|
|
|
|
if (strlen(nodes.Sysop))
|
|
|
|
set_color(CYAN, BLACK);
|
|
|
|
else
|
|
|
|
set_color(LIGHTBLUE, BLACK);
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(temp, 81, "%3d. %s (%s)", o + i, nodes.Sysop, strtok(aka2str(nodes.Aka[0]), "@"));
|
2001-08-17 05:46:24 +00:00
|
|
|
temp[37] = 0;
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw(y, x, temp);
|
2001-08-17 05:46:24 +00:00
|
|
|
y++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fclose(fil);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
strcpy(pick, select_pick(records, 20));
|
|
|
|
|
|
|
|
if (strncmp(pick, "-", 1) == 0) {
|
|
|
|
return uplink;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (strncmp(pick, "N", 1) == 0)
|
|
|
|
if ((o + 20) < records)
|
|
|
|
o = o + 20;
|
|
|
|
|
|
|
|
if (strncmp(pick, "P", 1) == 0)
|
|
|
|
if ((o - 20) >= 0)
|
|
|
|
o = o - 20;
|
|
|
|
|
|
|
|
if ((atoi(pick) >= 1) && (atoi(pick) <= records)) {
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(temp, PATH_MAX, "%s/etc/nodes.data", getenv("MBSE_ROOT"));
|
2001-08-17 05:46:24 +00:00
|
|
|
if ((fil = fopen(temp, "r")) != NULL) {
|
|
|
|
fread(&nodeshdr, sizeof(nodeshdr), 1, fil);
|
|
|
|
fseek(fil, ((atoi(pick) -1) * (nodeshdr.recsize + nodeshdr.filegrp + nodeshdr.mailgrp)) + nodeshdr.hdrsize, SEEK_SET);
|
|
|
|
if (fread(&nodes, nodeshdr.recsize, 1, fil) != 1) {
|
|
|
|
fclose(fil);
|
|
|
|
return uplink;
|
|
|
|
}
|
|
|
|
fclose(fil);
|
|
|
|
|
|
|
|
for (;;) {
|
|
|
|
clr_index();
|
|
|
|
set_color(WHITE, BLACK);
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw( 5, 6, "%s. SELECT NODE AKA", Hdr);
|
2001-08-17 05:46:24 +00:00
|
|
|
set_color(CYAN, BLACK);
|
|
|
|
y = 7; x = 6;
|
|
|
|
for (i = 0; i < 20; i++) {
|
|
|
|
if (i == 10) {
|
|
|
|
y = 7; x = 46;
|
|
|
|
}
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw( y, x, (char *)"%d.", i + 1);
|
2001-08-17 05:46:24 +00:00
|
|
|
if (nodes.Aka[i].zone)
|
2004-10-27 11:08:09 +00:00
|
|
|
mbse_mvprintw(y, x + 5, (char *)"%s", aka2str(nodes.Aka[i]));
|
2001-08-17 05:46:24 +00:00
|
|
|
y++;
|
|
|
|
}
|
|
|
|
|
|
|
|
m = select_menu(20);
|
|
|
|
switch(m) {
|
|
|
|
case 0:
|
|
|
|
return uplink;
|
|
|
|
|
|
|
|
default:
|
|
|
|
uplink = nodes.Aka[m - 1];
|
|
|
|
return uplink;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return uplink;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int node_doc(FILE *fp, FILE *toc, int page)
|
|
|
|
{
|
2004-03-29 19:47:14 +00:00
|
|
|
char temp[PATH_MAX];
|
|
|
|
FILE *ti, *wp, *ip, *no;
|
|
|
|
int systems, groups, nr, refs, i, j, k, First = TRUE;
|
|
|
|
char group[13];
|
|
|
|
sysconnect System;
|
2005-10-11 20:49:41 +00:00
|
|
|
time_t tt;
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(temp, PATH_MAX, "%s/etc/nodes.data", getenv("MBSE_ROOT"));
|
2004-03-29 19:47:14 +00:00
|
|
|
if ((no = fopen(temp, "r")) == NULL)
|
|
|
|
return page;
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2004-03-29 19:47:14 +00:00
|
|
|
fread(&nodeshdr, sizeof(nodeshdr), 1, no);
|
|
|
|
fseek(no, 0, SEEK_SET);
|
|
|
|
fread(&nodeshdr, nodeshdr.hdrsize, 1, no);
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2004-03-29 19:47:14 +00:00
|
|
|
ip = open_webdoc((char *)"nodes.html", (char *)"Fidonet Nodes", NULL);
|
|
|
|
fprintf(ip, "<A HREF=\"index.html\">Main</A>\n");
|
2005-05-09 19:06:28 +00:00
|
|
|
fprintf(ip, "<P>\n");
|
|
|
|
fprintf(ip, "<TABLE border='1' cellspacing='0' cellpadding='2'>\n");
|
|
|
|
fprintf(ip, "<TBODY>\n");
|
|
|
|
fprintf(ip, "<TR><TH align='left'>Node</TH><TH align='left'>Sysop</TH><TH align='left'>Flags</TH></TR>\n");
|
|
|
|
|
2004-03-29 19:47:14 +00:00
|
|
|
while ((fread(&nodes, nodeshdr.recsize, 1, no)) == 1) {
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2004-03-29 19:47:14 +00:00
|
|
|
page = newpage(fp, page);
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2004-03-29 19:47:14 +00:00
|
|
|
if (First) {
|
|
|
|
addtoc(fp, toc, 7, 0, page, (char *)"Fidonet nodes");
|
|
|
|
First = FALSE;
|
|
|
|
fprintf(fp, "\n");
|
|
|
|
} else
|
|
|
|
fprintf(fp, "\n\n");
|
|
|
|
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(temp, 81, "node_%d_%d_%d_%d_%s.html", nodes.Aka[0].zone, nodes.Aka[0].net, nodes.Aka[0].node,
|
2004-03-29 19:47:14 +00:00
|
|
|
nodes.Aka[0].point, nodes.Aka[0].domain);
|
2005-05-09 19:06:28 +00:00
|
|
|
fprintf(ip, " <TR><TD><A HREF=\"%s\">%s</A></TD><TD>%s</TD><TD>%s</TD></TR>\n",
|
|
|
|
temp, aka2str(nodes.Aka[0]), nodes.Sysop, nodes.Crash ? "Crash": nodes.Hold ? "Hold":"Normal");
|
|
|
|
|
2004-03-29 19:47:14 +00:00
|
|
|
if ((wp = open_webdoc(temp, (char *)"Fidonet node", aka2str(nodes.Aka[0])))) {
|
|
|
|
fprintf(wp, "<A HREF=\"index.html\">Main</A> <A HREF=\"nodes.html\">Back</A>\n");
|
|
|
|
fprintf(wp, "<P>\n");
|
|
|
|
fprintf(wp, "<TABLE width='600' border='0' cellspacing='0' cellpadding='2'>\n");
|
|
|
|
fprintf(wp, "<COL width='30%%'><COL width='70%%'>\n");
|
|
|
|
fprintf(wp, "<TBODY>\n");
|
|
|
|
add_webtable(wp, (char *)"Sysop", nodes.Sysop);
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Sysop %s\n", nodes.Sysop);
|
2004-03-29 19:47:14 +00:00
|
|
|
if (strlen(nodes.OutBox)) {
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Outbox dir %s\n", nodes.OutBox);
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Outbox directory", nodes.OutBox);
|
|
|
|
}
|
2005-10-11 20:49:41 +00:00
|
|
|
tt = (time_t)nodes.StartDate;
|
|
|
|
fprintf(fp, " First date %s", ctime(&tt));
|
|
|
|
add_webtable(wp, (char *)"First date", ctime(&tt));
|
|
|
|
tt = (time_t)nodes.LastDate;
|
|
|
|
fprintf(fp, " Last date %s", ctime(&tt));
|
|
|
|
add_webtable(wp, (char *)"Last date", ctime(&tt));
|
2004-03-29 19:47:14 +00:00
|
|
|
for (i = 0; i < 20; i++)
|
|
|
|
if (nodes.Aka[i].zone) {
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Aka %2d %s\n", i+1, aka2str(nodes.Aka[i]));
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(temp, 81, "Aka %d", i+1);
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, temp, aka2str(nodes.Aka[i]));
|
|
|
|
}
|
|
|
|
if (nodes.RouteVia.zone) {
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Route via %s\n", aka2str(nodes.RouteVia));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Route via", aka2str(nodes.RouteVia));
|
|
|
|
}
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Session pwd %s\n", nodes.Spasswd);
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Session password", nodes.Spasswd);
|
|
|
|
if (strlen(nodes.dial)) {
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Dial command %s\n", nodes.dial);
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Dial command", nodes.dial);
|
|
|
|
}
|
|
|
|
if (strlen(nodes.phone[0]) || strlen(nodes.phone[1])) {
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Phone numbers %s %s\n", nodes.phone[0], nodes.phone[1]);
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(temp, 81, "%s %s", nodes.phone[0], nodes.phone[1]);
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Phone numbers", temp);
|
|
|
|
}
|
|
|
|
if (strlen(nodes.Nl_flags)) {
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Nodelist flags %s\n", nodes.Nl_flags);
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Nodelist flags", nodes.Nl_flags);
|
|
|
|
}
|
|
|
|
if (strlen(nodes.Nl_hostname)) {
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Hostname %s\n", nodes.Nl_hostname);
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Hostname", nodes.Nl_hostname);
|
|
|
|
}
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " PKT password %s\n", nodes.Epasswd);
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"PKT password", nodes.Epasswd);
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Files passwd %s\n", nodes.Fpasswd);
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Files passwd", nodes.Fpasswd);
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Areamgr pwd %s\n\n", nodes.Apasswd);
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Areamgr pwd", nodes.Apasswd);
|
|
|
|
fprintf(wp, "<TR><TD colspan='2'> </TD></TR>\n");
|
|
|
|
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Mail direct %s", getboolean(nodes.Direct));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Mail direct", getboolean(nodes.Direct));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Mail crash %s", getboolean(nodes.Crash));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Mail crash", getboolean(nodes.Crash));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Mail hold %s\n", getboolean(nodes.Hold));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Mail hold", getboolean(nodes.Hold));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Pack mail %s", getboolean(nodes.PackNetmail));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Pack mail", getboolean(nodes.PackNetmail));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Send notify %s", getboolean(nodes.Notify));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Send notify messages", getboolean(nodes.Notify));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Language %c\n", nodes.Language);
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(temp, 81, "%c", nodes.Language);
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Language", temp);
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " No EMSI %s", getboolean(nodes.NoEMSI));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"No EMSI", getboolean(nodes.NoEMSI));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " No YooHoo/2U2 %s", getboolean(nodes.NoWaZOO));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"No YooHoo/2U2", getboolean(nodes.NoWaZOO));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " No Filerequests %s\n", getboolean(nodes.NoFreqs));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"No File Requests", getboolean(nodes.NoFreqs));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Don't call %s", getboolean(nodes.NoCall));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Don't call", getboolean(nodes.NoCall));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " 8.3 filenames %s", getboolean(nodes.FNC));
|
2005-07-03 20:32:21 +00:00
|
|
|
add_webtable(wp, (char *)"8.3 filenames", getboolean(nodes.FNC));
|
2006-01-28 15:12:25 +00:00
|
|
|
fprintf(fp, " Use NR mode %s\n", getboolean(nodes.DoNR));
|
|
|
|
add_webtable(wp, (char *)"Use NR mode", getboolean(nodes.DoNR));
|
|
|
|
fprintf(fp, " No PLZ %s", getboolean(nodes.NoPLZ));
|
2005-07-03 20:32:21 +00:00
|
|
|
add_webtable(wp, (char *)"No PLZ compression", getboolean(nodes.NoPLZ));
|
2006-01-28 15:12:25 +00:00
|
|
|
fprintf(fp, " No GZ/BZ2 %s", getboolean(nodes.NoGZ));
|
2005-07-03 20:32:21 +00:00
|
|
|
add_webtable(wp, (char *)"No GZ/BZ2 compression", getboolean(nodes.NoGZ));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " No Zmodem %s\n", getboolean(nodes.NoZmodem));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"No Zmodem", getboolean(nodes.NoZmodem));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " No Zedzap %s", getboolean(nodes.NoZedzap));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"No Zedzap", getboolean(nodes.NoZedzap));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " No Hydra %s", getboolean(nodes.NoHydra));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"No Hydra", getboolean(nodes.NoHydra));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " binkp old esc %s\n", getboolean(nodes.WrongEscape));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Binkp old esc method", getboolean(nodes.WrongEscape));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " No binkp/1.1 %s", getboolean(nodes.NoBinkp11));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"No binkp/1.1 sessions", getboolean(nodes.NoBinkp11));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Ignore Hold/Down %s", getboolean(nodes.IgnHold));
|
|
|
|
add_webtable(wp, (char *)"Ignore Hold/Down", getboolean(nodes.IgnHold));
|
|
|
|
|
|
|
|
fprintf(fp, " Mail forward %s\n", getboolean(nodes.MailFwd));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Mail forward", getboolean(nodes.MailFwd));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Check mailpwd %s", getboolean(nodes.MailPwdCheck));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Check mailpassword", getboolean(nodes.MailPwdCheck));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " ARCmail comp. %s", getboolean(nodes.ARCmailCompat));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)" ARCmail compatibility", getboolean(nodes.ARCmailCompat));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " ACRmail a..z %s\n", getboolean(nodes.ARCmailAlpha));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"ACRmail a..z", getboolean(nodes.ARCmailAlpha));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Send message %s", getboolean(nodes.Message));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Send netmail with files", getboolean(nodes.Message));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Send .TIC %s", getboolean(nodes.Tic));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Send .TIC files", getboolean(nodes.Tic));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " File forward %s\n", getboolean(nodes.FileFwd));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"File forward", getboolean(nodes.FileFwd));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Advanced TIC %s", getboolean(nodes.AdvTic));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Advanced TIC files", getboolean(nodes.AdvTic));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Advanded SB %s", getboolean(nodes.TIC_AdvSB));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)" Advanded SB lines in .TIC", getboolean(nodes.TIC_AdvSB));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Sent To line %s\n", getboolean(nodes.TIC_To));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Sent 'To' lines in .TIC", getboolean(nodes.TIC_To));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Security flags %s\n\n", getflag(nodes.Security.flags, nodes.Security.notflags));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Security flags", getflag(nodes.Security.flags, nodes.Security.notflags));
|
|
|
|
fprintf(wp, "<TR><TD colspan='2'> </TD></TR>\n");
|
|
|
|
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Outbound session %s\n", get_sessiontype(nodes.Session_out));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Outbound session", get_sessiontype(nodes.Session_out));
|
|
|
|
if (nodes.Session_out == S_DIR) {
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Path %s\n", nodes.Dir_out_path);
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Path", nodes.Dir_out_path);
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Check lock %s", getboolean(nodes.Dir_out_chklck));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Check lock", getboolean(nodes.Dir_out_chklck));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Wait clear lock %s\n", getboolean(nodes.Dir_out_waitclr));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Wait clear lock", getboolean(nodes.Dir_out_waitclr));
|
|
|
|
if (nodes.Dir_out_chklck) {
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " File to check %s\n", nodes.Dir_out_clock);
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"File to check", nodes.Dir_out_clock);
|
|
|
|
}
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Create lock %s\n", getboolean(nodes.Dir_out_mklck));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Create lock", getboolean(nodes.Dir_out_mklck));
|
|
|
|
if (nodes.Dir_out_mklck) {
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " File to create %s\n", nodes.Dir_out_mlock);
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"File to create", nodes.Dir_out_mlock);
|
|
|
|
}
|
|
|
|
}
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Inbound session %s\n", get_sessiontype(nodes.Session_in));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Inbound session", get_sessiontype(nodes.Session_in));
|
|
|
|
if (nodes.Session_in == S_DIR) {
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Path %s\n", nodes.Dir_in_path);
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Path", nodes.Dir_in_path);
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Check lock %s", getboolean(nodes.Dir_in_chklck));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Check lock", getboolean(nodes.Dir_in_chklck));
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Wait clear lock %s\n", getboolean(nodes.Dir_in_waitclr));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Wait clear lock", getboolean(nodes.Dir_in_waitclr));
|
|
|
|
if (nodes.Dir_in_chklck) {
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " File to check %s\n", nodes.Dir_in_clock);
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"File to check", nodes.Dir_in_clock);
|
|
|
|
}
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " Create lock %s\n", getboolean(nodes.Dir_in_mklck));
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"Create lock", getboolean(nodes.Dir_in_mklck));
|
|
|
|
if (nodes.Dir_in_mklck) {
|
2005-08-21 13:35:22 +00:00
|
|
|
fprintf(fp, " File to create %s\n", nodes.Dir_in_mlock);
|
2004-03-29 19:47:14 +00:00
|
|
|
add_webtable(wp, (char *)"File to create", nodes.Dir_in_mlock);
|
2002-08-03 15:22:40 +00:00
|
|
|
}
|
2004-03-29 19:47:14 +00:00
|
|
|
}
|
|
|
|
fprintf(fp, "\n");
|
|
|
|
fprintf(wp, "</TBODY>\n");
|
|
|
|
fprintf(wp, "</TABLE>\n");
|
|
|
|
|
|
|
|
fprintf(wp, "<P>\n");
|
|
|
|
fprintf(wp, "<TABLE width='600' border='0' cellspacing='0' cellpadding='2'>\n");
|
|
|
|
fprintf(wp, "<COL width='30%%'><COL width='30%%'><COL width='40%%'>\n");
|
|
|
|
fprintf(wp, "<TBODY>\n");
|
2004-08-12 14:21:02 +00:00
|
|
|
fprintf(wp, "<TR><TH align='left'>Uplink mgrs</TH><TH align='left'>Program</TH><TH align='left'>Password</TH><TH>BBBS</TH></TR>\n");
|
|
|
|
fprintf(wp, "<TR><TH align='left'>Files</TH><TD>%s</TD><TD>%s</TD><TD>%s</TD></TR>\n", nodes.UplFmgrPgm, nodes.UplFmgrPass, getboolean(nodes.UplFmgrBbbs));
|
|
|
|
fprintf(wp, "<TR><TH align='left'>Mail</TH><TD>%s</TD><TD>%s</TD><TD>%s</TD></TR>\n", nodes.UplAmgrPgm, nodes.UplAmgrPass, getboolean(nodes.UplAmgrBbbs));
|
2004-03-29 19:47:14 +00:00
|
|
|
fprintf(wp, "</TBODY>\n");
|
|
|
|
fprintf(wp, "</TABLE>\n");
|
2004-08-12 14:21:02 +00:00
|
|
|
fprintf(fp, " Uplink mgrs Program Password BBBS\n");
|
|
|
|
fprintf(fp, " ------------ -------- --------------- ----\n");
|
|
|
|
fprintf(fp, " Files %-8s %-15s %s\n", nodes.UplFmgrPgm, nodes.UplFmgrPass, getboolean(nodes.UplFmgrBbbs));
|
|
|
|
fprintf(fp, " Mail %-8s %-15s %s\n\n", nodes.UplAmgrPgm, nodes.UplAmgrPass, getboolean(nodes.UplAmgrBbbs));
|
2004-03-29 19:47:14 +00:00
|
|
|
|
|
|
|
fprintf(wp, "<HR>\n");
|
|
|
|
fprintf(wp, "<H3>Node Statistics</H3>\n");
|
|
|
|
add_statcnt(wp, (char *)"sent files", nodes.FilesSent);
|
|
|
|
add_statcnt(wp, (char *)"KBytes files", nodes.F_KbSent);
|
|
|
|
add_statcnt(wp, (char *)"received messages", nodes.MailRcvd);
|
|
|
|
add_statcnt(wp, (char *)"sent messages", nodes.MailSent);
|
|
|
|
fprintf(fp, " Statistics Send KBytes Received KBytes\n");
|
|
|
|
fprintf(fp, " ------------ -------- -------- -------- --------\n");
|
2005-10-11 20:49:41 +00:00
|
|
|
fprintf(fp, " Total files %-8u %-8u %-8u %-8u\n", nodes.FilesSent.total, nodes.F_KbSent.total,
|
2004-03-29 19:47:14 +00:00
|
|
|
nodes.FilesRcvd.total, nodes.F_KbSent.total);
|
2005-10-11 20:49:41 +00:00
|
|
|
fprintf(fp, " Total mail %-8u %-8u\n\n", nodes.MailSent.total, nodes.MailRcvd.total);
|
2004-03-29 19:47:14 +00:00
|
|
|
|
2004-04-08 18:37:28 +00:00
|
|
|
fprintf(wp, "<HR>\n");
|
|
|
|
fprintf(wp, "<H3>Private data</H3>\n");
|
|
|
|
add_webtable(wp, (char *)"Private phone", nodes.Ct_phone);
|
|
|
|
add_webtable(wp, (char *)"Fax number", nodes.Ct_fax);
|
|
|
|
add_webtable(wp, (char *)"Cellphone", nodes.Ct_cellphone);
|
|
|
|
add_webtable(wp, (char *)"E-mail", nodes.Ct_email);
|
|
|
|
add_webtable(wp, (char *)"Remark", nodes.Ct_remark);
|
|
|
|
|
2004-03-29 19:47:14 +00:00
|
|
|
fprintf(wp, "<HR>\n");
|
|
|
|
fprintf(wp, "<H3>File Groups</H3>\n");
|
|
|
|
fprintf(wp, "<PRE>\n");
|
|
|
|
fprintf(wp, " ");
|
|
|
|
fprintf(fp, " File groups:\n ");
|
|
|
|
groups = nodeshdr.filegrp / sizeof(group);
|
|
|
|
for (i = 0; i < groups; i++) {
|
|
|
|
fread(&group, sizeof(group), 1, no);
|
|
|
|
if (strlen(group)) {
|
|
|
|
fprintf(fp, "%-12s ", group);
|
|
|
|
fprintf(wp, "<A HREF=\"filegroup_%s.html\">%s</A>", group, group);
|
|
|
|
for (j = 0; j < (13 - strlen(group)); j++)
|
|
|
|
fprintf(wp, " ");
|
|
|
|
if (((i+1) % 5) == 0) {
|
|
|
|
fprintf(fp, "\n ");
|
|
|
|
fprintf(wp, "\n ");
|
|
|
|
}
|
2002-08-03 15:22:40 +00:00
|
|
|
}
|
2004-03-29 19:47:14 +00:00
|
|
|
}
|
|
|
|
if ((i+1) % 5) {
|
2002-08-03 15:22:40 +00:00
|
|
|
fprintf(fp, "\n");
|
2004-03-29 19:47:14 +00:00
|
|
|
fprintf(wp, "\n");
|
|
|
|
}
|
|
|
|
fprintf(wp, "</PRE>\n");
|
|
|
|
|
|
|
|
fprintf(wp, "<HR>\n");
|
|
|
|
fprintf(wp, "<H3>Mail Groups</H3>\n");
|
|
|
|
fprintf(wp, "<PRE>\n");
|
|
|
|
fprintf(wp, " ");
|
|
|
|
fprintf(fp, "\n Mail groups:\n ");
|
|
|
|
groups = nodeshdr.mailgrp / sizeof(group);
|
|
|
|
for (i = 0; i < groups; i++) {
|
|
|
|
fread(&group, sizeof(group), 1, no);
|
|
|
|
if (strlen(group)) {
|
|
|
|
fprintf(fp, "%-12s ", group);
|
|
|
|
fprintf(wp, "<A HREF=\"msggroup_%s.html\">%s</A>", group, group);
|
|
|
|
for (j = 0; j < (13 - strlen(group)); j++)
|
|
|
|
fprintf(wp, " ");
|
|
|
|
if (((i+1) % 5) == 0) {
|
|
|
|
fprintf(fp, "\n ");
|
|
|
|
fprintf(wp, "\n ");
|
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
2004-03-29 19:47:14 +00:00
|
|
|
}
|
|
|
|
if ((i+1) % 5) {
|
|
|
|
fprintf(fp, "\n");
|
|
|
|
fprintf(wp, "\n");
|
|
|
|
}
|
|
|
|
fprintf(wp, "</PRE>\n");
|
|
|
|
|
|
|
|
fprintf(wp, "<HR>\n");
|
|
|
|
fprintf(wp, "<H3>TIC Areas</H3>\n");
|
|
|
|
refs = 0;
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(temp, PATH_MAX, "%s/etc/tic.data", getenv("MBSE_ROOT"));
|
2004-03-29 19:47:14 +00:00
|
|
|
if ((ti = fopen(temp, "r"))) {
|
|
|
|
fread(&tichdr, tichdr.hdrsize, 1, ti);
|
|
|
|
systems = tichdr.syssize / sizeof(sysconnect);
|
|
|
|
while ((fread(&tic, tichdr.recsize, 1, ti)) == 1) {
|
|
|
|
for (i = 0; i < systems; i++) {
|
|
|
|
fread(&System, sizeof(sysconnect), 1, ti);
|
|
|
|
for (k = 0; k < 20; k++) {
|
|
|
|
if (nodes.Aka[k].zone && tic.Active &&
|
|
|
|
(System.aka.zone == nodes.Aka[k].zone) && (System.aka.net == nodes.Aka[k].net) &&
|
|
|
|
(System.aka.node == nodes.Aka[k].node) && (System.aka.point == nodes.Aka[k].point) &&
|
|
|
|
(strcmp(System.aka.domain, nodes.Aka[k].domain) == 0)) {
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(temp, 81, "---");
|
2004-03-29 19:47:14 +00:00
|
|
|
if (System.sendto)
|
|
|
|
temp[0] = 'S';
|
|
|
|
if (System.receivefrom)
|
|
|
|
temp[1] = 'R';
|
|
|
|
if (System.pause)
|
|
|
|
temp[2] = 'P';
|
|
|
|
if (refs == 0) {
|
|
|
|
fprintf(wp, "<TABLE width='600' border='0' cellspacing='0' cellpadding='2'>\n");
|
|
|
|
fprintf(wp, "<COL width='20%%'><COL width='10%%'><COL width='70%%'>\n");
|
|
|
|
fprintf(wp, "<TBODY>\n");
|
|
|
|
}
|
|
|
|
refs++;
|
|
|
|
fprintf(wp, "<TR><TD><A HREF=\"tic_%s.html\">%s</A></TD><TD>%s</TD><TD>%s</TD></TR>\n",
|
|
|
|
tic.Name, tic.Name, temp, tic.Comment);
|
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
2004-03-29 19:47:14 +00:00
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
2004-03-29 19:47:14 +00:00
|
|
|
fclose(ti);
|
|
|
|
}
|
|
|
|
if (refs) {
|
|
|
|
fprintf(wp, "</TBODY>\n");
|
|
|
|
fprintf(wp, "</TABLE>\n");
|
|
|
|
} else {
|
|
|
|
fprintf(wp, "No TIC area references");
|
|
|
|
}
|
|
|
|
|
|
|
|
fprintf(wp, "<HR>\n");
|
|
|
|
fprintf(wp, "<H3>Message Areas</H3>\n");
|
|
|
|
nr = refs = 0;
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(temp, PATH_MAX, "%s/etc/mareas.data", getenv("MBSE_ROOT"));
|
2004-03-29 19:47:14 +00:00
|
|
|
if ((ti = fopen(temp, "r"))) {
|
|
|
|
fread(&msgshdr, msgshdr.hdrsize, 1, ti);
|
|
|
|
systems = msgshdr.syssize / sizeof(sysconnect);
|
|
|
|
while ((fread(&msgs, msgshdr.recsize, 1, ti)) == 1) {
|
|
|
|
nr++;
|
|
|
|
for (i = 0; i < systems; i++) {
|
|
|
|
fread(&System, sizeof(sysconnect), 1, ti);
|
|
|
|
for (k = 0; k < 20; k++) {
|
|
|
|
if (nodes.Aka[k].zone && msgs.Active &&
|
|
|
|
(System.aka.zone == nodes.Aka[k].zone) && (System.aka.net == nodes.Aka[k].net) &&
|
|
|
|
(System.aka.node == nodes.Aka[k].node) && (System.aka.point == nodes.Aka[k].point) &&
|
|
|
|
(strcmp(System.aka.domain, nodes.Aka[k].domain) == 0)) {
|
2005-08-29 15:11:05 +00:00
|
|
|
snprintf(temp, 81, "----");
|
2004-03-29 19:47:14 +00:00
|
|
|
if (System.sendto)
|
|
|
|
temp[0] = 'S';
|
|
|
|
if (System.receivefrom)
|
|
|
|
temp[1] = 'R';
|
|
|
|
if (System.pause)
|
|
|
|
temp[2] = 'P';
|
|
|
|
if (System.cutoff)
|
|
|
|
temp[3] = 'C';
|
|
|
|
if (refs == 0) {
|
|
|
|
fprintf(wp, "<TABLE width='600' border='0' cellspacing='0' cellpadding='2'>\n");
|
|
|
|
fprintf(wp, "<COL width='20%%'><COL width='10%%'><COL width='70%%'>\n");
|
|
|
|
fprintf(wp, "<TBODY>\n");
|
|
|
|
}
|
|
|
|
refs++;
|
|
|
|
fprintf(wp, "<TR><TD><A HREF=\"msgarea_%d.html\">Area %d</A></TD><TD>%s</TD><TD>%s</TD></TR>\n",
|
|
|
|
nr, nr, temp, msgs.Name);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fclose(ti);
|
|
|
|
}
|
|
|
|
if (refs) {
|
|
|
|
fprintf(wp, "</TBODY>\n");
|
|
|
|
fprintf(wp, "</TABLE>\n");
|
|
|
|
} else {
|
|
|
|
fprintf(wp, "No Message Area references");
|
|
|
|
}
|
|
|
|
|
|
|
|
close_webdoc(wp);
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
2004-03-29 19:47:14 +00:00
|
|
|
}
|
2001-08-17 05:46:24 +00:00
|
|
|
|
2005-05-09 19:06:28 +00:00
|
|
|
fprintf(ip, "</TBODY>\n");
|
|
|
|
fprintf(ip, "</TABLE>\n");
|
2004-03-29 19:47:14 +00:00
|
|
|
close_webdoc(ip);
|
|
|
|
|
|
|
|
fclose(no);
|
|
|
|
return page;
|
2001-08-17 05:46:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|