Updated mbsetup
This commit is contained in:
parent
7ed40f8412
commit
d637816dbb
@ -20,6 +20,10 @@ v0.39.9 29-Jan-2004
|
||||
mbsetup:
|
||||
Clearing the working message is now only done by the keyboard
|
||||
read function.
|
||||
In several menu items added range check for integer values.
|
||||
In global main aka setup, added check if a domain name is
|
||||
present.
|
||||
Updates to the database is now shown to the user.
|
||||
|
||||
script:
|
||||
Dropped support for RedHat and Mandrake pre 6.1.
|
||||
|
2
TODO
2
TODO
@ -151,8 +151,6 @@ mbnewusr:
|
||||
-- Currently no access to my old Sun Sparcstation.
|
||||
|
||||
mbsetup:
|
||||
N: Add check for reasonable settings for message split.
|
||||
|
||||
N: Add a check for double areatag names.
|
||||
|
||||
N: Use some sort of sorting for the system aka's and make sure the
|
||||
|
@ -1049,17 +1049,37 @@ void show_int(int y, int x, int val)
|
||||
|
||||
int edit_int(int y, int x, int val, char *help)
|
||||
{
|
||||
static char s[6];
|
||||
static char line[6];
|
||||
static char s[7], line[7];
|
||||
|
||||
showhelp(help);
|
||||
memset((char *)s, 0, sizeof(s));
|
||||
sprintf(line, "%d", val);
|
||||
strcpy(s, edit_field(y, x, 7, '9', line));
|
||||
set_color(WHITE, BLACK);
|
||||
show_int(y, x, atoi(s));
|
||||
fflush(stdout);
|
||||
return atoi(s);
|
||||
}
|
||||
|
||||
|
||||
|
||||
int edit_int_range(int y, int x, int val, int min, int max, char *help)
|
||||
{
|
||||
static char s[7], line[7];
|
||||
|
||||
while (TRUE) {
|
||||
showhelp(help);
|
||||
memset((char *)s, 0, 6);
|
||||
memset((char *)s, 0, sizeof(s));
|
||||
sprintf(line, "%d", val);
|
||||
strcpy(s, edit_field(y, x, 7, '9', line));
|
||||
set_color(WHITE, BLACK);
|
||||
show_int(y, x, atoi(s));
|
||||
fflush(stdout);
|
||||
return atoi(s);
|
||||
if ((atoi(s) >= min) && (atoi(s) <= max))
|
||||
break;
|
||||
errmsg("Value must be between %d and %d", min, max);
|
||||
}
|
||||
return atoi(s);
|
||||
}
|
||||
|
||||
|
||||
@ -1073,25 +1093,24 @@ void show_ushort(int y, int x, unsigned short val)
|
||||
|
||||
unsigned short edit_ushort(int y, int x, unsigned short val, char *help)
|
||||
{
|
||||
unsigned short r;
|
||||
static char s[6];
|
||||
static char line[6];
|
||||
unsigned short r;
|
||||
static char s[7], line[7];
|
||||
|
||||
showhelp(help);
|
||||
memset((char *)s, 0, 6);
|
||||
do {
|
||||
sprintf(line, "%d", val);
|
||||
strcpy(s, edit_field(y, x, 5, '9', line));
|
||||
r = atoi(s);
|
||||
if (r >= 65535L) {
|
||||
working(2, y, x);
|
||||
working(0, y, x);
|
||||
}
|
||||
} while (r >= 65535L);
|
||||
set_color(WHITE, BLACK);
|
||||
show_int(y, x, val);
|
||||
fflush(stdout);
|
||||
return r;
|
||||
showhelp(help);
|
||||
memset((char *)s, 0, sizeof(s));
|
||||
do {
|
||||
sprintf(line, "%d", val);
|
||||
strcpy(s, edit_field(y, x, 5, '9', line));
|
||||
r = atoi(s);
|
||||
if (r >= 65535L) {
|
||||
working(2, y, x);
|
||||
working(0, y, x);
|
||||
}
|
||||
} while (r >= 65535L);
|
||||
set_color(WHITE, BLACK);
|
||||
show_int(y, x, val);
|
||||
fflush(stdout);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
|
@ -39,6 +39,7 @@ securityrec edit_nsec(securityrec, char *);
|
||||
char *get_secstr(securityrec);
|
||||
void show_int(int, int, int);
|
||||
int edit_int(int, int, int, char *);
|
||||
int edit_int_range(int, int, int, int, int, char *);
|
||||
void show_ushort(int, int, unsigned short);
|
||||
unsigned short edit_ushort(int, int, unsigned short, char *);
|
||||
void show_sbit(int, int, unsigned short, unsigned short);
|
||||
@ -90,6 +91,7 @@ char *getmenutype(int);
|
||||
#define E_JAM(y,x,l,str,help) strcpy(str, edit_jam(y,x,l,str,(char *)help)); break;
|
||||
#define E_BOOL(y,x,bool,help) bool = edit_bool(y,x,bool,(char *)help); break;
|
||||
#define E_INT(y,x,value,help) value = edit_int(y,x,value,(char *)help); break;
|
||||
#define E_IRC(y,x,value,min,max,help) value = edit_int_range(y,x,value,min,max,(char *)help); break;
|
||||
#define E_LOGL(grade,txt,af) grade = edit_logl(grade,(char *)txt); af(); break;
|
||||
#define S_COL(y,x,name,fg,bg) set_color(fg,bg); mvprintw(y,x,name);
|
||||
#define E_SEC(y,x,sec,hdr,af) sec = edit_sec(y,x,sec,(char *)hdr); af(); break;
|
||||
|
@ -477,6 +477,8 @@ void CloseArchive(int force)
|
||||
unlink(fout);
|
||||
chmod(fin, 0640);
|
||||
Syslog('+', "Updated \"archiver.data\"");
|
||||
if (!force)
|
||||
working(6, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -583,7 +585,7 @@ int EditArchRec(int Area)
|
||||
fwrite(&archiver, sizeof(archiver), 1, fil);
|
||||
fclose(fil);
|
||||
ArchUpdated = 1;
|
||||
working(1, 0, 0);
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
IsDoing("Browsing Menu");
|
||||
|
@ -152,6 +152,8 @@ void CloseBBSlist(int force)
|
||||
unlink(fout);
|
||||
chmod(fin, 0660);
|
||||
Syslog('+', "Updated \"bbslist.data\"");
|
||||
if (!force)
|
||||
working(6, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -281,7 +283,7 @@ int EditBBSlistRec(int Area)
|
||||
fwrite(&bbs, sizeof(bbs), 1, fil);
|
||||
fclose(fil);
|
||||
BBSlistUpdated = 1;
|
||||
working(1, 0, 0);
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
IsDoing("Browsing Menu");
|
||||
|
@ -184,6 +184,8 @@ void CloseDomain(int force)
|
||||
unlink(fout);
|
||||
chmod(fin, 0640);
|
||||
Syslog('+', "Updated \"domtrans.data\"");
|
||||
if (!force)
|
||||
working(6, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -284,6 +286,7 @@ int EditDomainRec(int Area)
|
||||
fwrite(&domtrans, domainhdr.recsize, 1, fil);
|
||||
fclose(fil);
|
||||
DomainUpdated = 1;
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
IsDoing("Browsing Menu");
|
||||
|
@ -167,6 +167,8 @@ void CloseFilearea(int force)
|
||||
unlink(fout);
|
||||
chmod(fin, 0640);
|
||||
Syslog('+', "Updated \"fareas.data\"");
|
||||
if (!force)
|
||||
working(6, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -325,6 +327,7 @@ int EditFileRec(int Area)
|
||||
fclose(fil);
|
||||
FileUpdated = 1;
|
||||
Syslog('+', "Updated file area %d", Area);
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
IsDoing("Browsing Menu");
|
||||
|
@ -259,6 +259,7 @@ void E_F(long areanr)
|
||||
working(1, 0, 0);
|
||||
fseek(fil, offset, SEEK_SET);
|
||||
fwrite(&file, sizeof(file), 1, fil);
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -174,6 +174,8 @@ void CloseFilefind(int force)
|
||||
unlink(fout);
|
||||
chmod(fin, 0640);
|
||||
Syslog('+', "Updated \"scanmgr.data\"");
|
||||
if (!force)
|
||||
working(6, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -293,6 +295,7 @@ int EditFfRec(int Area)
|
||||
fwrite(&scanmgr, scanmgrhdr.recsize, 1, fil);
|
||||
fclose(fil);
|
||||
FilefindUpdated = 1;
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
IsDoing("Browsing Menu");
|
||||
|
@ -203,6 +203,8 @@ void CloseFGroup(int force)
|
||||
unlink(fout);
|
||||
chmod(fin, 0640);
|
||||
Syslog('+', "Updated \"fgroups.data\"");
|
||||
if (!force)
|
||||
working(6, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -400,7 +402,7 @@ int EditFGrpRec(int Area)
|
||||
fwrite(&fgroup, sizeof(fgroup), 1, fil);
|
||||
fclose(fil);
|
||||
FGrpUpdated = 1;
|
||||
working(1, 0, 0);
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
IsDoing("Browsing Menu");
|
||||
|
@ -194,6 +194,8 @@ void CloseFidonet(int force)
|
||||
chmod(fin, 0640);
|
||||
|
||||
Syslog('+', "Updated \"fidonet.data\"");
|
||||
if (!force)
|
||||
working(6, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -309,7 +311,7 @@ int EditFidoRec(int Area)
|
||||
fwrite(&fidonet, sizeof(fidonet), 1, fil);
|
||||
fclose(fil);
|
||||
FidoUpdated = 1;
|
||||
working(1, 0, 0);
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
IsDoing("Browsing Menu");
|
||||
@ -352,7 +354,7 @@ int EditFidoRec(int Area)
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 17:E_INT(j,74, fidonet.zone[j-12], "A ^Zone number^ which belongs to this domain (1..4095)")
|
||||
case 17:E_IRC(j,74, fidonet.zone[j-12], 1, 32767, "A ^Zone number^ which belongs to this domain (1..32767)")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -402,28 +402,28 @@ void e_bbsglob(void)
|
||||
for (;;) {
|
||||
switch(select_menu(21)) {
|
||||
case 0: return;
|
||||
case 1: E_BOOL( 7,24, CFG.exclude_sysop, "^Exclude^ sysop from lists.")
|
||||
case 2: E_BOOL( 8,24, CFG.iConnectString, "Show ^connect string^ at logon")
|
||||
case 3: E_BOOL( 9,24, CFG.iAskFileProtocols, "Ask ^file protocol^ before every up- download")
|
||||
case 4: E_INT( 10,24, CFG.sysop_access, "Sysop ^access level^")
|
||||
case 5: E_INT( 11,24, CFG.password_length, "Mimimum ^password^ length.")
|
||||
case 6: E_INT( 12,24, CFG.iPasswd_Char, "Ascii number of ^password^ character")
|
||||
case 7: E_INT( 13,24, CFG.idleout, "^Idle timeout^ in minutes")
|
||||
case 8: E_INT( 14,24, CFG.iCRLoginCount, "Maximum ^Login Return^ count")
|
||||
case 9: E_INT( 15,24, CFG.iQuota, "Maximum ^Quota^ in MBytes in users homedirectory");
|
||||
case 10:E_INT( 16,24, CFG.CityLen, "Minimum ^Location name^ length (3..6)")
|
||||
case 11:E_BOOL(17,24, CFG.NewAreas, "Show ^new^ or ^deleted^ message areas to the user at login.")
|
||||
case 1: E_BOOL( 7,24, CFG.exclude_sysop, "^Exclude^ sysop from lists.")
|
||||
case 2: E_BOOL( 8,24, CFG.iConnectString, "Show ^connect string^ at logon")
|
||||
case 3: E_BOOL( 9,24, CFG.iAskFileProtocols, "Ask ^file protocol^ before every up- download")
|
||||
case 4: E_INT( 10,24, CFG.sysop_access, "Sysop ^access level^")
|
||||
case 5: E_IRC( 11,24, CFG.password_length, 2, 8, "Mimimum ^password^ length (2..8)")
|
||||
case 6: E_IRC( 12,24, CFG.iPasswd_Char, 33, 126, "Ascii number of ^password^ character (33..126)")
|
||||
case 7: E_IRC( 13,24, CFG.idleout, 2, 60, "^Idle timeout^ in minutes (2..60)")
|
||||
case 8: E_INT( 14,24, CFG.iCRLoginCount, "Maximum ^Login Return^ count")
|
||||
case 9: E_INT( 15,24, CFG.iQuota, "Maximum ^Quota^ in MBytes in users homedirectory");
|
||||
case 10:E_IRC( 16,24, CFG.CityLen, 3, 6, "Minimum ^Location name^ length (3..6)")
|
||||
case 11:E_BOOL(17,24, CFG.NewAreas, "Show ^new^ or ^deleted^ message areas to the user at login.")
|
||||
|
||||
case 12:E_INT( 7,59, CFG.OLR_MaxMsgs, "^Maximum messages^ to pack for download (0=unlimited)")
|
||||
case 13:E_INT( 8,59, CFG.OLR_NewFileLimit, "^Limit Newfiles^ listing for maximum days")
|
||||
case 14:E_INT( 9,59, CFG.OLR_MaxReq, "Maximum ^Filerequests^ to honor")
|
||||
case 12:E_INT( 7,59, CFG.OLR_MaxMsgs, "^Maximum messages^ to pack for download (0=unlimited)")
|
||||
case 13:E_INT( 8,59, CFG.OLR_NewFileLimit, "^Limit Newfiles^ listing for maximum days")
|
||||
case 14:E_INT( 9,59, CFG.OLR_MaxReq, "Maximum ^Filerequests^ to honor")
|
||||
case 15:E_LOGL(CFG.bbs_loglevel, "1.5.15", b_screen)
|
||||
case 16:E_LOGL(CFG.util_loglevel, "1.5.16", b_screen)
|
||||
case 17:E_BOOL(12,59, CFG.slow_util, "Let background utilities run ^slowly^")
|
||||
case 18:E_INT( 13,59, CFG.iCrashLevel, "The user level to allow sending ^CrashMail^")
|
||||
case 19:E_INT( 14,59, CFG.iAttachLevel, "The user level to allow sending ^File Attaches^")
|
||||
case 20:E_INT( 15,59, CFG.freespace, "Minimum ^free diskspace^ in MBytes on filesystems")
|
||||
case 21:E_INT( 16,59, CFG.max_logins, "Maximum ^simultaneous logins^ allowed, 0 means unlimited")
|
||||
case 17:E_BOOL(12,59, CFG.slow_util, "Let background utilities run ^slowly^")
|
||||
case 18:E_INT( 13,59, CFG.iCrashLevel, "The user level to allow sending ^CrashMail^")
|
||||
case 19:E_INT( 14,59, CFG.iAttachLevel, "The user level to allow sending ^File Attaches^")
|
||||
case 20:E_IRC( 15,59, CFG.freespace, 2, 1000, "Minimum ^free diskspace^ in MBytes on filesystems (2..1000)")
|
||||
case 21:E_INT( 16,59, CFG.max_logins, "Maximum ^simultaneous logins^ allowed, 0 means unlimited")
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -582,13 +582,13 @@ void e_paging(void)
|
||||
|
||||
switch(select_menu(7)) {
|
||||
case 0: return;
|
||||
case 1: E_INT( 7,20, CFG.iPageLength, "The ^Length^ of paging in seconds")
|
||||
case 2: E_INT( 8,20, CFG.iMaxPageTimes, "The ^Maximum times^ a user may page in a session")
|
||||
case 3: E_INT( 9,20, CFG.iSysopArea, "The ^Message Area^ for ^Message to sysop^ when page fails")
|
||||
case 4: E_BOOL(10,20, CFG.iAskReason, "Ask the user the ^reason for chat^")
|
||||
case 5: E_BOOL(11,20, CFG.iAutoLog, "^Automatic log^ chat sessions")
|
||||
case 6: E_BOOL(12,20, CFG.iChatPromptChk, "Check for chat at the ^prompt^")
|
||||
case 7: E_BOOL(13,20, CFG.iStopChatTime, "^Stop^ users time during chat")
|
||||
case 1: E_IRC( 7,20, CFG.iPageLength, 5, 120, "The ^Length^ of paging in seconds (5..120)")
|
||||
case 2: E_IRC( 8,20, CFG.iMaxPageTimes, 1, 10, "The ^Maximum times^ a user may page in a session (1..10)")
|
||||
case 3: E_INT( 9,20, CFG.iSysopArea, "The ^Message Area^ for ^Message to sysop^ when page fails")
|
||||
case 4: E_BOOL(10,20, CFG.iAskReason, "Ask the user the ^reason for chat^")
|
||||
case 5: E_BOOL(11,20, CFG.iAutoLog, "^Automatic log^ chat sessions")
|
||||
case 6: E_BOOL(12,20, CFG.iChatPromptChk, "Check for chat at the ^prompt^")
|
||||
case 7: E_BOOL(13,20, CFG.iStopChatTime, "^Stop^ users time during chat")
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -853,13 +853,13 @@ void e_fidomailcfg(void)
|
||||
CloseNoderec(TRUE);
|
||||
}
|
||||
break;
|
||||
case 13:E_BOOL(12,58, CFG.addr4d, "Use ^4d^ addressing instead of ^5d^ addressing.")
|
||||
case 14:E_INT( 13,58, CFG.new_split, "Gently ^split^ newfiles reports after n kilobytes (12..60).")
|
||||
case 15:E_INT( 14,58, CFG.new_force, "Force ^split^ of newfiles reports after n kilobytes (16..64).")
|
||||
case 16:E_BOOL(15,58, CFG.ca_PlusAll, "Allow ^+%*^ (Plus all) in AreaMgr requests.")
|
||||
case 17:E_BOOL(16,58, CFG.ca_Notify, "Allow turning ^Notify^ messages on or off.")
|
||||
case 18:E_BOOL(17,58, CFG.ca_Passwd, "Allow changing the AreaMgr/FileMgr ^password^.")
|
||||
case 19:E_BOOL(18,58, CFG.ca_Pause, "Allow the ^Pause^ AreaMgr command.")
|
||||
case 13:E_BOOL(12,58, CFG.addr4d, "Use ^4d^ addressing instead of ^5d^ addressing.")
|
||||
case 14:E_IRC( 13,58, CFG.new_split, 12, 60, "Gently ^split^ newfiles reports after n kilobytes (12..60).")
|
||||
case 15:E_IRC( 14,58, CFG.new_force, 16, 64, "Force ^split^ of newfiles reports after n kilobytes (16..64).")
|
||||
case 16:E_BOOL(15,58, CFG.ca_PlusAll, "Allow ^+%*^ (Plus all) in AreaMgr requests.")
|
||||
case 17:E_BOOL(16,58, CFG.ca_Notify, "Allow turning ^Notify^ messages on or off.")
|
||||
case 18:E_BOOL(17,58, CFG.ca_Passwd, "Allow changing the AreaMgr/FileMgr ^password^.")
|
||||
case 19:E_BOOL(18,58, CFG.ca_Pause, "Allow the ^Pause^ AreaMgr command.")
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -959,11 +959,11 @@ void e_uucp(void)
|
||||
j = select_menu(5);
|
||||
switch(j) {
|
||||
case 0: return;
|
||||
case 1: E_INT( 7,19, CFG.UUCPgate.zone, "The ^zone^ number for the UUCP gateway")
|
||||
case 2: E_INT( 8,19, CFG.UUCPgate.net, "The ^Net^ number for the UUCP gateway")
|
||||
case 3: E_INT( 9,19, CFG.UUCPgate.node, "The ^Node^ number for the UUCP gateway")
|
||||
case 4: E_INT( 10,19, CFG.UUCPgate.point, "The ^Point^ number for the UUCP gateway")
|
||||
case 5: E_STR( 11,19,8, CFG.UUCPgate.domain, "The ^FTN Domain^ for the UUCP gateway without a dot")
|
||||
case 1: E_IRC( 7,19, CFG.UUCPgate.zone, 1, 32767, "The ^zone^ number for the UUCP gateway (1..32767)")
|
||||
case 2: E_IRC( 8,19, CFG.UUCPgate.net, 0, 32767, "The ^Net^ number for the UUCP gateway (0..32767)")
|
||||
case 3: E_IRC( 9,19, CFG.UUCPgate.node, 0, 32767, "The ^Node^ number for the UUCP gateway (0..32767)")
|
||||
case 4: E_IRC( 10,19, CFG.UUCPgate.point, 0, 32767, "The ^Point^ number for the UUCP gateway (0..32767)")
|
||||
case 5: E_STR( 11,19,8, CFG.UUCPgate.domain, "The ^FTN Domain^ for the UUCP gateway without a dot")
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1010,10 +1010,10 @@ void e_intmailcfg(void)
|
||||
case 13:CFG.newsfeed = edit_newsmode(13,57, CFG.newsfeed);
|
||||
s_intmailcfg();
|
||||
break;
|
||||
case 14:E_INT( 14,57, CFG.new_split, "Gently ^split^ messages after n kilobytes (12..60).")
|
||||
case 15:E_INT( 15,57, CFG.new_force, "Force ^split^ of messages after n kilobytes (16..64).")
|
||||
case 16:E_BOOL(16,57, CFG.allowcontrol, "^Allow control^ messages for news to be gated.")
|
||||
case 17:E_BOOL(17,57, CFG.dontregate, "Don't ^regate^ already gated messages.")
|
||||
case 14:E_IRC( 14,57, CFG.new_split, 12, 60, "Gently ^split^ messages after n kilobytes (12..60).")
|
||||
case 15:E_IRC( 15,57, CFG.new_force, 16, 64, "Force ^split^ of messages after n kilobytes (16..64).")
|
||||
case 16:E_BOOL(16,57, CFG.allowcontrol, "^Allow control^ messages for news to be gated.")
|
||||
case 17:E_BOOL(17,57, CFG.dontregate, "Don't ^regate^ already gated messages.")
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -1095,12 +1095,12 @@ void e_aka(int Area)
|
||||
j = select_menu(6);
|
||||
switch(j) {
|
||||
case 0: return;
|
||||
case 1: E_INT( 7,19, CFG.aka[Area].zone, "The ^zone^ number for this aka")
|
||||
case 2: E_INT( 8,19, CFG.aka[Area].net, "The ^Net^ number for this aka")
|
||||
case 3: E_INT( 9,19, CFG.aka[Area].node, "The ^Node^ number for this aka")
|
||||
case 4: E_INT( 10,19, CFG.aka[Area].point, "The ^Point^ number for this node (if any)")
|
||||
case 5: E_STR( 11,19,8, CFG.aka[Area].domain, "The ^FTN Domain^ for this aka without a dot (ie no .org)")
|
||||
case 6: E_BOOL(12,19, CFG.akavalid[Area], "Is this aka ^available^")
|
||||
case 1: E_IRC( 7,19, CFG.aka[Area].zone, 0, 32767, "The ^zone^ number for this aka (1..32767)")
|
||||
case 2: E_IRC( 8,19, CFG.aka[Area].net, 0, 32767, "The ^Net^ number for this aka (0..32767)")
|
||||
case 3: E_IRC( 9,19, CFG.aka[Area].node, 0, 32767, "The ^Node^ number for this aka (0..32767)")
|
||||
case 4: E_IRC( 10,19, CFG.aka[Area].point, 0, 32767, "The ^Point^ number for this node (0..32767)")
|
||||
case 5: E_STR( 11,19,8, CFG.aka[Area].domain, "The ^FTN Domain^ for this aka without a dot (ie no .org)")
|
||||
case 6: E_BOOL(12,19, CFG.akavalid[Area], "Is this aka ^available^")
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1165,6 +1165,14 @@ void e_fidoakas(void)
|
||||
if (error)
|
||||
errmsg("All aka's must be in one continues block");
|
||||
}
|
||||
if (error == FALSE) {
|
||||
for (j = 0; j < 40; j++) {
|
||||
if (CFG.akavalid[j] && CFG.aka[j].zone && (strlen(CFG.aka[j].domain) == 0)) {
|
||||
error = TRUE;
|
||||
errmsg("Aka %d has no domain set", j+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (! error)
|
||||
return;
|
||||
}
|
||||
@ -1460,6 +1468,7 @@ void global_menu(void)
|
||||
if (yes_no((char *)"Configuration is changed, save") == 1) {
|
||||
cf_close();
|
||||
Syslog('+', "Saved main config");
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
open_bbs();
|
||||
|
@ -189,6 +189,8 @@ void CloseHatch(int force)
|
||||
unlink(fout);
|
||||
chmod(fin, 0640);
|
||||
Syslog('+', "Updated \"hatch.data\"");
|
||||
if (!force)
|
||||
working(6, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -427,6 +429,7 @@ int EditHatchRec(int Area)
|
||||
fwrite(&hatch, hatchhdr.recsize, 1, fil);
|
||||
fclose(fil);
|
||||
HatchUpdated = 1;
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
IsDoing("Browsing Menu");
|
||||
|
@ -244,6 +244,8 @@ void CloseLanguage(int force)
|
||||
tidy_stlist(&lan);
|
||||
chmod(fin, 0640);
|
||||
Syslog('+', "Updated \"language.data\"");
|
||||
if (!force)
|
||||
working(6, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -352,7 +354,7 @@ int EditLangRec(int Area)
|
||||
fwrite(&lang, sizeof(lang), 1, fil);
|
||||
fclose(fil);
|
||||
LangUpdated = 1;
|
||||
working(1, 0, 0);
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
IsDoing("Browsing Menu");
|
||||
|
@ -236,6 +236,8 @@ void CloseLimits(int force)
|
||||
unlink(fout);
|
||||
chmod(fin, 0640);
|
||||
Syslog('+', "Updated \"limits.data\"");
|
||||
if (!force)
|
||||
working(6, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -332,7 +334,7 @@ int EditLimRec(int Area)
|
||||
fwrite(&LIMIT, sizeof(LIMIT), 1, fil);
|
||||
fclose(fil);
|
||||
LimUpdated = 1;
|
||||
working(1, 0, 0);
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
IsDoing("Browsing Menu");
|
||||
|
@ -180,6 +180,8 @@ void CloseMagics(int force)
|
||||
unlink(fout);
|
||||
chmod(fin, 0640);
|
||||
Syslog('+', "Updated \"magic.data\"");
|
||||
if (!force)
|
||||
working(6, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -342,6 +344,7 @@ int EditMagicRec(int Area)
|
||||
fwrite(&magic, sizeof(magic), 1, fil);
|
||||
fclose(fil);
|
||||
MagicUpdated = 1;
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
IsDoing("Browsing Menu");
|
||||
|
@ -282,6 +282,8 @@ void CloseMsgarea(int Force)
|
||||
unlink(fout);
|
||||
chmod(fin, 0660);
|
||||
Syslog('+', "Updated \"mareas.data\"");
|
||||
if (!Force)
|
||||
working(6, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -1090,6 +1092,7 @@ int EditMsgRec(int Area)
|
||||
return -1;
|
||||
MsgUpdated = 1;
|
||||
Syslog('+', "Saved message area record %d", Area);
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
if (tfil != NULL)
|
||||
|
@ -394,6 +394,7 @@ void EditMenu(char *Name)
|
||||
}
|
||||
fclose(fil);
|
||||
chmod(temp, 0640);
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -485,6 +486,7 @@ void EditMenu(char *Name)
|
||||
fseek(tmp, offset, SEEK_SET);
|
||||
fwrite(&menus, sizeof(menus), 1, tmp);
|
||||
MenuUpdated = TRUE;
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -564,6 +566,7 @@ void EditMenus(void)
|
||||
fclose(fil);
|
||||
chmod(p, 0640);
|
||||
Syslog('+', "Created menufile %s", p);
|
||||
working(3, 0, 0);
|
||||
}
|
||||
} else {
|
||||
errmsg("Menu %s already exists", temp);
|
||||
|
@ -209,6 +209,8 @@ void CloseMGroup(int force)
|
||||
unlink(fout);
|
||||
chmod(fin, 0640);
|
||||
Syslog('+', "Updated \"mgroups.data\"");
|
||||
if (!force)
|
||||
working(6, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -366,7 +368,7 @@ int EditMGrpRec(int Area)
|
||||
fwrite(&mgroup, sizeof(mgroup), 1, fil);
|
||||
fclose(fil);
|
||||
MGrpUpdated = 1;
|
||||
working(1, 0, 0);
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
IsDoing("Browsing Menu");
|
||||
|
@ -251,6 +251,8 @@ void CloseModem(int force)
|
||||
unlink(fout);
|
||||
chmod(fin, 0640);
|
||||
Syslog('+', "Updated \"modem.data\"");
|
||||
if (!force)
|
||||
working(6, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -464,7 +466,7 @@ int EditModemRec(int Area)
|
||||
fwrite(&modem, sizeof(modem), 1, fil);
|
||||
fclose(fil);
|
||||
ModemUpdated = 1;
|
||||
working(1, 0, 0);
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
IsDoing("Browsing Menu");
|
||||
@ -478,7 +480,7 @@ int EditModemRec(int Area)
|
||||
case 7: E_STR(13,14,40, modem.dial, "The ^dial^ command for this modem, ^\\T^ is translated phonenumber")
|
||||
case 8: E_STR(14,14,40, modem.info, "The command to get connection ^info^ from this modem after call")
|
||||
case 9: E_STR(15,14,10, modem.ok, "The ^OK^ string to get from the modem")
|
||||
case 10:E_INT(16,14, modem.costoffset, "The ^offset^ time in seconds between answer and connect string")
|
||||
case 10:E_IRC(16,14, modem.costoffset, 0, 60, "The ^offset^ time in seconds between answer and connect string (0..60)")
|
||||
case 11:E_STR(17,14,15, modem.speed, "The ^EMSI speed^ message for this modem")
|
||||
case 12:E_BOOL(15,44, modem.available, "If this modem is ^available^")
|
||||
case 13:E_BOOL(16,44, modem.deleted, "If this modem is to be ^deleted^ from the setup")
|
||||
|
@ -226,6 +226,8 @@ void CloseNewfiles(int force)
|
||||
unlink(fout);
|
||||
chmod(fin, 0640);
|
||||
Syslog('+', "Updated \"newfiles.data\"");
|
||||
if (!force)
|
||||
working(6, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -399,6 +401,7 @@ int EditNewRec(int Area)
|
||||
|
||||
fclose(fil);
|
||||
NewUpdated = 1;
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
tidy_grlist(&fgr);
|
||||
|
@ -189,6 +189,8 @@ void CloseNGroup(int force)
|
||||
unlink(fout);
|
||||
chmod(fin, 0640);
|
||||
Syslog('+', "Updated \"ngroups.data\"");
|
||||
if (!force)
|
||||
working(6, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -287,7 +289,7 @@ int EditNGrpRec(int Area)
|
||||
fwrite(&ngroup, sizeof(ngroup), 1, fil);
|
||||
fclose(fil);
|
||||
NGrpUpdated = 1;
|
||||
working(1, 0, 0);
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
IsDoing("Browsing Menu");
|
||||
|
@ -265,6 +265,7 @@ void CloseNoderec(int Force)
|
||||
free(fout);
|
||||
Syslog('+', "Updated \"nodes.data\"");
|
||||
CreateSema((char *)"scanout");
|
||||
working(6, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -303,6 +304,7 @@ int AppendNoderec(void)
|
||||
nodes.StartDate = time(NULL);
|
||||
nodes.Security.level = 1;
|
||||
nodes.Security.flags = 1;
|
||||
nodes.Language = 'E';
|
||||
fwrite(&nodes, sizeof(nodes), 1, fil);
|
||||
memset(&group, 0, 13);
|
||||
for (i = 1; i <= CFG.tic_groups; i++)
|
||||
@ -576,7 +578,7 @@ fidoaddr e_a(fidoaddr n, int x)
|
||||
|
||||
switch(select_menu(4)) {
|
||||
case 0: return n;
|
||||
case 1: n.zone = edit_int(7, 17, n.zone, (char *)"The ^zone^ number 1..4095");
|
||||
case 1: n.zone = edit_int_range(7, 17, n.zone, 1, 4095, (char *)"The ^zone^ number 1..4095");
|
||||
sprintf(temp, "%s/etc/fidonet.data", getenv("MBSE_ROOT"));
|
||||
if ((fil = fopen(temp, "r")) != NULL) {
|
||||
fread(&fidonethdr, sizeof(fidonethdr), 1, fil);
|
||||
@ -594,9 +596,9 @@ fidoaddr e_a(fidoaddr n, int x)
|
||||
fclose(fil);
|
||||
}
|
||||
break;
|
||||
case 2: E_INT( 8,17,n.net, "The ^net^ number 1..65535")
|
||||
case 3: E_INT( 9,17,n.node, "The ^node^ number 1..65535")
|
||||
case 4: E_INT(10,17,n.point,"The ^point^ number 0..65535")
|
||||
case 2: E_IRC( 8,17,n.net, 1, 32767, "The ^net^ number 1..32767")
|
||||
case 3: E_IRC( 9,17,n.node, 0, 32767, "The ^node^ number 0..32767")
|
||||
case 4: E_IRC(10,17,n.point, 0, 32767, "The ^point^ number 0..32767")
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1143,6 +1145,7 @@ int EditNodeRec(int Area)
|
||||
|
||||
fclose(fil);
|
||||
NodeUpdated = 1;
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
tidy_grlist(&egr);
|
||||
|
@ -183,6 +183,8 @@ void CloseOneline(int force)
|
||||
unlink(fout);
|
||||
chmod(fin, 0660);
|
||||
Syslog('+', "Updated \"oneline.data\"");
|
||||
if (!force)
|
||||
working(6, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -273,7 +275,7 @@ int EditOnelRec(int Area)
|
||||
fwrite(&ol, sizeof(ol), 1, fil);
|
||||
fclose(fil);
|
||||
OnelUpdated = 1;
|
||||
working(1, 0, 0);
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
IsDoing("Browsing Menu");
|
||||
|
@ -234,6 +234,8 @@ void CloseProtocol(int force)
|
||||
chmod(fin, 0640);
|
||||
tidy_stlist(&pro);
|
||||
Syslog('+', "Updated \"protocol.data\"");
|
||||
if (!force)
|
||||
working(6, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -347,7 +349,7 @@ int EditProtRec(int Area)
|
||||
fwrite(&PROT, sizeof(PROT), 1, fil);
|
||||
fclose(fil);
|
||||
ProtUpdated = 1;
|
||||
working(1, 0, 0);
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
IsDoing("Browsing Menu");
|
||||
|
@ -189,11 +189,12 @@ void CloseRoute(int force)
|
||||
Syslog('+', "Updated \"route.data\"");
|
||||
free(fin);
|
||||
free(fout);
|
||||
if (!force)
|
||||
working(6, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
chmod(fin, 0640);
|
||||
working(1, 0, 0);
|
||||
unlink(fout);
|
||||
free(fin);
|
||||
free(fout);
|
||||
@ -369,6 +370,7 @@ int EditRouteRec(int Area)
|
||||
fwrite(&route, routehdr.recsize, 1, fil);
|
||||
fclose(fil);
|
||||
RouteUpdated = 1;
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
free(mfile);
|
||||
|
@ -193,6 +193,8 @@ void CloseService(int force)
|
||||
unlink(fout);
|
||||
chmod(fin, 0640);
|
||||
Syslog('+', "Updated \"servrec.data\"");
|
||||
if (!force)
|
||||
working(6, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -293,6 +295,7 @@ int EditServiceRec(int Area)
|
||||
fwrite(&servrec, servhdr.recsize, 1, fil);
|
||||
fclose(fil);
|
||||
ServiceUpdated = 1;
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
IsDoing("Browsing Menu");
|
||||
|
@ -88,9 +88,9 @@ void CloseTask(void)
|
||||
chmod(fin, 0640);
|
||||
Syslog('+', "Updated \"task.data\"");
|
||||
}
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
working(1, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -255,6 +255,8 @@ void CloseTtyinfo(int force)
|
||||
unlink(fout);
|
||||
chmod(fin, 0640);
|
||||
Syslog('+', "Updated \"ttyinfo.data\"");
|
||||
if (!force)
|
||||
working(6, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -372,7 +374,7 @@ int EditTtyRec(int Area)
|
||||
fwrite(&ttyinfo, sizeof(ttyinfo), 1, fil);
|
||||
fclose(fil);
|
||||
TtyUpdated = 1;
|
||||
working(1, 0, 0);
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
IsDoing("Browsing Menu");
|
||||
|
@ -164,6 +164,8 @@ void CloseUsers(int force)
|
||||
unlink(fout);
|
||||
chmod(fin, 0660);
|
||||
Syslog('+', "Updated \"users.data\"");
|
||||
if (!force)
|
||||
working(6, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -481,6 +483,7 @@ int EditUsrRec(int Area)
|
||||
fwrite(&usrconfig, sizeof(usrconfig), 1, fil);
|
||||
fclose(fil);
|
||||
UsrUpdated = 1;
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
IsDoing("Browsing Menu");
|
||||
|
@ -211,6 +211,8 @@ void CloseVirus(int force)
|
||||
unlink(fout);
|
||||
chmod(fin, 0640);
|
||||
Syslog('+', "Updated \"virscan.data\"");
|
||||
if (!force)
|
||||
working(6, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -304,6 +306,7 @@ int EditVirRec(int Area)
|
||||
fwrite(&virscan, sizeof(virscan), 1, fil);
|
||||
fclose(fil);
|
||||
VirUpdated = 1;
|
||||
working(6, 0, 0);
|
||||
}
|
||||
}
|
||||
IsDoing("Browsing Menu");
|
||||
|
@ -243,6 +243,11 @@ void working(int txno, int y, int x)
|
||||
break;
|
||||
case 5: mvprintw(4, 66, (char *)"Moving . . . ");
|
||||
break;
|
||||
case 6: mvprintw(4, 66, (char *)"Data updated ");
|
||||
fputc(7, stdout);
|
||||
fflush(stdout);
|
||||
sleep(1);
|
||||
break;
|
||||
}
|
||||
|
||||
show_date(LIGHTGRAY, BLACK, 0, 0);
|
||||
|
Reference in New Issue
Block a user