From 44494e6e17a366255d8d353602a05205bd3787b0 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sun, 10 Feb 2002 17:02:45 +0000 Subject: [PATCH] Updates for structure changes --- lib/structs.h | 2 +- mbsetup/m_fgroup.c | 15 ++++++++++++++- mbsetup/m_global.c | 11 ++++------- mbsetup/m_mgroup.c | 3 +++ mbsetup/mbsetup.c | 3 ++- mbtask/mbtask.c | 1 - 6 files changed, 24 insertions(+), 11 deletions(-) diff --git a/lib/structs.h b/lib/structs.h index 0f2275f8..756f6def 100644 --- a/lib/structs.h +++ b/lib/structs.h @@ -1262,7 +1262,7 @@ struct _fgroup { unsigned SendOrg : 1; /* Send original file */ unsigned xRes7 : 1; unsigned xRes8 : 1; - char BasePath; /* File area base path */ + char BasePath[64]; /* File area base path */ securityrec DLSec; /* Download Security */ securityrec UPSec; /* Upload Security */ securityrec LTSec; /* List Security */ diff --git a/mbsetup/m_fgroup.c b/mbsetup/m_fgroup.c index 04b6fd4d..0516c9c0 100644 --- a/mbsetup/m_fgroup.c +++ b/mbsetup/m_fgroup.c @@ -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 * database must always be updated. */ @@ -132,6 +132,19 @@ int OpenFGroup(void) */ memset(&fgroup, 0, sizeof(fgroup)); 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); memset(&fgroup, 0, sizeof(fgroup)); } diff --git a/mbsetup/m_global.c b/mbsetup/m_global.c index 48725e72..740f2547 100644 --- a/mbsetup/m_global.c +++ b/mbsetup/m_global.c @@ -312,9 +312,8 @@ void b_screen(void) show_int( 12,24, CFG.iPasswd_Char); show_int( 13,24, CFG.idleout); show_int( 14,24, CFG.iCRLoginCount); - show_int( 15,24, CFG.max_login); - show_int( 16,24, CFG.iQuota); - show_int( 17,24, CFG.CityLen); + show_int( 15,24, CFG.iQuota); + show_int( 16,24, CFG.CityLen); show_bool( 7,59, CFG.NewAreas); 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 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.max_login, "Maximum ^Login^ attempts") - case 10:E_INT( 16,24, CFG.iQuota, "Maximum ^Quota^ in MBytes in users homedirectory"); - case 11:E_INT( 17,24, CFG.CityLen, "Minimum ^Location name^ length (3..6)") + 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 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)") @@ -1747,7 +1745,6 @@ int global_doc(FILE *fp, FILE *toc, int page) fprintf(fp, " Password char %c\n", CFG.iPasswd_Char); fprintf(fp, " Idle timeout %d mins\n", CFG.idleout); 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, " Location length %d\n", CFG.CityLen); fprintf(fp, " OLR Max. msgs. %d\n", CFG.OLR_MaxMsgs); diff --git a/mbsetup/m_mgroup.c b/mbsetup/m_mgroup.c index b304cac1..027517a3 100644 --- a/mbsetup/m_mgroup.c +++ b/mbsetup/m_mgroup.c @@ -142,6 +142,9 @@ int OpenMGroup(void) */ memset(&mgroup, 0, sizeof(mgroup)); 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); memset(&mgroup, 0, sizeof(mgroup)); } diff --git a/mbsetup/mbsetup.c b/mbsetup/mbsetup.c index a2705af3..c2a2e839 100644 --- a/mbsetup/mbsetup.c +++ b/mbsetup/mbsetup.c @@ -136,7 +136,8 @@ void soft_info(void) temp = calloc(81, sizeof(char)); clr_index(); 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); center_addstr( 8, (char *)COPYRIGHT); set_color(YELLOW, BLACK); diff --git a/mbtask/mbtask.c b/mbtask/mbtask.c index 9b50a06f..902c3551 100644 --- a/mbtask/mbtask.c +++ b/mbtask/mbtask.c @@ -187,7 +187,6 @@ void load_maincfg(void) * BBS Globals */ CFG.CityLen = 6; - CFG.max_login = 5; CFG.exclude_sysop = TRUE; CFG.iConnectString = FALSE; CFG.iAskFileProtocols = FALSE;