Dropped support for file areas on CDrom

This commit is contained in:
Michiel Broek 2005-08-11 21:05:15 +00:00
parent 5d5538e215
commit 0af2ea61a3
15 changed files with 158 additions and 195 deletions

View File

@ -37,6 +37,9 @@ v0.71.3 13-Jun-2005
the allfiles listings are created. Note that the very first
time only a mark is placed in ~/var and nothing is done.
mbfile:
Dropped support for areas on CDrom.
mbfido:
Fixed commandline parser for mail recipients.
Added subject line clean in several places.
@ -49,6 +52,7 @@ v0.71.3 13-Jun-2005
mbtask:
Made Internet BBS Chat final.
Dropped support for file areas on CDrom.
mbsetup:
Added setup switches per node to disable PLZ or GZ and BZ2
@ -60,6 +64,7 @@ v0.71.3 13-Jun-2005
a valid apache logfile in common format and ftp xferlog
logfile. If defined then downloads via www and or ftp can
be counted.
Dropped support for file areas on CDrom.
v0.71.2 16-Jan-2005 - 13-Jun-2005

4
TODO
View File

@ -114,9 +114,6 @@ mbcico:
mbfile:
L: Possibility to skip file areas from checking and reindexing.
N: It is not possible to import areas that run of cd-roms. Do we still
need cd-rom support with current hd prices?
mbnntp:
U: fetched mail doesn't get the status Rcvd if it was for the user.
@ -128,7 +125,6 @@ mbnntp:
name of the original sender in case the client doesn't set the
apperantly-to: header.
mbaff:
L: Rewrite filefind search algorithm.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -14,7 +14,7 @@
</HEAD>
<BODY>
<BLOCKQUOTE>
<div align='right'><h5>Last update 08-Mar-2004</h5></div>
<div align='right'><h5>Last update 11-Aug-2005</h5></div>
<div align='center'><H1>MBSE BBS Setup - BBS Setup - File Areas.</H1></div>
<H3>File Areas introduction.</H3>
@ -37,9 +37,6 @@ moved to the new location.
<strong>Down Sec. </strong>The download security level.
<strong>Upl. Sec. </strong>The upload security level.
<strong>List Sec. </strong>The security level to list the files in this area.
<strong>Files.bbs </strong>The full path and filename if this area is on CDROM.
You may leave this blank if it is in the Path together
with the files.
<strong>Available </strong>If this area is available. If you make an available
area unavailable the area is checked if there are
downloadable files in that area. If so, you can't remove
@ -53,8 +50,6 @@ moved to the new location.
<strong>Pwd upl. </strong>Allow users to password protect their uploads.
<strong>Filefind </strong>Search in this area for filefind requests.
<strong>Add alpha </strong>Add .tic files alphabetic sorted or at the bottom of the list.
<strong>CDrom </strong>Is this a CDROM area. The affects the behaviour of some
other utilities because the Path is read-only.
<strong>File req. </strong>Allow File Request from this area.
<strong>BBS group </strong>Not in use yet.
<strong>New group </strong>New files announce group. See <A HREF="newgroups.html">Newfiles groups</A> for more info.

View File

