Updates for structure changes

This commit is contained in:
Michiel Broek 2002-02-10 17:02:45 +00:00
parent 054987b525
commit 44494e6e17
6 changed files with 24 additions and 11 deletions

View File

@ -1262,7 +1262,7 @@ struct _fgroup {
unsigned SendOrg : 1; /* Send original file */ unsigned SendOrg : 1; /* Send original file */
unsigned xRes7 : 1; unsigned xRes7 : 1;
unsigned xRes8 : 1; unsigned xRes8 : 1;
char BasePath; /* File area base path */ char BasePath[64]; /* File area base path */
securityrec DLSec; /* Download Security */ securityrec DLSec; /* Download Security */
securityrec UPSec; /* Upload Security */ securityrec UPSec; /* Upload Security */
securityrec LTSec; /* List Security */ securityrec LTSec; /* List Security */

View File

@ -111,7 +111,7 @@ int OpenFGroup(void)
} }
/* /*
* In case we are automaitc upgrading the data format * In case we are automatic upgrading the data format
* we save the old format. If it is changed, the * we save the old format. If it is changed, the
* database must always be updated. * database must always be updated.
*/ */
@ -132,6 +132,19 @@ int OpenFGroup(void)
*/ */
memset(&fgroup, 0, sizeof(fgroup)); memset(&fgroup, 0, sizeof(fgroup));
while (fread(&fgroup, oldsize, 1, fin) == 1) { while (fread(&fgroup, oldsize, 1, fin) == 1) {
/*
* Now set defaults
*/
if (FGrpUpdated) {
fgroup.DupCheck = TRUE;
fgroup.Secure = TRUE;
fgroup.VirScan = TRUE;
fgroup.Announce = TRUE;
fgroup.UpdMagic = TRUE;
fgroup.FileId = TRUE;
sprintf(fgroup.BasePath, "%s/ftp/pub/%s", getenv("MBSE_ROOT"), tl(fgroup.Name));
}
fwrite(&fgroup, sizeof(fgroup), 1, fout); fwrite(&fgroup, sizeof(fgroup), 1, fout);
memset(&fgroup, 0, sizeof(fgroup)); memset(&fgroup, 0, sizeof(fgroup));
} }

View File

@ -312,9 +312,8 @@ void b_screen(void)
show_int( 12,24, CFG.iPasswd_Char); show_int( 12,24, CFG.iPasswd_Char);
show_int( 13,24, CFG.idleout); show_int( 13,24, CFG.idleout);
show_int( 14,24, CFG.iCRLoginCount); show_int( 14,24, CFG.iCRLoginCount);
show_int( 15,24, CFG.max_login); show_int( 15,24, CFG.iQuota);
show_int( 16,24, CFG.iQuota); show_int( 16,24, CFG.CityLen);
show_int( 17,24, CFG.CityLen);
show_bool( 7,59, CFG.NewAreas); show_bool( 7,59, CFG.NewAreas);
show_int( 8,59, CFG.OLR_MaxMsgs); show_int( 8,59, CFG.OLR_MaxMsgs);
@ -345,9 +344,8 @@ void e_bbsglob(void)
case 6: E_INT( 12,24, CFG.iPasswd_Char, "Ascii number of ^password^ character") 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 7: E_INT( 13,24, CFG.idleout, "^Idle timeout^ in minutes")
case 8: E_INT( 14,24, CFG.iCRLoginCount, "Maximum ^Login Return^ count") case 8: E_INT( 14,24, CFG.iCRLoginCount, "Maximum ^Login Return^ count")
case 9: E_INT( 15,24, CFG.max_login, "Maximum ^Login^ attempts") case 9: E_INT( 15,24, CFG.iQuota, "Maximum ^Quota^ in MBytes in users homedirectory");
case 10:E_INT( 16,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_INT( 17,24, CFG.CityLen, "Minimum ^Location name^ length (3..6)")
case 12:E_BOOL( 7,59, CFG.NewAreas, "Show ^new^ or ^deleted^ message areas to the user at login.") case 12:E_BOOL( 7,59, CFG.NewAreas, "Show ^new^ or ^deleted^ message areas to the user at login.")
case 13:E_INT( 8,59, CFG.OLR_MaxMsgs, "^Maximum messages^ to pack for download (0=unlimited)") case 13:E_INT( 8,59, CFG.OLR_MaxMsgs, "^Maximum messages^ to pack for download (0=unlimited)")
@ -1747,7 +1745,6 @@ int global_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, " Password char %c\n", CFG.iPasswd_Char); fprintf(fp, " Password char %c\n", CFG.iPasswd_Char);
fprintf(fp, " Idle timeout %d mins\n", CFG.idleout); fprintf(fp, " Idle timeout %d mins\n", CFG.idleout);
fprintf(fp, " Login enters %d\n", CFG.iCRLoginCount); fprintf(fp, " Login enters %d\n", CFG.iCRLoginCount);
fprintf(fp, " Login attempts %d\n", CFG.max_login);
fprintf(fp, " Homedir quota %d MB.\n", CFG.iQuota); fprintf(fp, " Homedir quota %d MB.\n", CFG.iQuota);
fprintf(fp, " Location length %d\n", CFG.CityLen); fprintf(fp, " Location length %d\n", CFG.CityLen);
fprintf(fp, " OLR Max. msgs. %d\n", CFG.OLR_MaxMsgs); fprintf(fp, " OLR Max. msgs. %d\n", CFG.OLR_MaxMsgs);

View File

@ -142,6 +142,9 @@ int OpenMGroup(void)
*/ */
memset(&mgroup, 0, sizeof(mgroup)); memset(&mgroup, 0, sizeof(mgroup));
while (fread(&mgroup, oldsize, 1, fin) == 1) { while (fread(&mgroup, oldsize, 1, fin) == 1) {
if (MGrpUpdated) {
sprintf(mgroup.BasePath, "%s/var/mail/%s", getenv("MBSE_ROOT"), tl(mgroup.Name));
}
fwrite(&mgroup, sizeof(mgroup), 1, fout); fwrite(&mgroup, sizeof(mgroup), 1, fout);
memset(&mgroup, 0, sizeof(mgroup)); memset(&mgroup, 0, sizeof(mgroup));
} }

View File

@ -136,7 +136,8 @@ void soft_info(void)
temp = calloc(81, sizeof(char)); temp = calloc(81, sizeof(char));
clr_index(); clr_index();
set_color(YELLOW, BLACK); set_color(YELLOW, BLACK);
center_addstr( 6, (char *)"MBSE BBS (%s-%s)", OsName(), OsCPU()); sprintf(temp, "MBSE BBS (%s-%s)", OsName(), OsCPU());
center_addstr( 6, temp);
set_color(WHITE, BLACK); set_color(WHITE, BLACK);
center_addstr( 8, (char *)COPYRIGHT); center_addstr( 8, (char *)COPYRIGHT);
set_color(YELLOW, BLACK); set_color(YELLOW, BLACK);

View File

@ -187,7 +187,6 @@ void load_maincfg(void)
* BBS Globals * BBS Globals
*/ */
CFG.CityLen = 6; CFG.CityLen = 6;
CFG.max_login = 5;
CFG.exclude_sysop = TRUE; CFG.exclude_sysop = TRUE;
CFG.iConnectString = FALSE; CFG.iConnectString = FALSE;
CFG.iAskFileProtocols = FALSE; CFG.iAskFileProtocols = FALSE;