AREAS.BBS export

This commit is contained in:
mysticbbs 2012-02-29 14:58:27 -05:00
parent baa261d23d
commit 19a750a2bc
2 changed files with 100 additions and 12 deletions

View File

@ -3916,3 +3916,21 @@
+ CTRL-U now Uncuts all text that is currently in the cut buffer within the + CTRL-U now Uncuts all text that is currently in the cut buffer within the
full screen editor. You can uncut (paste) as many times as you like with full screen editor. You can uncut (paste) as many times as you like with
the current buffer. the current buffer.
+ Mystic now has support for configuring Echomail domains for 5D addresses.
+ Mystic now has support to configure an uplink address for each echomail
address.
+ Default language filename can now be up to a 20 character filename
+ Default start menu can now be up to a 20 character filename
+ All ACS settings in the System configuration have been expanded from 20
characters to 30 characters max.
+ All paths in the System configuration have been expanded to 80 characters
max.
+ MBBSUTIL now has an -AREASOUT option which will export a list of all bases
flagged as Echomail in the AREAS.BBS format.

View File

@ -31,7 +31,7 @@ Program MBBSUTIL;
Uses Uses
CRT, CRT,
Dos, DOS,
m_DateTime, m_DateTime,
m_Strings, m_Strings,
m_QuickSort, m_QuickSort,
@ -54,6 +54,7 @@ Const
UserPack : Boolean = False; UserPack : Boolean = False;
MsgTrash : Boolean = False; MsgTrash : Boolean = False;
NodeCheck : Boolean = True; NodeCheck : Boolean = True;
AreasOut : Boolean = False;
UserKillDays : Integer = 0; UserKillDays : Integer = 0;
BBSSortID : String = ''; BBSSortID : String = '';
@ -62,6 +63,7 @@ Const
BBSKillDays : Integer = 0; BBSKillDays : Integer = 0;
TrashFile : String = ''; TrashFile : String = '';
TempPath : String = ''; TempPath : String = '';
AreasFile : String = '';
Var Var
ConfigFile : File of RecConfig; ConfigFile : File of RecConfig;
@ -116,6 +118,7 @@ Begin
Repeat Repeat
If Eof(ArcFile) Then Begin If Eof(ArcFile) Then Begin
Close (ArcFile); Close (ArcFile);
Exit; Exit;
End; End;
@ -141,6 +144,7 @@ Begin
While A <= Length(Temp2) Do Begin While A <= Length(Temp2) Do Begin
If Temp2[A] = '%' Then Begin If Temp2[A] = '%' Then Begin
Inc(A); Inc(A);
If Temp2[A] = '1' Then Temp := Temp + FName Else If Temp2[A] = '1' Then Temp := Temp + FName Else
If Temp2[A] = '2' Then Temp := Temp + Mask Else If Temp2[A] = '2' Then Temp := Temp + Mask Else
If Temp2[A] = '3' Then Temp := Temp + TempPath; If Temp2[A] = '3' Then Temp := Temp + TempPath;
@ -153,6 +157,18 @@ Begin
ShellDOS ('', Temp); ShellDOS ('', Temp);
End; End;
Function strAddr2Str (Addr : RecEchoMailAddr) : String;
Var
Temp : String[20];
Begin
Temp := strI2S(Addr.Zone) + ':' + strI2S(Addr.Net) + '/' +
strI2S(Addr.Node);
If Addr.Point <> 0 Then Temp := Temp + '.' + strI2S(Addr.Point);
Result := Temp;
End;
Procedure Update_Status (Str: String); Procedure Update_Status (Str: String);
Begin Begin
GotoXY (44, WhereY); GotoXY (44, WhereY);
@ -177,17 +193,18 @@ Begin
WriteLn; WriteLn;
WriteLn ('The following command line options are available:'); WriteLn ('The following command line options are available:');
WriteLn; WriteLn;
WriteLn ('-BKILL <ID> <Days> Delete BBSes which haven''t been verified in <DAYS>'); WriteLn ('-AREAOUT <File> Export AREAS.BBS format file in <File>');
WriteLn ('-BPACK Pack all BBS lists'); WriteLn ('-BKILL <ID> <Days> Delete BBSes which haven''t been verified in <DAYS>');
WriteLn ('-BSORT <ID> <Type> Sorts and packs BBS list by <type>'); WriteLn ('-BPACK Pack all BBS lists');
WriteLn ('-FCHECK Checks file entries for correct size and status'); WriteLn ('-BSORT <ID> <Type> Sorts and packs BBS list by <type>');
WriteLn ('-FPACK Pack file bases'); WriteLn ('-FCHECK Checks file entries for correct size and status');
WriteLn ('-FSORT Sort file base entries by filename'); WriteLn ('-FPACK Pack file bases');
WriteLn ('-FUPLOAD Mass upload all files into filebases'); WriteLn ('-FSORT Sort file base entries by filename');
WriteLn ('-MTRASH <File> Delete messages to/from users listed in <File>'); WriteLn ('-FUPLOAD Mass upload all files into filebases');
WriteLn ('-NOCHECK Bypass online user check at startup'); WriteLn ('-MTRASH <File> Delete messages to/from users listed in <File>');
WriteLn ('-UKILL <Days> Delete users who have not called in <DAYS>'); WriteLn ('-NOCHECK Bypass online user check at startup');
WriteLn ('-UPACK Pack user database'); WriteLn ('-UKILL <Days> Delete users who have not called in <DAYS>');
WriteLn ('-UPACK Pack user database');
End; End;
(***************************************************************************) (***************************************************************************)
@ -1075,6 +1092,45 @@ Begin
WriteLn; WriteLn;
End; End;
Procedure ExportAreasBBS;
Var
MBaseFile : TBufFile;
MBase : RecMessageBase;
OutFile : Text;
Begin
Write ('Exporting AREAS.BBS : ');
Assign (OutFile, AreasFile);
{$I-} ReWrite(OutFile); {$I+}
If IoResult <> 0 Then Exit;
MBaseFile := TBufFile.Create(8192);
If MBaseFile.Open(Config.DataPath + 'mbases.dat', fmOpen, fmRWDN, SizeOf(RecMessageBase)) Then Begin
MBaseFile.Read(MBase);
While Not MBaseFile.EOF Do Begin
MBaseFile.Read(MBase);
Update_Bar (MBaseFile.FilePos, MBaseFile.FileSize);
Update_Status (strStripPipe(MBase.Name));
If MBase.NetType <> 1 Then Continue;
WriteLn (OutFile, '!' + Config.DataPath + MBase.FileName + ' ' + MBase.FileName + ' ' + strAddr2Str(Config.NetUplink[MBase.NetAddr]));
End;
End;
Close (OutFile);
MBaseFile.Free;
Update_Status ('Completed');
WriteLn;
End;
Var Var
A : Byte; A : Byte;
Temp : String; Temp : String;
@ -1116,6 +1172,19 @@ Begin
While (A <= ParamCount) Do Begin While (A <= ParamCount) Do Begin
Temp := strUpper(ParamStr(A)); Temp := strUpper(ParamStr(A));
If Temp = '-AREASOUT' Then Begin
AreasFile := ParamStr(A+1);
Inc(A);
AreasOut := True;
If AreasFile = '' Then Begin
WriteLn('Missing parameter');
Halt(1);
End;
End;
If Temp = '-BKILL' Then Begin If Temp = '-BKILL' Then Begin
BBSKillID := ParamStr(A+1); BBSKillID := ParamStr(A+1);
BBSKillDays := strS2I(ParamStr(A+2)); BBSKillDays := strS2I(ParamStr(A+2));
@ -1240,4 +1309,5 @@ Begin
If UserKill Then Kill_User_File; If UserKill Then Kill_User_File;
If UserPack Then Pack_User_File; If UserPack Then Pack_User_File;
If MsgTrash Then MsgBase_Trash; If MsgTrash Then MsgBase_Trash;
If AreasOut Then ExportAreasBBS;
End. End.