Changed to support BBBS uplink requests

This commit is contained in:
Michiel Broek 2004-08-12 15:08:20 +00:00
parent 9198b319d3
commit 8c57fc580f
6 changed files with 60 additions and 41 deletions

View File

@ -3,16 +3,25 @@ $Id$
v0.61.4 11-Aug-2004
upgrade:
If you have BBBS uplinks and use automatic uplink requests then
change the setup of these nodes in screen 7.10.
mbfido:
No help was displayed when no valid command was given.
Echomail for non-existing areas now finally is stored in the
badmail area.
Echomail received from not connected nodes is stored in the
badmail area unless the area allowes it.
Can now send (hopefully) valid uplink requests to BBBS systems.
mbuser:
Fixed permissions.
mbsetup:
Changed nodes screens to have a separate uplink managers setup
screen, and added switches for BBBS uplinks.
v0.61.3 25-Jul-2004 - 11-Aug-2004

2
TODO
View File

@ -116,8 +116,6 @@ mbfido:
N: Implement areamgr/filemgr %avail command to list available areas
from areas files.
N: Areamgr uplink request, add change for bbbs (Aarrrgghhh).
mbcico:
L: Implement binkp option ND.

View File

@ -190,8 +190,11 @@ int CheckTicGroup(char *Area, int SendUplink, faddr *f)
* Area is in AREAS file, now create area.
* If needed, connect at uplink.
*/
if (SendUplink) {
sprintf(temp, "+%s", tag);
if (SendUplink && SearchNode(fgroup.UpLink)) {
if (nodes.UplFmgrBbbs)
sprintf(temp, "file +%s", tag);
else
sprintf(temp, "+%s", tag);
From = fido2faddr(fgroup.UseAka);
To = fido2faddr(fgroup.UpLink);

View File

@ -126,8 +126,11 @@ int CheckEchoGroup(char *Area, int SendUplink, faddr *f)
* Area is in AREAS file, now create area.
* If needed, connect at uplink.
*/
if (SendUplink) {
sprintf(temp, "+%s", tag);
if (SendUplink && SearchNode(mgroup.UpLink)) {
if (nodes.UplAmgrBbbs)
sprintf(temp, "echo +%s", tag);
else
sprintf(temp, "+%s", tag);
From = fido2faddr(mgroup.UseAka);
To = fido2faddr(mgroup.UpLink);
if (UplinkRequest(To, From, FALSE, temp)) {

View File

@ -550,7 +550,7 @@ int Areas(void)
fseek(gp, mgrouphdr.hdrsize, SEEK_SET);
while ((fread(&mgroup, mgrouphdr.recsize, 1, gp)) == 1) {
if (mgroup.Active && mgroup.AutoChange && strlen(mgroup.AreaFile)) {
if (mgroup.Active && mgroup.AutoChange && strlen(mgroup.AreaFile) && mgroup.UpLink.zone && SearchNode(mgroup.UpLink)) {
if (!do_quiet) {
colour(CYAN, BLACK);
printf("\rEcho group %-12s ", mgroup.Name);
@ -633,10 +633,14 @@ int Areas(void)
*/
CheckEchoGroup(tmp->Name, FALSE, NULL);
if (cmd == NULL) {
cmd = xstrcpy((char *)"+");
cmd = xstrcpy((char *)"");
} else {
cmd = xstrcat(cmd, (char *)"\r+");
cmd = xstrcat(cmd, (char *)"\r");
}
if (nodes.UplAmgrBbbs)
cmd = xstrcat(cmd, (char *)"echo +");
else
cmd = xstrcat(cmd, (char *)"+");
cmd = xstrcat(cmd, tmp->Name);
if (CFG.slow_util && do_quiet)
msleep(1);
@ -692,9 +696,13 @@ int Areas(void)
* Prepare uplink command
*/
if (cmd == NULL)
cmd = xstrcpy((char *)"-");
cmd = xstrcpy((char *)"");
else
cmd = xstrcat(cmd, (char *)"\r-");
cmd = xstrcat(cmd, (char *)"\r");
if (nodes.UplAmgrBbbs)
cmd = xstrcat(cmd, (char *)"echo -");
else
cmd = xstrcat(cmd, (char *)"-");
cmd = xstrcat(cmd, tmp->Name);
break;
} else {
@ -710,19 +718,15 @@ int Areas(void)
/*
* Sent one uplink command with additions and deletions
*/
if (mgroup.UpLink.zone) {
From = fido2faddr(mgroup.UseAka);
To = fido2faddr(mgroup.UpLink);
if (UplinkRequest(To, From, FALSE, cmd)) {
WriteError("Uplink request failed");
} else {
Mgrlog("AreaMgr request sent to %s", aka2str(mgroup.UpLink));
}
tidy_faddr(From);
tidy_faddr(To);
From = fido2faddr(mgroup.UseAka);
To = fido2faddr(mgroup.UpLink);
if (UplinkRequest(To, From, FALSE, cmd)) {
WriteError("Uplink request failed");
} else {
Syslog('+', "No uplink defined, not sending a AreaMgr request");
Mgrlog("AreaMgr request sent to %s", aka2str(mgroup.UpLink));
}
tidy_faddr(From);
tidy_faddr(To);
free(cmd);
cmd = NULL;
}
@ -731,7 +735,7 @@ int Areas(void)
fflush(stdout);
}
}
}
}
}
fclose(gp);
}
@ -744,7 +748,7 @@ int Areas(void)
fseek(gp, fgrouphdr.hdrsize, SEEK_SET);
while ((fread(&fgroup, fgrouphdr.recsize, 1, gp)) == 1) {
if (fgroup.Active && fgroup.AutoChange && strlen(fgroup.AreaFile)) {
if (fgroup.Active && fgroup.AutoChange && strlen(fgroup.AreaFile) && fgroup.UpLink.zone && SearchNode(fgroup.UpLink)) {
if (!do_quiet) {
colour(CYAN, BLACK);
printf("\r TIC group %-12s ", fgroup.Name);
@ -879,10 +883,14 @@ int Areas(void)
*/
CheckTicGroup(tmp->Name, FALSE, NULL);
if (cmd == NULL) {
cmd = xstrcpy((char *)"+");
cmd = xstrcpy((char *)"");
} else {
cmd = xstrcat(cmd, (char *)"\r+");
cmd = xstrcat(cmd, (char *)"\r");
}
if (nodes.UplFmgrBbbs)
cmd = xstrcat(cmd, (char *)"file +");
else
cmd = xstrcat(cmd, (char *)"+");
cmd = xstrcat(cmd, tmp->Name);
if (CFG.slow_util && do_quiet)
msleep(1);
@ -919,9 +927,13 @@ int Areas(void)
* Prepare uplink command
*/
if (cmd == NULL)
cmd = xstrcpy((char *)"-");
cmd = xstrcpy((char *)"");
else
cmd = xstrcat(cmd, (char *)"\r-");
cmd = xstrcat(cmd, (char *)"\r");
if (nodes.UplFmgrBbbs)
cmd = xstrcat(cmd, (char *)"file -");
else
cmd = xstrcat(cmd, (char *)"-");
cmd = xstrcat(cmd, tmp->Name);
}
fseek(fp, tichdr.syssize, SEEK_CUR);
@ -968,19 +980,15 @@ int Areas(void)
/*
* Sent one uplink command with additions and deletions
*/
if (fgroup.UpLink.zone) {
From = fido2faddr(fgroup.UseAka);
To = fido2faddr(fgroup.UpLink);
if (UplinkRequest(To, From, TRUE, cmd)) {
WriteError("Uplink request failed");
} else {
Mgrlog("FileMgr request sent to %s", aka2str(fgroup.UpLink));
}
tidy_faddr(From);
tidy_faddr(To);
From = fido2faddr(fgroup.UseAka);
To = fido2faddr(fgroup.UpLink);
if (UplinkRequest(To, From, TRUE, cmd)) {
WriteError("Uplink request failed");
} else {
Syslog('+', "No uplink defined, not sending a FileMgr request");
Mgrlog("FileMgr request sent to %s", aka2str(fgroup.UpLink));
}
tidy_faddr(From);
tidy_faddr(To);
free(cmd);
cmd = NULL;
}

View File

@ -1565,8 +1565,6 @@ int node_doc(FILE *fp, FILE *toc, int page)
add_webtable(wp, (char *)" Advanded SB lines in .TIC", getboolean(nodes.TIC_AdvSB));
fprintf(fp, " Sent To line %s", getboolean(nodes.TIC_To));
add_webtable(wp, (char *)"Sent 'To' lines in .TIC", getboolean(nodes.TIC_To));
fprintf(fp, " Uplink add + %s\n", getboolean(nodes.AddPlus));
add_webtable(wp, (char *)" Uplink add +", getboolean(nodes.AddPlus));
fprintf(fp, " Security flags %s\n\n", getflag(nodes.Security.flags, nodes.Security.notflags));
add_webtable(wp, (char *)"Security flags", getflag(nodes.Security.flags, nodes.Security.notflags));
fprintf(wp, "<TR><TD colspan='2'>&nbsp;</TD></TR>\n");