diff --git a/ChangeLog b/ChangeLog index cf49ba0b..ea68b1ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,10 @@ $Id$ v0.35.01 05-Jun-2002 + upgrade: + Start mbsetup, check in the nodes setup if all the session + passwords are ok. + general: Added structures for netmail routing file. Expanded nodes structures for FTP and Directory transfers. @@ -31,6 +35,10 @@ v0.35.01 05-Jun-2002 Fixed a problem with the calculated filetransfer speed with large files on fast connections. + mbfido: + When creating uplink area requests the from aka used is now + the aka defined in the group. + mbfile: Added -v commandline switch to supress virus checking for the adopt and import commands. Use with great care. @@ -45,6 +53,8 @@ v0.35.01 05-Jun-2002 in the setup and enabled. Others are shown there with default paths but are disabled, they can be used as examples. Fixed crashing mbsetup in menus 10.3.2, 10.4.5 and 10.4.6. + Menu 1.1 system aka's now has the option to move aka's to + other positions. Added some check's on the main aka's. v0.33.21 04-Jun-2002 diff --git a/README b/README index 2714a7a6..f6874ec8 100644 --- a/README +++ b/README @@ -1,4 +1,6 @@ - MBSE BBS Packages. +$Id$ + + MBSE BBS Packages. Distribution naming scheme: @@ -13,4 +15,11 @@ mbsebbs-0.33.18.tar.gz For fidonet distribution, the tar archive and FILE_ID.DIZ are zipped together in a file like mbb03318.zip +The odd minor version numbers are developent versions only. From 0.35.1 and up +these will not be released anymore but are only available via cvs. + +The even minor version numbers will be stable releases, they will be available +at http://mbse.sourceforge.net and at 2:280/2802. The first version using this +scheme is 0.36.1 + diff --git a/TODO b/TODO index a2c2f0ed..2c36f667 100644 --- a/TODO +++ b/TODO @@ -42,6 +42,9 @@ mbfido: U: Code cleanup and make a structure in this program. Remove duplicate or similar functions. + U: AreaMgr uplink mails use the default best aka instead of the aka + defined in that specific group. + N: Remove memory leak during toss. (It's ok for less 5000 messages for each run). @@ -115,7 +118,7 @@ mbnewusr: mbsetup: U: PickAka function lets mbsetup crash if domain is 12 characters - U: Use some sort of sorting for the system aka's and make sure the + N: Use some sort of sorting for the system aka's and make sure the main aka with zone's is listed first. Having zone's mixed gives too high outbound stats and the outbound is scanned multiple times. diff --git a/html/setup/global.html b/html/setup/global.html index 069b41b2..eb64f8c2 100644 --- a/html/setup/global.html +++ b/html/setup/global.html @@ -12,7 +12,7 @@
-
Last update 16-May-2002
+
Last update 17-Jun-2002

 

MBSE BBS Setup - Global Setup

@@ -24,7 +24,9 @@ be discussed below.

1.1. Fidonet Aka's.

-Here you can enter 40 fidonet addresses. These are 5d addresses. +Here you can enter 40 fidonet addresses. These are 5d addresses. Make sure you +group the different zone's together, strange things will happen if you don't +group them.

1.2. Edit Registration Info.

