Added basic checks to mbsetup menu 2

This commit is contained in:
Michiel Broek 2004-07-21 20:35:38 +00:00
parent 1cc58353d9
commit d8f223d7d5
2 changed files with 19 additions and 1 deletions

View File

@ -48,6 +48,10 @@ v0.61.2 11-Jul-2004
mbout:
Changed to use direct instead of immediate mail.
mbsetup:
In menu 2, added 3 checks to see if enough info is entered to
make a valid network setup.
mbtask:
Changed to use direct instead of immediate mail.

View File

@ -292,7 +292,21 @@ int EditFidoRec(int Area)
j = select_menu(17);
switch(j) {
case 0: crc1 = 0xffffffff;
case 0: if (fidonet.available && fidonet.deleted)
fidonet.available = FALSE;
if (fidonet.available && (strlen(fidonet.domain) == 0)) {
errmsg("You must fill in a valid domain name");
break;
}
if (fidonet.available && (fidonet.zone[0] == 0)) {
errmsg("The network must have a main zone number");
break;
}
if (fidonet.available && (strlen(fidonet.nodelist) == 0)) {
errmsg("You must fill in a nodelist for this network");
break;
}
crc1 = 0xffffffff;
crc1 = upd_crc32((char *)&fidonet, crc1, sizeof(fidonet));
if (crc != crc1) {
if (yes_no((char *)"Record is changed, save") == 1) {