@ -794,15 +794,15 @@ struct fileareas {
unsigned FileFind : 1; /* FileFind Scan */
unsigned AddAlpha : 1; /* Add New files sorted */
unsigned Available : 1; /* Area is available */
unsigned CDrom : 1; /* Area is on CDrom */
unsigned xCDrom : 1;
unsigned FileReq : 1; /* Allow File Requests */
char BbsGroup[13]; /* BBS Group */
char Password[21]; /* Area Password */
unsigned DLdays; /* Move not DL for days */
unsigned FDdays; /* Move if FD older than */
unsigned MoveArea; /* Move to Area */
int xCost; /* File Cost */
char FilesBbs[65]; /* Path to files.bbs if CD */
int xCost;
char xFilesBbs[65];
char NewGroup[13]; /* Newfiles scan group */
char Archiver[6]; /* Archiver for area */
unsigned Upload; /* Upload area */

View File

@ -498,9 +498,7 @@ void CheckArea(long Area)
/*
* Check files in the directory against the database.
* This test is skipped for CD-rom.
*/
if (!area.CDrom) {
if ((dp = opendir(area.Path)) != NULL) {
while ((de = readdir(dp)) != NULL) {
if (de->d_name[0] != '.') {
@ -551,7 +549,6 @@ void CheckArea(long Area)
} else {
WriteError("Can't open %s", area.Path);
}
}
mbsedb_CloseFDB(fdb_area);

View File

@ -69,12 +69,6 @@ void Delete(int UnDel, int Area, char *File)
printf("Area %d not available\n", Area);
die(MBERR_CONFIG_ERROR);
}
if (area.CDrom) {
WriteError("Can't %sdelete from CD-ROM", UnDel?"un":"");
if (!do_quiet)
printf("Can't %sdelete from CD-ROM\n", UnDel?"un":"");
die(MBERR_COMMANDLINE);
}
if ((fdb_area = mbsedb_OpenFDB(Area, 30)) == NULL)
die(MBERR_GENERAL);

View File

@ -73,7 +73,7 @@ void ImportFiles(int Area)
if (LoadAreaRec(Area) == FALSE)
die(MBERR_INIT_ERROR);
if (area.Available && !area.CDrom) {
if (area.Available) {
temp = calloc(PATH_MAX, sizeof(char));
temp2 = calloc(PATH_MAX, sizeof(char));
pwd = calloc(PATH_MAX, sizeof(char));
@ -446,11 +446,6 @@ void ImportFiles(int Area)
if (!do_quiet)
printf("Area not available\n");
}
if (area.CDrom) {
WriteError("Can't import on CD-ROM");
if (!do_quiet)
printf("Can't import on CD-ROM\n");
}
}
if (!do_quiet) {

View File

@ -408,9 +408,6 @@ void ReqIndex(void)
/*
* Create files.bbs
*/
if (strlen(area.FilesBbs))
strcpy(temp, area.FilesBbs);
else
sprintf(temp, "%s/files.bbs", area.Path);
if ((fp = fopen(temp, "w")) == NULL) {
WriteError("$Can't create %s", temp);
@ -433,7 +430,7 @@ void ReqIndex(void)
/*
* Create 00index file.
*/
if (!area.CDrom && (strncmp(CFG.ftp_base, area.Path, strlen(CFG.ftp_base)) == 0)) {
if (strncmp(CFG.ftp_base, area.Path, strlen(CFG.ftp_base)) == 0) {
sprintf(temp, "%s/00index", area.Path);
if ((fp = fopen(temp, "w")) == NULL) {
@ -593,7 +590,7 @@ void HtmlIndex(char *Lang)
/*
* Create index.html pages in each available download area.
*/
if (!area.CDrom && fm && (strncmp(CFG.ftp_base, area.Path, strlen(CFG.ftp_base)) == 0)) {
if (fm && (strncmp(CFG.ftp_base, area.Path, strlen(CFG.ftp_base)) == 0)) {
fseek(fdb_area->fp, fdbhdr.hdrsize, SEEK_SET);
AreasHtml++;

View File

@ -84,7 +84,7 @@ void Kill(void)
fseek(pAreas, ((i-1) * areahdr.recsize) + areahdr.hdrsize, SEEK_SET);
fread(&area, areahdr.recsize, 1, pAreas);
if ((area.Available) && (area.DLdays || area.FDdays) && (!area.CDrom)) {
if ((area.Available) && (area.DLdays || area.FDdays)) {
if (enoughspace(CFG.freespace) == 0)
die(MBERR_DISK_FULL);

View File

@ -74,12 +74,6 @@ void Move(int From, int To, char *File)
printf("Area %d not available\n", From);
die(MBERR_COMMANDLINE);
}
if (area.CDrom) {
WriteError("Can't move from CD-ROM");
if (!do_quiet)
printf("Can't move from CD-ROM\n");
die(MBERR_COMMANDLINE);
}
if (CheckFDB(From, area.Path))
die(MBERR_GENERAL);
@ -127,12 +121,6 @@ void Move(int From, int To, char *File)
printf("Area %d not available\n", To);
die(MBERR_GENERAL);
}
if (area.CDrom) {
WriteError("Can't move to CD-ROM");
if (!do_quiet)
printf("Can't move to CD-ROM\n");
die(MBERR_COMMANDLINE);
}
if (CheckFDB(To, area.Path))
die(MBERR_GENERAL);

View File

@ -77,7 +77,7 @@ void PackFileBase(void)
fseek(pAreas, ((i-1) * areahdr.recsize) + areahdr.hdrsize, SEEK_SET);
fread(&area, areahdr.recsize, 1, pAreas);
if (area.Available && !area.CDrom) {
if (area.Available) {
if (enoughspace(CFG.freespace) == 0)
die(MBERR_DISK_FULL);

View File

@ -68,12 +68,6 @@ void ReArc(int Area, char *File)
printf("Area %d not available\n", Area);
die(MBERR_CONFIG_ERROR);
}
if (area.CDrom) {
WriteError("Can't rearc on CD-ROM");
if (!do_quiet)
printf("Can't rearc on CD-ROM\n");
die(MBERR_COMMANDLINE);
}
if (strlen(area.Archiver) == 0) {
WriteError("No default archiver for area %d", Area);
if (!do_quiet)

View File

@ -136,6 +136,21 @@ int OpenFilearea(void)
*/
memset(&area, 0, sizeof(area));
while (fread(&area, oldsize, 1, fin) == 1) {
/*
* Clear obsolete fields
*/
if (area.xCDrom) {
area.xCDrom = FALSE;
FileUpdated = 1;
}
if (area.xCost) {
area.xCost = 0;
FileUpdated = 1;
}
if (strlen(area.xFilesBbs)) {
memset(&area.xFilesBbs, 0, 65);
FileUpdated = 1;
}
fwrite(&area, sizeof(area), 1, fout);
memset(&area, 0, sizeof(area));
}
@ -217,28 +232,26 @@ void FileScreen(void)
mbse_mvprintw( 8, 2, "3. Down Sec.");
mbse_mvprintw( 9, 2, "4. Upl. Sec.");
mbse_mvprintw(10, 2, "5. List Sec.");
mbse_mvprintw(11, 2, "6. Files.bbs");
mbse_mvprintw(12, 2, "7. Available");
mbse_mvprintw(13, 2, "8. Check new");
mbse_mvprintw(14, 2, "9. Dupecheck");
mbse_mvprintw(15, 2, "10. Free area");
mbse_mvprintw(16, 2, "11. Direct DL");
mbse_mvprintw(17, 2, "12. Pwd upl.");
mbse_mvprintw(18, 2, "13. Filefind");
mbse_mvprintw(11, 2, "6. Available");
mbse_mvprintw(12, 2, "7. Check new");
mbse_mvprintw(13, 2, "8. Dupecheck");
mbse_mvprintw(14, 2, "9. Free area");
mbse_mvprintw(15, 2, "10. Direct DL");
mbse_mvprintw(16, 2, "11. Pwd upl.");
mbse_mvprintw(17, 2, "12. Filefind");
mbse_mvprintw(12,30, "14. Add alpha");
mbse_mvprintw(13,30, "15. CDrom");
mbse_mvprintw(14,30, "16. File req.");
mbse_mvprintw(15,30, "17. BBS Group");
mbse_mvprintw(16,30, "18. New group");
mbse_mvprintw(17,30, "19. Min. age");
mbse_mvprintw(18,30, "20. Password");
mbse_mvprintw(12,30, "13. Add alpha");
mbse_mvprintw(13,30, "14. File req.");
mbse_mvprintw(14,30, "15. BBS Group");
mbse_mvprintw(15,30, "16. New group");
mbse_mvprintw(16,30, "17. Min. age");
mbse_mvprintw(17,30, "18. Password");
mbse_mvprintw(12,59, "21. DL days");
mbse_mvprintw(13,59, "22. FD days");
mbse_mvprintw(14,59, "23. Move area");
mbse_mvprintw(15,59, "24. Archiver");
mbse_mvprintw(16,59, "25. Upload");
mbse_mvprintw(12,59, "19. DL days");
mbse_mvprintw(13,59, "20. FD days");
mbse_mvprintw(14,59, "21. Move area");
mbse_mvprintw(15,59, "22. Archiver");
mbse_mvprintw(16,59, "23. Upload");
}
@ -288,22 +301,20 @@ int EditFileRec(int Area)
show_sec( 8,16, area.DLSec);
show_sec( 9,16, area.UPSec);
show_sec(10,16, area.LTSec);
show_str(11,16,64, area.FilesBbs);
show_bool(12,16, area.Available);
show_bool(13,16, area.New);
show_bool(14,16, area.Dupes);
show_bool(15,16, area.Free);
show_bool(16,16, area.DirectDL);
show_bool(17,16, area.PwdUP);
show_bool(18,16, area.FileFind);
show_bool(11,16, area.Available);
show_bool(12,16, area.New);
show_bool(13,16, area.Dupes);
show_bool(14,16, area.Free);
show_bool(15,16, area.DirectDL);
show_bool(16,16, area.PwdUP);
show_bool(17,16, area.FileFind);
show_bool(12,44, area.AddAlpha);
show_bool(13,44, area.CDrom);
show_bool(14,44, area.FileReq);
show_str(15,44,12, area.BbsGroup);
show_str(16,44,12, area.NewGroup);
show_int(17,44, area.Age);
show_str(18,44,20, (char *)"********************");
show_bool(13,44, area.FileReq);
show_str(14,44,12, area.BbsGroup);
show_str(15,44,12, area.NewGroup);
show_int(16,44, area.Age);
show_str(17,44,20, (char *)"********************");
show_int(12,73, area.DLdays);
show_int(13,73, area.FDdays);
@ -311,7 +322,7 @@ int EditFileRec(int Area)
show_str(15,73, 5, area.Archiver);
show_int(16,73, area.Upload);
switch(select_menu(25)) {
switch(select_menu(23)) {
case 0: crc1 = 0xffffffff;
crc1 = upd_crc32((char *)&area, crc1, areahdr.recsize);
if (crc != crc1) {
@ -367,8 +378,7 @@ int EditFileRec(int Area)
case 3: E_SEC( 8,16, area.DLSec, "8.4.3 DOWNLOAD SECURITY", FileScreen)
case 4: E_SEC( 9,16, area.UPSec, "8.4.4 UPLOAD SECURITY", FileScreen)
case 5: E_SEC( 10,16, area.LTSec, "8.4.5 LIST SECURITY", FileScreen)
case 6: E_STR( 11,16,64, area.FilesBbs, "The path and name of \"files.bbs\" if area is on CDROM")
case 7: Available = edit_bool(12, 16, area.Available, (char *)"Is this area ^available^");
case 6: Available = edit_bool(11, 16, area.Available, (char *)"Is this area ^available^");
temp = calloc(PATH_MAX, sizeof(char));
sprintf(temp, "%s/var/fdb/file%d.data", getenv("MBSE_ROOT"), Area);
if (area.Available && !Available) {
@ -424,30 +434,29 @@ int EditFileRec(int Area)
}
free(temp);
break;
case 8: E_BOOL(13,16, area.New, "Include this area in ^new files^ check")
case 9: E_BOOL(14,16, area.Dupes, "Check this area for ^duplicates^ during upload")
case 10:E_BOOL(15,16, area.Free, "Are all files ^free^ in this area")
case 11:E_BOOL(16,16, area.DirectDL, "Allow ^direct download^ from this area")
case 12:E_BOOL(17,16, area.PwdUP, "Allow ^password^ on uploads")
case 13:E_BOOL(18,16, area.FileFind, "Search this area for ^filefind^ requests")
case 14:E_BOOL(12,44, area.AddAlpha, "Add new files ^alphabetic^ or at the end")
case 15:E_BOOL(13,44, area.CDrom, "Is this area on a ^CDROM^")
case 16:E_BOOL(14,44, area.FileReq, "Allow ^file requests^ from this area")
case 17:strcpy(area.BbsGroup, PickFGroup((char *)"8.4.17"));
case 7: E_BOOL(12,16, area.New, "Include this area in ^new files^ check")
case 8: E_BOOL(13,16, area.Dupes, "Check this area for ^duplicates^ during upload")
case 9: E_BOOL(14,16, area.Free, "Are all files ^free^ in this area")
case 10:E_BOOL(15,16, area.DirectDL, "Allow ^direct download^ from this area")
case 11:E_BOOL(16,16, area.PwdUP, "Allow ^password^ on uploads")
case 12:E_BOOL(17,16, area.FileFind, "Search this area for ^filefind^ requests")
case 13:E_BOOL(12,44, area.AddAlpha, "Add new files ^alphabetic^ or at the end")
case 14:E_BOOL(13,44, area.FileReq, "Allow ^file requests^ from this area")
case 15:strcpy(area.BbsGroup, PickFGroup((char *)"8.4.15"));
FileScreen();
break;
case 18:strcpy(area.NewGroup, PickNGroup((char *)"8.4.18"));
case 16:strcpy(area.NewGroup, PickNGroup((char *)"8.4.16"));
FileScreen();
break;
case 19:E_INT( 17,44, area.Age, "The ^minimum age^ to access this area")
case 20:E_STR( 18,44,20, area.Password, "The ^password^ to access this area")
case 21:E_INT( 12,73, area.DLdays, "The not ^downloaded days^ to move/kill files")
case 22:E_INT( 13,73, area.FDdays, "The ^file age^ in days to move/kill files")
case 23:E_INT( 14,73, area.MoveArea, "The ^area to move^ files to, 0 is kill")
case 24:strcpy(area.Archiver, PickArchive((char *)"8.4"));
case 17:E_INT( 16,44, area.Age, "The ^minimum age^ to access this area")
case 18:E_STR( 17,44,20, area.Password, "The ^password^ to access this area")
case 19:E_INT( 12,73, area.DLdays, "The not ^downloaded days^ to move/kill files")
case 20:E_INT( 13,73, area.FDdays, "The ^file age^ in days to move/kill files")
case 21:E_INT( 14,73, area.MoveArea, "The ^area to move^ files to, 0 is kill")
case 22:strcpy(area.Archiver, PickArchive((char *)"8.4"));
FileScreen();
break;
case 25:E_INT( 16,73, area.Upload, "The ^upload^ area, 0 if upload in this area")
case 23:E_INT( 16,73, area.Upload, "The ^upload^ area, 0 if upload in this area")
}
}
}
@ -799,7 +808,6 @@ int bbs_file_doc(FILE *fp, FILE *toc, int page)
web_secflags(wp, (char *)"Download security", area.DLSec);
web_secflags(wp, (char *)"Upload security", area.UPSec);
web_secflags(wp, (char *)"List security", area.LTSec);
add_webtable(wp, (char *)"Path to files.bbs", area.FilesBbs);
add_webtable(wp, (char *)"Newfiles scan", getboolean(area.New));
add_webtable(wp, (char *)"Check upload dupes", getboolean(area.Dupes));
add_webtable(wp, (char *)"Files are free", getboolean(area.Free));
@ -807,7 +815,6 @@ int bbs_file_doc(FILE *fp, FILE *toc, int page)
add_webtable(wp, (char *)"Allow password uploads", getboolean(area.PwdUP));
add_webtable(wp, (char *)"Filefind on", getboolean(area.FileFind));
add_webtable(wp, (char *)"Add files sorted", getboolean(area.AddAlpha));
add_webtable(wp, (char *)"Files on CDrom", getboolean(area.CDrom));
add_webtable(wp, (char *)"Allow filerequest", getboolean(area.FileReq));
fprintf(wp, "<TR><TH align='left'>BBS (tic) file group</TH><TD><A HREF=\"filegroup_%s.html\">%s</A></TD></TH>\n",
area.BbsGroup, area.BbsGroup);
@ -861,7 +868,6 @@ int bbs_file_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, " Download sec. %s\n", get_secstr(area.DLSec));
fprintf(fp, " Upload security %s\n", get_secstr(area.UPSec));
fprintf(fp, " List seccurity %s\n", get_secstr(area.LTSec));
fprintf(fp, " Path to files.bbs %s\n", area.FilesBbs);
fprintf(fp, " Newfiles scan %s\n", getboolean(area.New));
fprintf(fp, " Check upl. dupes %s\n", getboolean(area.Dupes));
fprintf(fp, " Files are free %s\n", getboolean(area.Free));
@ -869,7 +875,6 @@ int bbs_file_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, " Allow pwd upl. %s\n", getboolean(area.PwdUP));
fprintf(fp, " Filefind on %s\n", getboolean(area.FileFind));
fprintf(fp, " Add files sorted %s\n", getboolean(area.AddAlpha));
fprintf(fp, " Files in CDROM %s\n", getboolean(area.CDrom));
fprintf(fp, " Allow filerequst %s\n", getboolean(area.FileReq));
fprintf(fp, " BBS group %s\n", area.BbsGroup);
fprintf(fp, " Newfiles group %s\n", area.NewGroup);

View File

@ -4,7 +4,7 @@
* Purpose ...............: Give status of all filesystems
*
*****************************************************************************
* Copyright (C) 1997-2004
* Copyright (C) 1997-2005
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@ -528,9 +528,6 @@ void *disk_thread(void)
while (fread(&area, areahdr.recsize, 1, fp)) {
if (area.Available) {
if (area.CDrom)
add_path(area.FilesBbs);
else
add_path(area.Path);
}
}