This commit is contained in:
mysticbbs 2013-03-19 01:48:11 -04:00
parent 2ea12e38dc
commit 565f513d29
25 changed files with 253 additions and 194 deletions

View File

@ -178,7 +178,7 @@ Var
Read (MBaseFile, MBase);
If IsExportNode(MBase, Node.Index) Then
List.Add(strPadR(strI2S(MBase.Index), 6, ' ') + ' ' + strPadR(strStripPipe(MBase.Name), 40, ' '), 0);
List.Add(strPadR(strI2S(MBase.Index), 6, ' ') + ' ' + strPadR('(' + MBase.EchoTag + ') ' + strStripPipe(MBase.Name), 40, ' '), 0);
End;
End;

View File

@ -292,7 +292,7 @@ Begin
If Str = '-' Then
WriteLn (tLOG, strRep('-', 40))
Else
WriteLn (tLOG, DateDos2Str(CurDateDos, 1) + ' ' + TimeDos2Str(CurDateDos, False) + ' ' + Str);
WriteLn (tLOG, DateDos2Str(CurDateDos, 1) + ' ' + TimeDos2Str(CurDateDos, 0) + ' ' + Str);
Close (tLOG);
End;

View File

@ -190,15 +190,15 @@ Begin
Write (tFile, Config.MsgsPath + Ending);
Write (tFile, Config.SysopName + Ending);
Write (tFile, Session.User.ThisUser.Handle + Ending);
Write (tFile, TimeDos2Str(Session.NextEvent.ExecTime, False) + Ending); {next event start time hh:mm}
Write (tFile, TimeDos2Str(Session.NextEvent.ExecTime, 0) + Ending); {next event start time hh:mm}
Write (tFile, 'Y' + Ending); {error-free connection}
Write (tFile, 'N' + Ending); {ansi in NG mode}
Write (tFile, 'Y' + Ending); {record locking}
Write (tFile, '3' + Ending); {default BBS color}
Write (tFile, '0' + Ending); {time credits per minute}
Write (tFile, '00/00/00' + Ending); {last new filescan date}
Write (tFile, TimeDos2Str(Session.User.ThisUser.LastOn, False) + Ending); {time of this call}
Write (tFile, TimeDos2Str(Session.User.ThisUser.LastOn, False) + Ending); {time of last call}
Write (tFile, TimeDos2Str(Session.User.ThisUser.LastOn, 0) + Ending); {time of this call}
Write (tFile, TimeDos2Str(Session.User.ThisUser.LastOn, 0) + Ending); {time of last call}
Write (tFile, '32768' + Ending); {max daily files (??) }
Write (tFile, Session.User.ThisUser.DLsToday, Ending);
Write (tFile, Session.User.ThisUser.ULk, Ending);

View File

@ -1002,7 +1002,7 @@ Begin
Session.io.PromptInfo[2] := strComma(SR.Size);
Session.io.PromptInfo[3] := DateDos2Str(SR.Time, Session.User.ThisUser.DateType);
Session.io.PromptInfo[4] := TimeDos2Str(SR.Time, True);
Session.io.PromptInfo[4] := TimeDos2Str(SR.Time, 1);
Session.io.OutFullLn (Session.GetPrompt(193));
@ -1092,7 +1092,7 @@ Begin
ExecuteArchive (FName, '', Mask, 2);
If FileExist(Session.TempPath + Mask) Then Begin
Case CheckFileLimits (1, GetFileSize(Session.TempPath + Mask) DIV 1024) of
Case CheckFileLimits (1, FileByteSize(Session.TempPath + Mask) DIV 1024) of
0 : If SendFile (Session.TempPath + Mask) Then Begin;
Session.SystemLog ('Download from ' + FName + ': ' + Mask);

View File

@ -507,7 +507,7 @@ Begin
Session.io.PromptInfo[2] := strI2S(LastOn.Node);
Session.io.PromptInfo[3] := LastOn.City;
Session.io.PromptInfo[4] := DateDos2Str(LastOn.DateTime, Session.User.ThisUser.DateType);
Session.io.PromptInfo[5] := TimeDos2Str(LastOn.DateTime, True);
Session.io.PromptInfo[5] := TimeDos2Str(LastOn.DateTime, 1);
Session.io.PromptInfo[7] := strI2S(LastOn.CallNum);
Session.io.PromptInfo[8] := LastOn.Address;
Session.io.PromptInfo[9] := LastOn.UserInfo;
@ -1105,7 +1105,7 @@ Var
Session.io.PromptInfo[1] := DirList[BarPos]^.Desc;
Session.io.PromptInfo[2] := strComma(DirList[BarPos]^.Size);
Session.io.PromptInfo[3] := DateDos2Str(DirList[BarPos]^.Date, Session.User.ThisUser.DateType);
Session.io.PromptInfo[7] := TimeDos2Str(DirList[BarPos]^.Date, True);
Session.io.PromptInfo[7] := TimeDos2Str(DirList[BarPos]^.Date, 1);
If DirList[BarPos]^.IsDir Then Begin
Session.io.PromptInfo[4] := '';