diff --git a/mbfido/createf.c b/mbfido/createf.c index e269a825..910f620d 100644 --- a/mbfido/createf.c +++ b/mbfido/createf.c @@ -188,7 +188,7 @@ int CheckTicGroup(char *Area, int SendUplink, faddr *f) */ if (SendUplink) { sprintf(temp, "+%s", Area); - if (UplinkRequest(fido2faddr(fgroup.UpLink), TRUE, temp)) { + if (UplinkRequest(fido2faddr(fgroup.UpLink), fido2faddr(fgroup.UseAka), TRUE, temp)) { WriteError("Can't send netmail to uplink"); fclose(ap); free(buf); diff --git a/mbfido/createm.c b/mbfido/createm.c index 426f7a11..c37327b2 100644 --- a/mbfido/createm.c +++ b/mbfido/createm.c @@ -121,7 +121,7 @@ int CheckEchoGroup(char *Area, int SendUplink, faddr *f) */ if (SendUplink) { sprintf(temp, "+%s", Area); - if (UplinkRequest(fido2faddr(mgroup.UpLink), FALSE, temp)) { + if (UplinkRequest(fido2faddr(mgroup.UpLink), fido2faddr(mgroup.UseAka), FALSE, temp)) { WriteError("Can't send netmail to uplink"); fclose(ap); free(buf); diff --git a/mbfido/mgrutil.c b/mbfido/mgrutil.c index 4126676d..a2a2b42a 100644 --- a/mbfido/mgrutil.c +++ b/mbfido/mgrutil.c @@ -296,24 +296,22 @@ void MgrNotify(faddr *t, char *Buf, FILE *tmp, int mgr) * 3 - No uplink password in setup * 4 - Can't add mail to outbound */ -int UplinkRequest(faddr *t, int FileMgr, char *cmd) +int UplinkRequest(faddr *t, faddr *From, int FileMgr, char *cmd) { FILE *qp; time_t Now; struct tm *tm; fidoaddr Orig, Dest; - faddr From; unsigned flags = M_PVT; char ext[4], *mgrname, *subj; int i; - From = *bestaka_s(t); memset(&Orig, 0, sizeof(Orig)); - Orig.zone = From.zone; - Orig.net = From.net; - Orig.node = From.node; - Orig.point = From.point; - sprintf(Orig.domain, "%s", From.domain); + Orig.zone = From->zone; + Orig.net = From->net; + Orig.node = From->node; + Orig.point = From->point; + sprintf(Orig.domain, "%s", From->domain); memset(&Dest, 0, sizeof(Dest)); Dest.zone = t->zone; @@ -373,7 +371,7 @@ int UplinkRequest(faddr *t, int FileMgr, char *cmd) if ((qp = OpenPkt(Orig, Dest, (char *)ext)) == NULL) return 4; - if (AddMsgHdr(qp, &From, t, flags, 0, Now, mgrname, CFG.sysop_name, subj)) { + if (AddMsgHdr(qp, From, t, flags, 0, Now, mgrname, CFG.sysop_name, subj)) { fclose(qp); return 4; } @@ -687,7 +685,7 @@ int Areas(void) * Sent one uplink command with additions and deletions */ if (mgroup.UpLink.zone) { - if (UplinkRequest(fido2faddr(mgroup.UpLink), FALSE, cmd)) { + if (UplinkRequest(fido2faddr(mgroup.UpLink), fido2faddr(mgroup.UseAka), FALSE, cmd)) { WriteError("Uplink request failed"); } else { Syslog('+', "AreaMgr request sent to %s", aka2str(mgroup.UpLink)); @@ -941,7 +939,7 @@ int Areas(void) * Sent one uplink command with additions and deletions */ if (fgroup.UpLink.zone) { - if (UplinkRequest(fido2faddr(fgroup.UpLink), TRUE, cmd)) { + if (UplinkRequest(fido2faddr(fgroup.UpLink), fido2faddr(fgroup.UseAka), TRUE, cmd)) { WriteError("Uplink request failed"); } else { Syslog('+', "AreaMgr request sent to %s", aka2str(fgroup.UpLink)); diff --git a/mbfido/mgrutil.h b/mbfido/mgrutil.h index b423687f..93cd547e 100644 --- a/mbfido/mgrutil.h +++ b/mbfido/mgrutil.h @@ -25,7 +25,7 @@ void CleanBuf(char *); void ShiftBuf(char *, int); void MgrPasswd(faddr *, char *, FILE *, int, int); void MgrNotify(faddr *, char *, FILE *, int); -int UplinkRequest(faddr *, int, char *); +int UplinkRequest(faddr *, faddr *, int, char *); int Areas(void); diff --git a/mbsetup/ledit.c b/mbsetup/ledit.c index d5caa4a0..27dbd849 100644 --- a/mbsetup/ledit.c +++ b/mbsetup/ledit.c @@ -584,6 +584,53 @@ char *select_pick(int max, int items) +char *select_aka(int max, int items) +{ + static char s[12]; + static char *menu=(char *)"-"; + char help[81]; + int pick; + + memset((char *)s, 0, 12); + + if (max == 0) + sprintf(help, "Select ^\"-\"^ for previous level"); + else + if (max > items) + sprintf(help, "Record (1..%d), ^\"-\"^ prev. level, ^\"P\" or \"N\"^ to page, ^\"M\"^ move aka", max); + else + sprintf(help, "Select record (1..%d), ^\"-\"^ for previous level ^\"M\"^ move aka", max); + showhelp(help); + + /* + * Loop until the answer is right + */ + for (;;) { + mvprintw(LINES - 3, 6, "Enter your choice >"); + menu = (char *)"-"; + menu = edit_field(LINES - 3, 26, 6, '!', menu); + locate(LINES - 3, 6); + clrtoeol(); + + if (strncmp(menu, "-", 1) == 0) + break; + if (max > items) { + if (strncmp(menu, "N", 1) == 0) + break; + if (strncmp(menu, "P", 1) == 0) + break; + } + if (strncmp(menu, "M", 1) == 0) + break; + pick = atoi(menu); + if ((pick >= 1) && (pick <= max)) + break; + } + + return menu; +} + + /* * Select menu, max is the highest item to pick. Returns zero if diff --git a/mbsetup/ledit.h b/mbsetup/ledit.h index 760c2f13..09a63668 100644 --- a/mbsetup/ledit.h +++ b/mbsetup/ledit.h @@ -14,6 +14,7 @@ char *select_record(int, int); char *select_filearea(int, int); char *select_area(int, int); char *select_pick(int, int); +char *select_aka(int, int); char *select_show(int); int select_menu(int); int select_tag(int); diff --git a/mbsetup/m_global.c b/mbsetup/m_global.c index 665791a1..d417f472 100644 --- a/mbsetup/m_global.c +++ b/mbsetup/m_global.c @@ -1187,55 +1187,103 @@ void e_aka(int Area) void e_fidoakas(void) { - int i, x, y, o; - char pick[12]; - char temp[121]; + int i, j, k, x, y, o = 0, error, from, too; + char pick[12]; + char temp[121]; - o = 0; - for (;;) { - clr_index(); - set_color(WHITE, BLACK); - mvprintw( 5, 2, "1.1 EDIT FIDONET AKA'S"); - set_color(CYAN, BLACK); - x = 2; + for (;;) { + clr_index(); + set_color(WHITE, BLACK); + mvprintw( 5, 2, "1.1 EDIT FIDONET AKA'S"); + set_color(CYAN, BLACK); + x = 2; + y = 7; + set_color(CYAN, BLACK); + for (i = 1; i <= 20; i++) { + if (i == 11) { + x = 42; y = 7; - set_color(CYAN, BLACK); - for (i = 1; i <= 20; i++) { - if (i == 11) { - x = 42; - y = 7; - } - if ((o + i) <= 40) { - if (CFG.akavalid[o+i-1]) - set_color(CYAN, BLACK); - else - set_color(LIGHTBLUE, BLACK); - if (CFG.akavalid[o+i-1]) { - sprintf(temp, "%3d %s", o+i, aka2str(CFG.aka[o+i-1])); - temp[38] = '\0'; - } else - sprintf(temp, "%3d", o+i); - mvprintw(y, x, temp); - y++; - } - } - strcpy(pick, select_pick(40, 20)); - - if (strncmp(pick, "-", 1) == 0) { - return; - } - - if (strncmp(pick, "N", 1) == 0) - if ((o + 20) < 40) - o = o + 20; - - if (strncmp(pick, "P", 1) == 0) - if ((o - 20) >= 0) - o = o - 20; - - if ((atoi(pick) >= 1) && (atoi(pick) <= 40)) - e_aka(atoi(pick)-1); + } + if ((o + i) <= 40) { + if (CFG.akavalid[o+i-1]) + set_color(CYAN, BLACK); + else + set_color(LIGHTBLUE, BLACK); + if (CFG.akavalid[o+i-1]) { + sprintf(temp, "%3d %s", o+i, aka2str(CFG.aka[o+i-1])); + temp[38] = '\0'; + } else + sprintf(temp, "%3d", o+i); + mvprintw(y, x, temp); + y++; + } } + strcpy(pick, select_aka(40, 20)); + + if (strncmp(pick, "-", 1) == 0) { + error = FALSE; + /* + * Various checks on the system aka's. + */ + if ((! CFG.aka[0].zone) && (! CFG.akavalid[0])) { + errmsg("First aka (main aka) must be valid"); + error = TRUE; + } + if (error == FALSE) { + /* + * Check if aka's are in one continues block + */ + k = 0; + for (j = 0; j < 40; j++) + if (CFG.akavalid[j] && CFG.aka[j].zone) + k++; + for (j = k; j < 40; j++) + if (CFG.akavalid[j] || CFG.aka[j].zone) + error = TRUE; + if (error) + errmsg("All aka's must be in one continues block"); + } + if (! error) + return; + } + + if (strncmp(pick, "N", 1) == 0) + if ((o + 20) < 40) + o = o + 20; + + if (strncmp(pick, "P", 1) == 0) + if ((o - 20) >= 0) + o = o - 20; + + if (strncmp(pick, "M", 1) == 0) { + from = too = 0; + mvprintw(LINES -3, 6, "Enter aka number (1..40) to move >"); + from = edit_int(LINES -3, 42, from, (char *)"Enter record number"); + locate(LINES -3, 6); + clrtoeol(); + mvprintw(LINES -3, 6, "Enter new position (1..40) >"); + too = edit_int(LINES -3, 36, too, (char *)"Enter destination record number"); + if ((from == too) || (from == 0) || (too == 0) || (from > 40) || (too > 40)) { + errmsg("That makes no sense"); + } else if (CFG.akavalid[from - 1] == FALSE) { + errmsg("Origin aka is invalid"); + } else if (CFG.akavalid[too - 1]) { + errmsg("Destination record is in use"); + } else if (yes_no((char *)"Proceed move")) { + CFG.aka[too -1].zone = CFG.aka[from -1].zone; + CFG.aka[too -1].net = CFG.aka[from -1].net; + CFG.aka[too -1].node = CFG.aka[from -1].node; + CFG.aka[too -1].point = CFG.aka[from -1].point; + strcpy(CFG.aka[too -1].domain, CFG.aka[from -1].domain); + CFG.akavalid[too -1] = TRUE; + CFG.akavalid[from -1] = FALSE; + memset(&CFG.aka[from -1], 0, sizeof(fidoaddr)); + } + } + + if ((atoi(pick) >= 1) && (atoi(pick) <= 40)) + e_aka(atoi(pick)-1); + } }