From 326b4e32f7844e92245000ffc5d2788ad1aa3959 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sat, 7 Aug 2004 14:52:57 +0000 Subject: [PATCH] Ask user to continue if netmail reply to unknown node --- ChangeLog | 4 ++++ mbsebbs/mail.c | 20 ++++++++++++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8eddb061..2feea92d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -25,6 +25,10 @@ v0.61.3 25-Jul-2004 Made questions for screenlen, newmail check and newfiles check dependant of settings in the setup. + mbsebbs: + When a netmail reply is done to a node without a valid address + we ask the user if he wants to continue. + mbtask: Added defaults for questions for screenlen, newmail chack and newfiles check. diff --git a/mbsebbs/mail.c b/mbsebbs/mail.c index 3e61495f..86a8961a 100644 --- a/mbsebbs/mail.c +++ b/mbsebbs/mail.c @@ -226,6 +226,9 @@ int Crash_Option(faddr *Dest) if (Nlent->url) free(Nlent->url); Nlent->url = NULL; + } else { + Syslog('+', "Node %s not found", ascfnode(Dest, 0x1f)); + rc = -1; } Dest->point = point; @@ -1638,6 +1641,19 @@ void Reply_Msg(int IsReply) break; case 2: Msg.Immediate = TRUE; break; + case -1:printf("\r"); + /* Node not known, continue anayway [y/N]: */ + pout(CYAN, BLACK, (char *) Language(241)); + fflush(stdout); + alarm_on(); + if (toupper(Getone()) == Keystroke(241, 0)) { + Syslog('+', "Node not found, forced continue"); + } else { + for (i = 0; i < (TEXTBUFSIZE + 1); i++) + free(Message[i]); + return; + } + break; } } @@ -1666,8 +1682,8 @@ void Reply_Msg(int IsReply) } Line = 2; - tmp = calloc(128, sizeof(char)); - buf = calloc(128, sizeof(char)); + tmp = calloc(PATH_MAX, sizeof(char)); + buf = calloc(129, sizeof(char)); sprintf(tmp, "%s/%s/.quote", CFG.bbs_usersdir, exitinfo.Name); if ((qf = fopen(tmp, "r")) != NULL) {