View File

@ -718,7 +718,7 @@ Begin
'B' : LastMCIValue := strI2S(TBBSCore(Core).User.ThisUser.TimeBank);
'C' : LastMCIValue := strI2S(Config.SystemCalls);
'E' : If Graphics = 1 Then LastMCIValue := 'Ansi' Else LastMCIValue := 'Ascii'; //++lang
'I' : LastMCIValue := TimeDos2Str(CurDateDos, True);
'I' : LastMCIValue := TimeDos2Str(CurDateDos, 1);
'L' : LastMCIValue := strI2S(TBBSCore(Core).TimeLeft);
'O' : LastMCIValue := strI2S(TBBSCore(Core).ElapsedTime);
End;

View File

@ -614,7 +614,7 @@ Begin
Msg^.SetPriv (TempBase.Flags and MBPrivate <> 0);
Msg^.SetDate (DateDos2Str(CurDateDos, 1));
Msg^.SetTime (TimeDos2Str(CurDateDos, False));
Msg^.SetTime (TimeDos2Str(CurDateDos, 0));
End;
Procedure TMsgBase.ChangeArea (Data: String);
@ -3580,7 +3580,7 @@ Begin
Msg^.SetPriv (mArea.Flags And MBPrivate <> 0);
Msg^.SetDate (DateDos2Str(CurDateDos, 1));
Msg^.SetTime (TimeDos2Str(CurDateDos, False));
Msg^.SetTime (TimeDos2Str(CurDateDos, 0));
Msg^.SetFrom (mFrom);
Msg^.SetTo (mTo);
Msg^.SetSubj (mSubj);
@ -3853,7 +3853,7 @@ Begin
Write (tFile, CRLF);
Write (tFile, Config.SysopName + CRLF);
Write (tFile, '0,' + Config.qwkBBSID + CRLF);
Write (tFile, DateDos2Str(CurDateDos, 1), ',', TimeDos2Str(CurDateDos, False) + CRLF);
Write (tFile, DateDos2Str(CurDateDos, 1), ',', TimeDos2Str(CurDateDos, 0) + CRLF);
Write (tFile, strUpper(Session.User.ThisUser.Handle) + CRLF);
Write (tFile, CRLF);
Write (tFile, '0' + CRLF);

View File

