From d3313c38f27d1b1687443d80b00d847e4392a300 Mon Sep 17 00:00:00 2001 From: g00r00 Date: Thu, 3 Oct 2013 21:37:13 -0400 Subject: [PATCH] New MPL vars recompile MPL (mplc -all) --- mystic/bbs_database.pas | 30 +++++++++++++++++++++++++++++- mystic/mpl_common.pas | 2 ++ mystic/mpl_execute.pas | 2 ++ mystic/mpl_types.pas | 2 +- mystic/mutil_echoexport.pas | 36 +++++++++++++++++------------------- mystic/records.pas | 4 +++- mystic/todo.pas | 2 ++ 7 files changed, 56 insertions(+), 22 deletions(-) diff --git a/mystic/bbs_database.pas b/mystic/bbs_database.pas index 0a1ed6f..6d61154 100644 --- a/mystic/bbs_database.pas +++ b/mystic/bbs_database.pas @@ -66,8 +66,9 @@ Function IsThisUser (U: RecUser; Str: String) : Boolean; // ECHOMAIL +Function GetFTNBundleExt (IncOnly: Boolean; Str: String) : String; Function GetNodeByAddress (Addr: String; Var TempNode: RecEchoMailNode) : Boolean; -Function GetFTNBundleExt (IncOnly: Boolean; Str: String) : String; +Function SaveEchoMailNode (Var TempNode: RecEchoMailNode) : Boolean; Implementation @@ -694,6 +695,33 @@ Begin Until False; End; +Function SaveEchoMailNode (Var TempNode: RecEchoMailNode) : Boolean; +Var + F : File; + TN : RecEchoMailNode; +Begin + Result := False; + + Assign (F, bbsCfg.DataPath + 'echonode.dat'); + + If Not ioReset(F, SizeOf(RecEchoMailNode), fmRWDN) Then Exit; + + While Not Eof(F) Do Begin + ioRead(F, TN); + + If TempNode.Index = TN.Index Then Begin + Seek (F, FilePos(F) - 1); + ioWrite (F, TempNode); + + Result := True; + + Break; + End; + End; + + Close (F); +End; + Initialization bbsCfgStatus := GetBaseConfiguration(True, bbsCfg); diff --git a/mystic/mpl_common.pas b/mystic/mpl_common.pas index 8651b6a..aca3ad6 100644 --- a/mystic/mpl_common.pas +++ b/mystic/mpl_common.pas @@ -418,6 +418,8 @@ Begin AddStr ({$IFDEF MPLPARSER} 'mbasepacs', {$ENDIF} iString, 30); AddStr ({$IFDEF MPLPARSER} 'mbasesacs', {$ENDIF} iString, 30); AddVar ({$IFDEF MPLPARSER} 'mbasenetaddr', {$ENDIF} iByte); + AddVar ({$IFDEF MPLPARSER} 'mbasenettype', {$ENDIF} iByte); + AddVar ({$IFDEF MPLPARSER} 'mbaseflags', {$ENDIF} iLongInt); End; 4 : Begin {$IFNDEF MPLPARSER} TInterpEngine(S).IdxVarMGroup := X + 1; {$ENDIF} diff --git a/mystic/mpl_execute.pas b/mystic/mpl_execute.pas index 6e51057..ab05d60 100644 --- a/mystic/mpl_execute.pas +++ b/mystic/mpl_execute.pas @@ -297,6 +297,8 @@ Begin Move (M.PostACS, VarData[IdxVarMBase + 4 ]^.Data^, SizeOf(M.PostACS)); Move (M.SysopACS, VarData[IdxVarMBase + 5 ]^.Data^, SizeOf(M.SysopACS)); Move (M.NetAddr, VarData[IdxVarMBase + 6 ]^.Data^, SizeOf(M.NetAddr)); + Move (M.NetType, VarData[IdxVarMBase + 7 ]^.Data^, SizeOf(M.NetType)); + Move (M.Flags, VarData[IdxVarMBase + 8 ]^.Data^, SizeOf(M.Flags)); End; Function TInterpEngine.GetMBaseStats (Num: LongInt; SkipFrom, SkipRead: Boolean; Var Total, New, Yours: LongInt) : Boolean; diff --git a/mystic/mpl_types.pas b/mystic/mpl_types.pas index 7da8b1a..d7efccd 100644 --- a/mystic/mpl_types.pas +++ b/mystic/mpl_types.pas @@ -77,7 +77,7 @@ Type ); Const - mplVer = '11Y'; + mplVer = '11S'; mplVersion = '[MPX ' + mplVer +']' + #26; mplVerLength = 10; mplExtSource = '.mps'; diff --git a/mystic/mutil_echoexport.pas b/mystic/mutil_echoexport.pas index 3bfb13d..07f6549 100644 --- a/mystic/mutil_echoexport.pas +++ b/mystic/mutil_echoexport.pas @@ -66,6 +66,7 @@ Var Temp : String; FLOName : String; OrigAddr : RecEchoMailAddr; + CheckInc : Boolean; Begin FindFirst (TempPath + '*', AnyFile, DirInfo); @@ -88,32 +89,29 @@ Begin OrigAddr.Node := PH.OrigNode; BundlePath := GetFTNOutPath(EchoNode); + CheckInc := False; DirCreate (BundlePath); + If Not (EchoNode.LPKTPtr in [48..57, 97..122]) Then + EchoNode.LPKTPtr := 48; + + If EchoNode.LPKTDay <> DayOfWeek(CurDateDos) Then Begin + EchoNode.LPKTDay := DayOfWeek(CurDateDos); + EchoNode.LPKTPtr := 48; + End Else + CheckInc := True; + FLOName := BundlePath + GetFTNFlowName(EchoNode.Address); - BundleName := BundlePath + GetFTNArchiveName(OrigAddr, EchoNode.Address) + '.' + strLower(DayString[DayOfWeek(CurDateDos)]); + BundleName := BundlePath + GetFTNArchiveName(OrigAddr, EchoNode.Address) + '.' + Copy(strLower(DayString[DayOfWeek(CurDateDos)]), 1, 2) + Char(EchoNode.LPKTPtr); - BundleName[Length(BundleName)] := '0'; + If CheckInc And Not FileExist(BundleName) Then Begin + BundleName := GetFTNBundleExt(True, BundleName); -(* - BundleName := BundlePath + GetFTNBundleExt(False, GetFTNArchiveName(OrigAddr, EchoNode.Address) + '.' + Copy(strLower(DayString[DayOfWeek(CurDateDos)]), 1, 2) + '0'); + EchoNode.LPKTPtr := Byte(BundleName[Length(BundleName)]); + End; - BundleName := BundlePath + GetFTNArchiveName(OrigAddr, EchoNode.Address) + '.' + Copy(strLower(DayString[DayOfWeek(CurDateDos)]), 1, 2) + '0'; - Temp := BundleName; - - Repeat - BundleSize := FileByteSize(BundleName); - - If (BundleSize > 0) and ((BundleSize DIV 1024) >= 250) Then Begin - BundleName := GetFTNBundleExt(True, BundleName); - - If BundleName = Temp Then - Break; - End Else - Break; - Until False; -*) + SaveEchoMailNode(EchoNode); Case EchoNode.MailType of 0 : FLOName := FLOName + '.flo'; diff --git a/mystic/records.pas b/mystic/records.pas index f0d941d..c295e7c 100644 --- a/mystic/records.pas +++ b/mystic/records.pas @@ -132,7 +132,9 @@ Type AreaFixPass : String[20]; DirInDir : String[60]; DirOutDir : String[60]; - Res : Array[1..219] of Byte; + LPKTDay : Byte; + LPKTPtr : Byte; + Res : Array[1..217] of Byte; End; RecQwkNetwork = Record diff --git a/mystic/todo.pas b/mystic/todo.pas index 28673d7..a30d2f2 100644 --- a/mystic/todo.pas +++ b/mystic/todo.pas @@ -60,6 +60,8 @@ BUGS AND POSSIBLE ISSUES FUTURE / IDEAS / WORK IN PROGRESS / NOTES ========================================= +- Need to add MCI code for Default Protocol + - Make function get protocol by Key - Make point mail bundles based off of their uplink (your address)? - MIS escape confirmation - Prompts for CONFIG editors