Ask user to continue if netmail reply to unknown node

This commit is contained in:
Michiel Broek 2004-08-07 14:52:57 +00:00
parent dbaf02de10
commit 326b4e32f7
2 changed files with 22 additions and 2 deletions

View File

@ -25,6 +25,10 @@ v0.61.3 25-Jul-2004
Made questions for screenlen, newmail check and newfiles check Made questions for screenlen, newmail check and newfiles check
dependant of settings in the setup. 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: mbtask:
Added defaults for questions for screenlen, newmail chack and Added defaults for questions for screenlen, newmail chack and
newfiles check. newfiles check.

View File

@ -226,6 +226,9 @@ int Crash_Option(faddr *Dest)
if (Nlent->url) if (Nlent->url)
free(Nlent->url); free(Nlent->url);
Nlent->url = NULL; Nlent->url = NULL;
} else {
Syslog('+', "Node %s not found", ascfnode(Dest, 0x1f));
rc = -1;
} }
Dest->point = point; Dest->point = point;
@ -1638,6 +1641,19 @@ void Reply_Msg(int IsReply)
break; break;
case 2: Msg.Immediate = TRUE; case 2: Msg.Immediate = TRUE;
break; 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; Line = 2;
tmp = calloc(128, sizeof(char)); tmp = calloc(PATH_MAX, sizeof(char));
buf = calloc(128, sizeof(char)); buf = calloc(129, sizeof(char));
sprintf(tmp, "%s/%s/.quote", CFG.bbs_usersdir, exitinfo.Name); sprintf(tmp, "%s/%s/.quote", CFG.bbs_usersdir, exitinfo.Name);
if ((qf = fopen(tmp, "r")) != NULL) { if ((qf = fopen(tmp, "r")) != NULL) {