@ -1444,7 +1444,7 @@ Begin
FillChar(JM^.Dest, SizeOf(JM^.Dest), #0);
JM^.MsgDate := DateDos2Str(CurDateDos, 1);
JM^.MsgTime := TimeDos2Str(CurDateDos, False);
JM^.MsgTime := TimeDos2Str(CurDateDos, 0);
End;
@ -1541,18 +1541,18 @@ Begin
TmpHdr^.BaseMsgNum := 1;
TmpHdr^.Created := ToUnixDate(CurDateDos);
TmpHdr^.PwdCrc := -1;
CreateError := SaveFile(JM^.MsgPath + '.jhr', TmpHdr^, SizeOf(TmpHdr^));
CreateError := SaveFilePos(JM^.MsgPath + '.jhr', TmpHdr^, SizeOf(TmpHdr^), 0);
Dispose(TmpHdr);
If CreateError = 0 Then
CreateError := SaveFile(JM^.MsgPath + '.jlr', CreateError, 0);
CreateError := SaveFilePos(JM^.MsgPath + '.jlr', CreateError, 0, 0);
If CreateError = 0 Then
CreateError := SaveFile(JM^.MsgPath + '.jdt', CreateError, 0);
CreateError := SaveFilePos(JM^.MsgPath + '.jdt', CreateError, 0, 0);
If CreateError = 0 Then
CreateError := SaveFile(JM^.MsgPath + '.jdx', CreateError , 0);
CreateError := SaveFilePos(JM^.MsgPath + '.jdx', CreateError , 0, 0);
If IoResult <> 0 Then;
End;

View File

@ -421,10 +421,10 @@ Begin
SqInfo^.SqBase.KeepDays := MaxDays;
SqInfo^.SqBase.EndFrame := SqInfo^.SqBase.Len;
CreateMsgBase := (SaveFile(SqInfo^.FN + '.sqd', SqInfo^.SqBase, SqInfo^.SqBase.Len) = 0);
CreateMsgBase := (SaveFilePos(SqInfo^.FN + '.sqd', SqInfo^.SqBase, SqInfo^.SqBase.Len, 0) = 0);
SaveFile (SqInfo^.FN + '.sqi', SqInfo^.SqBase, 0);
SaveFile (SqInfo^.FN + '.sql', SqInfo^.SqBase, 0);
SaveFilePos (SqInfo^.FN + '.sqi', SqInfo^.SqBase, 0, 0);
SaveFilePos (SqInfo^.FN + '.sql', SqInfo^.SqBase, 0, 0);
End Else
CreateMsgBase := False;
End;
@ -556,7 +556,7 @@ Var
TmpDate: LongInt;
Begin
TmpDate := (SqInfo^.MsgHdr.DateWritten shr 16) + ((SqInfo^.MsgHdr.DateWritten and $ffff) shl 16);
GetTime := TimeDos2Str(TmpDate, False);
GetTime := TimeDos2Str(TmpDate, 0);
End;
Procedure TMsgBaseSquish.SetDate(Str: String);
@ -1483,7 +1483,7 @@ Function TMsgBaseSquish.NumberOfMsgs: LongInt;
Var
TmpBase: SqBaseType;
Begin
If LoadFile(SqInfo^.FN + '.sqd', TmpBase, SizeOf(TmpBase)) = 0 Then
If LoadFilePos(SqInfo^.FN + '.sqd', TmpBase, SizeOf(TmpBase), 0) = 0 Then
NumberOfMsgs := TmpBase.NumMsg
Else
NumberOfMsgs := 0;
@ -1497,7 +1497,7 @@ End;
Procedure TMsgBaseSquish.SetLastRead (UNum: LongInt; LR: LongInt);
Begin
If ((UNum + 1) * SizeOf(LR)) > GetFileSize(SqInfo^.FN + '.sql') Then
If ((UNum + 1) * SizeOf(LR)) > FileByteSize(SqInfo^.FN + '.sql') Then
ExtendFile (SqInfo^.FN + '.sql', (UNum + 1) * SizeOf(LR));
SaveFilePos (SqInfo^.FN + '.sql', LR, SizeOf(LR), UNum * SizeOf(LR));

View File

@ -269,7 +269,7 @@ Begin
If IoResult <> 0 Then ReWrite (tFile);
WriteLn (tFile, '');
WriteLn (tFile, 'Chat recorded ' + DateDos2Str(CurDateDos, 1) + ' ' + TimeDos2Str(CurDateDos, True) +
WriteLn (tFile, 'Chat recorded ' + DateDos2Str(CurDateDos, 1) + ' ' + TimeDos2Str(CurDateDos, 1) +
' with ' + Session.User.ThisUser.Handle);
WriteLn (tFile, strRep('-', 70));
End;

View File

@ -156,8 +156,8 @@ Var
Exit;
End Else
Res := ThisUser.LastMGroup = strS2I(Data);
'H' : Res := strS2I(Data) < strS2I(Copy(TimeDos2Str(CurDateDos, False), 1, 2));
'M' : Res := strS2I(Data) < strS2I(Copy(TimeDos2Str(CurDateDos, False), 4, 2));
'H' : Res := strS2I(Data) < strS2I(Copy(TimeDos2Str(CurDateDos, 0), 1, 2));
'M' : Res := strS2I(Data) < strS2I(Copy(TimeDos2Str(CurDateDos, 0), 4, 2));
'N' : Res := strS2I(Data) = Session.NodeNum;
'O' : Case Data[1] of
'A' : Res := Chat.Available;
@ -1189,7 +1189,7 @@ Begin
Session.SystemLog ('-');
Session.SystemLog ('Connect from ' + Session.UserIPInfo + ' (' + Session.UserHostInfo + ')');
Session.HistoryHour := strS2I(Copy(TimeDos2Str(CurDateDos, False), 1, 2));
Session.HistoryHour := strS2I(Copy(TimeDos2Str(CurDateDos, 0), 1, 2));
If Config.SystemPW <> '' Then
If Not Session.io.GetPW(Session.GetPrompt(4), Session.GetPrompt(417), Config.SystemPW) Then Begin

View File

@ -87,8 +87,8 @@ Var
Exit;
End Else
Res := User.LastMGroup = strS2I(Data);
'H' : Res := strS2I(Data) < strS2I(Copy(TimeDos2Str(CurDateDos, False), 1, 2));
'M' : Res := strS2I(Data) < strS2I(Copy(TimeDos2Str(CurDateDos, False), 4, 2));
'H' : Res := strS2I(Data) < strS2I(Copy(TimeDos2Str(CurDateDos, 0), 1, 2));
'M' : Res := strS2I(Data) < strS2I(Copy(TimeDos2Str(CurDateDos, 0), 4, 2));
'N' : Res := True;
'O' : Case Data[1] of
'A' : Res := True;

View File

@ -173,7 +173,7 @@ Begin
If ServerStatus.Count > MaxStatusText Then
ServerStatus.Delete(0);
Res := '(' + Copy(DateDos2Str(CurDateDos, 1), 1, 5) + ' ' + TimeDos2Str(CurDateDos, False) + ') ' + Str;
Res := '(' + Copy(DateDos2Str(CurDateDos, 1), 1, 5) + ' ' + TimeDos2Str(CurDateDos, 0) + ') ' + Str;
If Length(Res) > 74 Then Begin
ServerStatus.Add(Copy(Res, 1, 74));

View File

@ -1,6 +1,6 @@
{$I M_OPS.PAS}
Unit MKCRAP;
Unit mkcrap;
{$I M_OPS.PAS}
// this is various functions and procedures used by JAM/Squish...
// these should be removed and/or incorporated into mystic's code base as
@ -8,24 +8,21 @@ Unit mkcrap;
// CHANGE JAM TEMP BUFFER.. ADD SETBUFFERFILE METHOD TO MSGBASE OBJECTS!!!!
interface
Interface
uses
dos;
Uses
DOS;
Function ToUnixDate (FDate: LongInt): LongInt;
Function DTToUnixDate (DT: DateTime): LongInt;
Procedure UnixToDT (SecsPast: LongInt; Var Dt: DateTime);
Function SaveFile(FN: String; Var Rec; FS: Word): Word;
Procedure Str2Az (Str: String; MaxLen: Byte; Var AZStr); {Convert string to asciiz}
Function FormattedDate (DT: DateTime; Mask: String): String;
Function LoadFile(FN: String; Var Rec; FS: Word): Word;
Function LoadFilePos (FN: String; Var Rec; FS: Word; FPos: LongInt): Word;
Function GetFileSize (FN : String) : LongInt;
Function ExtendFile (FN: String; ToSize: LongInt): Word;
Function SaveFilePos (FN: String; Var Rec; FS: Word; FPos: LongInt): Word;
implementation
Implementation
Uses
m_FileIO,
@ -56,10 +53,11 @@ Var
DT: DateTime;
Begin
UnpackTime(Fdate, DT);
ToUnixDate := DTToUnixDate(Dt);
ToUnixDate := DTToUnixDate(DT);
End;
Procedure UnixToDT(SecsPast: LongInt; Var Dt: DateTime);
Procedure UnixToDT (SecsPast: LongInt; Var DT: DateTime);
Var
DateNum : LongInt; //might be able to remove this
Begin
@ -80,15 +78,17 @@ Function SaveFilePos(FN: String; Var Rec; FS: Word; FPos: LongInt): Word;
Var
F : File;
Error : Word;
temp:longint;
Temp : LongInt;
Begin
Error := 0;
assign (f, fn);
Assign (F, FN);
FileMode := fmReadWrite + fmDenyNone;
If FileExist (FN) Then Begin
reset(f,1);
if ioresult <> 0 then error := ioresult;
Reset (F, 1);
If IoResult <> 0 Then Error := IoResult;
End Else Begin
ReWrite (F,1);
Error := IoResult;
@ -108,13 +108,6 @@ Begin
SaveFilePos := Error;
End;
Function SaveFile(FN: String; Var Rec; FS: Word): Word;
Begin
SaveFile := SaveFilePos(FN, Rec, FS, 0);
End;
Procedure Str2Az(Str: String; MaxLen: Byte; Var AZStr); {Convert string to asciiz}
Begin
If Length(Str) >= MaxLen Then Begin
@ -164,7 +157,7 @@ Begin
DStr := Copy(strPadL(strI2S(Dt.Day), 2, '0'), 1, 2);
MStr := Copy(strPadL(strI2S(Dt.Month), 2, '0'), 1, 2);
YStr := Copy(strPadL(strI2S(Dt.Year), 4, '0'), 1, 4);
HourStr := Copy(strPadL(strI2S(Dt.Hour), 2, ' '), 1, 2);
HourStr := Copy(strPadL(strI2S(Dt.Hour), 2, '0'), 1, 2);
MinStr := Copy(strPadL(strI2S(Dt.Min), 2, '0'), 1, 2);
SecStr := Copy(strPadL(strI2S(Dt.Sec), 2, '0'), 1, 2);
MNStr := MonthStr(Dt.Month);
@ -236,22 +229,6 @@ Begin
LoadFilePos := Error;
End;
Function LoadFile(FN: String; Var Rec; FS: Word): Word;
Begin
LoadFile := LoadFilePos(FN, Rec, FS, 0);
End;
Function GetFileSize (FN : String) : LongInt;
Var
SR : SearchRec;
Begin
FindFirst (FN, AnyFile, SR);
If DosError = 0 Then
GetFileSize := SR.Size
Else
GetFileSize := -1;
End;
Function ExtendFile(FN: String; ToSize: LongInt): Word;
{Pads file with nulls to specified size}
Type

View File

@ -377,7 +377,7 @@ Begin
mpxInvalidFile : Result := 'Invalid executable: ' + ErrStr;
mpxVerMismatch : Result := 'Version mismatch: ' + ErrStr + ' / ' + mplVersion;
mpxUnknownOp : Result := 'Unknown Token: ' + ErrStr;
mpxMultiInit : Result := 'Unable to initialize variable';
mpxBadInit : Result := 'Unable to initialize variable';
mpxDivisionByZero : Result := 'Division by zero';
mpxMathematical : Result := 'Parsing error';
End;
@ -1110,7 +1110,7 @@ Begin
NextWord;
If FindVariable(W) > 0 Then Begin
Error (mpxMultiInit, '');
Error (mpxBadInit, '');
Exit;
End;
@ -1627,7 +1627,7 @@ Begin
Store (TempBool, 1);
End;
56 : Begin
TempStr := TimeDos2Str(Param[1].L, Param[2].O);
TempStr := TimeDos2Str(Param[1].L, Ord(Param[2].O));
Store (TempStr, 256);
End;
57 : Begin
@ -1953,7 +1953,7 @@ Begin
NextWord; { procedure var id }
If FindVariable(W) > 0 Then Begin /// ????????????????????
Error (mpxMultiInit, '');
Error (mpxBadInit, '');
Exit;
End;
@ -2430,7 +2430,7 @@ Begin
Result := Script.Execute(Str);
If Script.ErrNum > 0 Then Begin
ErrStr := 'MPX ERROR: ' + Script.GetErrorMsg;
ErrStr := strStripLow('MPX ERROR: ' + Script.GetErrorMsg);
Session.SystemLog(ErrStr + '(' + Str + ')');
Session.io.OutFullLn ('|CR|12' + ErrStr);

View File

@ -108,7 +108,7 @@ Const
mpxInvalidFile = 2;
mpxVerMismatch = 3;
mpxUnknownOp = 4;
mpxMultiInit = 5;
mpxBadInit = 5;
mpxDivisionByZero = 6;
mpxMathematical = 7;
{$ELSE}

View File

@ -17,6 +17,8 @@
;
; Current abilities (enabled/disabled in the General header below):
;
; - Export Binkley-style FLO echomail/netmail
; - Import Binkley-style FLO echomail/netmail
; - Import Message Bases (by datafile analysis)
; - Import FIDONET.NA into Message bases
; - Import FILEBONE.NA into File bases
@ -51,6 +53,7 @@
; Level 1 = basic
; Level 2 = verbose
; Level 3 = debug
loglevel=2
@ -66,7 +69,8 @@
PurgeMessageBases = false
PostTextFiles = false
PackMessageBases = false
ExportEchoMail = true
ImportEchoMail = false
ExportEchoMail = false
; ==========================================================================
; ==========================================================================
@ -367,4 +371,6 @@
new_scan = 1
qwk_scan = 1
[ImportEchoMail]
[ExportEchoMail]

View File

@ -46,6 +46,7 @@ Uses
mUtil_MsgPack,
mUtil_MsgPost,
mUtil_EchoExport,
mUtil_EchoImport,
bbs_Common;
{$I MUTIL_ANSI.PAS}
@ -59,7 +60,7 @@ Begin
Log (2, '+', ' EXEC ' + pName);
End Else
Log (2, '+', ' SKIP ' + pName);
Log (3, '+', ' SKIP ' + pName);
End;
Procedure ApplicationShutdown;
@ -86,6 +87,7 @@ Procedure ApplicationStartup;
Var
FN : String;
CF : File of RecConfig;
F : File;
Begin
ExitProc := @ApplicationShutdown;
Console := TOutput.Create(strUpper(ParamStr(2)) <> '-NOSCREEN');
@ -155,6 +157,12 @@ Begin
BarOne := TStatusBar.Create(3);
BarAll := TStatusBar.Create(6);
If LogFile <> '' Then Begin
Assign (F, LogFile);
If Not ioReset(F, 1, fmRWDN) Then ReWrite(F);
Close (F);
End;
End;
Var
@ -165,6 +173,7 @@ Var
DoTopLists : Boolean;
DoAllFiles : Boolean;
DoEchoExport : Boolean;
DoEchoImport : Boolean;
DoMsgPurge : Boolean;
DoMsgPack : Boolean;
DoMsgPost : Boolean;
@ -184,6 +193,7 @@ Begin
DoFilesBBS := CheckProcess(Header_FILESBBS);
DoAllFiles := CheckProcess(Header_ALLFILES);
DoEchoExport := CheckProcess(Header_ECHOEXPORT);
DoEchoImport := CheckProcess(Header_ECHOIMPORT);
DoMsgPurge := CheckProcess(Header_MSGPURGE);
DoMsgPack := CheckProcess(Header_MSGPACK);
DoMsgPost := CheckProcess(Header_MSGPOST);
@ -201,14 +211,15 @@ Begin
// We're good lets execute this stuff!
If DoImportNA Then uImportNA;
If DoImportMB Then uImportMessageBases;
If DoFileBone Then uImportFileBone;
If DoFilesBBS Then uImportFilesBBS;
If DoMassUpload Then uMassUpload;
If DoTopLists Then uTopLists;
If DoAllFiles Then uAllFilesList;
If DoEchoExport Then uEchoExport;
If DoEchoImport Then uEchoImport;
If DoMsgPurge Then uPurgeMessageBases;
If DoMsgPack Then uPackMessageBases;
If DoMsgPost Then uPostMessages;
If DoImportMB Then uImportMessageBases;
End.

View File

@ -31,6 +31,7 @@ Const
Header_IMPORTNA = 'Import_FIDONET.NA';
Header_IMPORTMB = 'Import_MessageBase';
Header_ECHOEXPORT = 'ExportEchoMail';
Header_ECHOIMPORT = 'ImportEchoMail';
Header_FILEBONE = 'Import_FILEBONE.NA';
Header_FILESBBS = 'Import_FILES.BBS';
Header_UPLOAD = 'MassUpload';
@ -52,6 +53,8 @@ Procedure AddFileBase (Var FBase: RecFileBase);
Function ShellDOS (ExecPath: String; Command: String) : LongInt;
Procedure ExecuteArchive (FName: String; Temp: String; Mask: String; Mode: Byte);
Function GetMBaseByIndex (Num: LongInt; Var TempBase: RecMessageBase) : Boolean;
Function GetMBaseByTag (Tag: String; Var TempBase: RecMessageBase) : Boolean;
Function GetMBaseByNetZone (Zone: Word; Var TempBase: RecMessageBase) : Boolean;
Function MessageBaseOpen (Var Msg: PMsgBaseABS; Var Area: RecMessageBase) : Boolean;
Function SaveMessage (mArea: RecMessageBase; mFrom, mTo, mSubj: String; mAddr: RecEchoMailAddr; mText: RecMessageText; mLines: Integer) : Boolean;
Function GetFTNPKTName : String;
@ -75,22 +78,15 @@ Procedure Log (Level: Byte; Code: Char; Str: String);
Var
T : Text;
Begin
If LogFile = '' Then Exit;
If LogLevel < Level Then Exit;
FileMode := 66;
If (LogLevel < Level) or (LogFile = '') Then Exit;
Assign (T, LogFile);
Append (T);
If IoResult <> 0 Then
If IoResult = 5 Then Exit Else ReWrite(T);
If Str = '' Then
WriteLn (T, '')
Else
WriteLn (T, Code + ' ' + DateDos2Str(CurDateDos, 1) + ' ' + TimeDos2Str(CurDateDos, False) + ' ' + Str);
WriteLn (T, Code + ' ' + DateDos2Str(CurDateDos, 1) + ' ' + TimeDos2Str(CurDateDos, 2) + ' ' + Str);
Close (T);
End;
@ -334,6 +330,50 @@ Begin
Close (F);
End;
Function GetMBaseByTag (Tag: String; Var TempBase: RecMessageBase) : Boolean;
Var
F : File;
Begin
Result := False;
Assign (F, bbsConfig.DataPath + 'mbases.dat');
If Not ioReset(F, SizeOf(RecMessageBase), fmRWDN) Then Exit;
While Not Eof(F) Do Begin
ioRead(F, TempBase);
If Tag = strUpper(TempBase.EchoTag) Then Begin
Result := True;
Break;
End;
End;
Close (F);
End;
Function GetMBaseByNetZone (Zone: Word; Var TempBase: RecMessageBase) : Boolean;
Var
F : File;
Begin
Result := False;
Assign (F, bbsConfig.DataPath + 'mbases.dat');
If Not ioReset(F, SizeOf(RecMessageBase), fmRWDN) Then Exit;
While Not Eof(F) Do Begin
ioRead(F, TempBase);
If (Zone = bbsConfig.NetAddress[TempBase.NetAddr].Zone) and (TempBase.NetType = 3) Then Begin
Result := True;
Break;
End;
End;
Close (F);
End;
Function MessageBaseOpen (Var Msg: PMsgBaseABS; Var Area: RecMessageBase) : Boolean;
Begin
Result := False;
@ -397,7 +437,7 @@ Begin
Msg^.SetPriv (mArea.Flags And MBPrivate <> 0);
Msg^.SetDate (DateDos2Str(CurDateDos, 1));
Msg^.SetTime (TimeDos2Str(CurDateDos, False));
Msg^.SetTime (TimeDos2Str(CurDateDos, 0));
Msg^.SetFrom (mFrom);
Msg^.SetTo (mTo);
Msg^.SetSubj (mSubj);

View File

@ -16,11 +16,44 @@ Uses
m_DateTime,
mUtil_Common,
mUtil_Status,
mUtil_EchoCore,
bbs_Common,
bbs_MsgBase_ABS,
bbs_MsgBase_JAM,
bbs_MsgBase_Squish;
Procedure AddToFLOQueue (FloName, PacketFN: String);
Var
T : Text;
Str : String;
Begin
FileMode := 66;
{$I-}
Assign (T, FloName);
Reset (T);
If IoResult <> 0 Then
ReWrite(T);
While Not Eof(T) Do Begin
ReadLn (T, Str);
If strUpper(Str) = '^' + strUpper(PacketFN) Then Begin
Close (T);
Exit;
End;
End;
log(3, '+', 'flo close and append');
Close (T);
Append (T);
WriteLn (T, '^' + PacketFN);
Close (T);
End;
Procedure BundleMessages;
Var
F : File;
@ -34,8 +67,6 @@ Var
FLOName : String;
OrigAddr : RecEchoMailAddr;
Begin
//update/create .FLO or whatever... need to research
FindFirst (TempPath + '*', AnyFile, DirInfo);
While DosError = 0 Do Begin
@ -56,7 +87,7 @@ Begin
OrigAddr.Net := PH.OrigNet;
OrigAddr.Node := PH.OrigNode;
// TODO: if crash etc change char F in FLO extension
// if echonode.echomail.crash etc change char F in FLO extension
FLOName := bbsConfig.OutboundPath + GetFTNFlowName(EchoNode.Address) + '.flo';
BundleName := bbsConfig.OutboundPath + GetFTNArchiveName(OrigAddr, EchoNode.Address) + '.' + DayString[DayOfWeek(CurDateDos)];
@ -67,15 +98,7 @@ Begin
FileErase (TempPath + PKTName);
{$I-}
Assign (T, FLOName);
Append (T);
If IoResult <> 0 Then ReWrite(T);
WriteLn (T, '^' + BundleName);
Close (T);
AddToFLOQueue (FLOName, BundleName);
End;
FindNext (DirInfo);
@ -86,7 +109,8 @@ End;
Procedure uEchoExport;
Var
TotalMessages : LongInt;
TotalEcho : LongInt;
TotalNet : LongInt;
MBaseFile : File of RecMessageBase;
MBase : RecMessageBase;
ExportFile : File of RecEchoMailExport;
@ -117,19 +141,37 @@ Var
End;
Var
TempStr : String;
TempStr1 : String;
TempStr2 : String;
Begin
Inc (TotalMessages);
If (EchoNode.Address.Zone = MsgBase^.GetOrigAddr.Zone) and
(EchoNode.Address.Net = MsgBase^.GetOrigAddr.Net) and
(EchoNode.Address.Node = MsgBase^.GetOrigAddr.Node) Then Exit;
Log (2, '+', ' Export Msg #' + strI2S(MsgBase^.GetMsgNum) + ' to ' + strAddr2Str(EchoNode.Address));
GetDate (DT.Year, DT.Month, DT.Day, Temp);
GetTime (DT.Hour, DT.Min, DT.Sec, Temp);
If MBase.NetType = 3 Then Begin
TempStr1 := bbsConfig.OutboundPath + GetFTNFlowName(EchoNode.Address) + '.out';
TempStr2 := bbsConfig.OutboundPath + GetFTNFlowName(EchoNode.Address) + '.flo';
// change extensions based on crash etc from echonode
Assign (F, TempStr1);
AddToFloQueue (TempStr2, TempStr1);
Inc (TotalNet);
End Else Begin
Assign (F, TempPath + PKTBase + '.' + strI2S(EchoNode.Index));
Inc (TotalEcho);
End;
If ioReset(F, 1, fmRWDN) Then Begin
ioSeek (F, FileSize(F));
ioSeek (F, FileSize(F) - 2); // we want to overwrite packet term chars
End Else Begin
ioReWrite (F, 1, fmRWDN);
@ -156,14 +198,14 @@ Var
FillChar (MH, SizeOf(MH), 0);
MH.MsgType := $0200;
MH.MsgType := 2;
MH.OrigNode := bbsConfig.NetAddress[MBase.NetAddr].Node;
MH.DestNode := EchoNode.Address.Node;
MH.OrigNet := bbsConfig.NetAddress[MBase.NetAddr].Net;
MH.DestNet := EchoNode.Address.Net;
TempStr := FormattedDate(DT, 'DD NNN YY HH:MM:SS');
Move (TempStr[1], MH.DateTime[0], 19);
TempStr1 := FormattedDate(DT, 'DD NNN YY HH:MM:SS') + #0;
Move (TempStr1[1], MH.DateTime[0], 20);
If MsgBase^.IsLocal Then MH.Attribute := MH.Attribute OR pktLocal;
If MsgBase^.IsCrash Then MH.Attribute := MH.Attribute OR pktCrash;
@ -176,6 +218,8 @@ Var
WriteStr (MsgBase^.GetTo, #0);
WriteStr (MsgBase^.GetFrom, #0);
WriteStr (MsgBase^.GetSubj, #0);
If MBase.NetType <> 3 Then
WriteStr ('AREA:' + MBase.EchoTag, #13);
WriteStr (#1 + 'INTL ' + strAddr2Str(EchoNode.Address) + ' ' + strAddr2Str(bbsConfig.NetAddress[MBase.NetAddr]), #13);
@ -186,16 +230,26 @@ Var
While Not MsgBase^.EOM Do
WriteStr (MsgBase^.GetString(79), #13);
WriteStr('', #0);
TempStr1 := 'SEEN-BY: ' + strI2S(bbsConfig.NetAddress[MBase.NetAddr].Net) + '/' + strI2S(bbsConfig.NetAddress[MBase.NetAddr].Node) + ' ';
If bbsConfig.NetAddress[MBase.NetAddr].Net <> EchoNode.Address.Net Then
TempStr1 := TempStr1 + strI2S(EchoNode.Address.Net) + '/';
TempStr1 := TempStr1 + strI2S(EchoNode.Address.Node);
WriteStr (TempStr1, #13);
WriteStr (#1 + 'PATH: ' + strI2S(bbsConfig.NetAddress[MBase.NetAddr].Net) + '/' + strI2S(bbsConfig.NetAddress[MBase.NetAddr].Node), #13);
WriteStr (#0#0, #0);
Close (F);
End;
Begin
TotalMessages := 0;
TotalEcho := 0;
TotalNet := 0;
PKTBase := GetFTNPKTName;
ProcessName ('Exporting Echomail', True);
ProcessName ('Exporting EchoMail', True);
ProcessResult (rWORKING, False);
DirClean (TempPath, '');
@ -232,7 +286,7 @@ Begin
While MsgBase^.SeekFound Do Begin
MsgBase^.MsgStartUp;
If MsgBase^.IsLocal And Not MsgBase^.IsSent Then Begin
If {MsgBase^.IsLocal And } Not MsgBase^.IsSent Then Begin
Assign (ExportFile, MBase.Path + MBase.FileName + '.lnk');
If ioReset(ExportFile, SizeOf(RecEchoMailExport), fmRWDN) Then Begin
@ -264,7 +318,7 @@ Begin
BundleMessages;
ProcessStatus ('Exported |15' + strI2S(TotalMessages) + ' |07msgs', True);
ProcessStatus ('Total |15' + strI2S(TotalEcho) + ' |07echo |15' + strI2S(TotalNet) + ' |07net', True);
ProcessResult (rDONE, True);
End;

View File

@ -194,6 +194,7 @@ Var
If (Link.OldNum <> NewData^.GetRefer) or (Link.NewNum <> NewData^.GetSeeAlso) Then Begin
NewData^.SetRefer (Link.OldNum);
NewData^.SetSeeAlso (Link.NewNum);
NewData^.ReWriteHdr;
End;

View File

@ -37,6 +37,8 @@ Begin
BarOne.Reset;
Console.WriteXY (71, 10, 8, strPadL('(' + strI2S(ProcessPos) + '/' + strI2S(ProcessTotal) + ')', 7, ' '));
Log (1, '+', 'Process: ' + Str);
End;
End;

View File

@ -78,56 +78,6 @@ Type
AccessFlagType = Set of 1..26;
Const
pktPrivate = $0001;
pktCrash = $0002;
pktReceived = $0004;
pktSent = $0008;
pktFileAttach = $0010;
pktInTransit = $0020;
pktOrphan = $0040;
pktKillSent = $0080;
pktLocal = $0100;
pktHold = $0200;
pktUnused = $0400;
pktFileReq = $0800;
pktReturnReq = $1000;
pktIsReceipt = $2000;
pktAuditReq = $4000;
pktFileUpdate = $8000;
Type
RecPKTMessageHdr = Record
MsgType,
OrigNode : System.Word;
DestNode : System.Word;
OrigNet : System.Word;
DestNet : System.Word;
Attribute : System.Word;
Cost : System.Word;
DateTime : String[19];
End;
RecPKTHeader = Record
OrigNode : System.Word;
DestNode : System.Word;
Year : System.Word;
Month : System.Word;
Day : System.Word;
Hour : System.Word;
Minute : System.Word;
Second : System.Word;
Baud : System.Word;
PKTType : System.Word;
OrigNet : System.Word;
DestNet : System.Word;
ProdCode : System.Word; // Apply to FTSC for code?
Password : Array[1..8] of Char;
OrigZone : System.Word;
DestZone : System.Word;
Filler : Array[1..20] of Char;
End;
RecEchoMailAddr = Record
Zone,
Net,

View File

@ -8,6 +8,7 @@ design elements/issues.
BUGS AND POSSIBLE ISSUES
========================
! GE option 32 (change def protocol) might be broken
! LBP menus arent scrolling correctly in Linux
! MUTIL FILESBBS import is not skipping FILES.BBS?
! Make sure MIS in Linux works with DOSEMU
@ -28,6 +29,9 @@ BUGS AND POSSIBLE ISSUES
FUTURE / IDEAS / WORK IN PROGRESS / NOTES
=========================================
- Amiga .readme and .TIC processing (similar)
- New files list to MUTIL based X number of days
- All/new file list template files like TOP XX
- MUTIL create FILES.BBS in the file base directory
- MUTILs new DIR import of msg bases could have optional config to reference
a series of .NA files to get the name/description of bases.

View File

@ -2898,3 +2898,17 @@
<ALPHA 29 RELEASED>
+ Added new INBOUND and OUTBOUND echomail directories into the System
Configuration.
+ Added new Echomail node editor. This allows you to configure nodes which
you are going to exchange echomail from, either an uplink or downlink.
+ Message bases now have a echomail TAG option which is intended to include
the bases's echomail tag from the .NA files.
+ Message bases now have an "Export To" option where up to 2 million
echomail nodes can be linked to each message base.
+ The echomail node editor now has an editor where message bases can be
list, linked, and unlinked from each configured node.