New MPL functions, Mailcheck /NOLIST
This commit is contained in:
parent
6144608de7
commit
4c66c491d9
|
@ -41,6 +41,7 @@ Type
|
|||
Function GetBaseCompressed (Num: LongInt; Var TempBase: RecMessageBase) : Boolean;
|
||||
Function GetBaseByIndex (Num: LongInt; Var TempBase: RecMessageBase) : Boolean;
|
||||
Procedure GetMessageStats (List, ShowPrompt, ShowYou: Boolean; Var ListPtr: LongInt; Var TempBase: RecMessageBase; NoFrom, NoRead: Boolean; Var Total, New, Yours: LongInt);
|
||||
Procedure GetMailStats (Var Total, UnRead: LongInt);
|
||||
Function GetMatchedAddress (Orig, Dest: RecEchoMailAddr) : RecEchoMailAddr;
|
||||
Function GetTotalBases (Compressed: Boolean) : LongInt;
|
||||
Function GetTotalMessages (Var TempBase: RecMessageBase) : LongInt;
|
||||
|
@ -459,6 +460,12 @@ Begin
|
|||
Continue;
|
||||
End;
|
||||
|
||||
If (TempBase.Flags AND MBPrivate <> 0) And Not Session.User.IsThisUser(TempMsg^.GetTo) Then Begin
|
||||
TempMsg^.SeekNext;
|
||||
|
||||
Continue;
|
||||
End;
|
||||
|
||||
If NoRead And Session.User.IsThisUser(TempMsg^.GetTo) And TempMsg^.IsRcvd Then Begin
|
||||
TempMsg^.SeekNext;
|
||||
|
||||
|
@ -509,6 +516,40 @@ Begin
|
|||
End;
|
||||
End;
|
||||
|
||||
Procedure TMsgBase.GetMailStats (Var Total, UnRead: LongInt);
|
||||
Var
|
||||
MsgBase : PMsgBaseABS;
|
||||
TempBase : RecMessageBase;
|
||||
Begin
|
||||
Total := 0;
|
||||
UnRead := 0;
|
||||
FileMode := 66;
|
||||
|
||||
Reset (MBaseFile);
|
||||
Read (MBaseFile, TempBase);
|
||||
Close (MBaseFile);
|
||||
|
||||
If OpenCreateBase (MsgBase, TempBase) Then Begin
|
||||
MsgBase^.SeekFirst (1);
|
||||
|
||||
While MsgBase^.SeekFound Do Begin
|
||||
MsgBase^.MsgStartUp;
|
||||
|
||||
If Session.User.IsThisUser(MsgBase^.GetTo) Then Begin
|
||||
Inc (Total);
|
||||
|
||||
If Not MsgBase^.IsRcvd Then Inc (UnRead);
|
||||
End;
|
||||
|
||||
MsgBase^.SeekNext;
|
||||
End;
|
||||
|
||||
MsgBase^.CloseMsgBase;
|
||||
|
||||
Dispose (MsgBase, Done);
|
||||
End;
|
||||
End;
|
||||
|
||||
Procedure TMsgBase.SetMessageScan;
|
||||
Var
|
||||
Count : Integer;
|
||||
|
@ -3068,6 +3109,16 @@ Begin
|
|||
Read (MBaseFile, MBase);
|
||||
Close (MBaseFile);
|
||||
|
||||
If Pos('/NOLIST', strUpper(CmdData)) > 0 Then Begin
|
||||
ReadMessages('E', '', '');
|
||||
|
||||
Session.io.OutFullLn (Session.GetPrompt(118));
|
||||
|
||||
MBase := TempBase;
|
||||
|
||||
Exit;
|
||||
End;
|
||||
|
||||
If OpenCreateBase (MsgBase, MBase) Then Begin
|
||||
MsgBase^.SeekFirst (1);
|
||||
|
||||
|
@ -3112,6 +3163,7 @@ Begin
|
|||
Session.io.OutFullLn (Session.GetPrompt(118));
|
||||
End;
|
||||
End;
|
||||
|
||||
MBase := TempBase;
|
||||
End;
|
||||
|
||||
|
|
|
@ -298,6 +298,8 @@ Begin
|
|||
AddProc ({$IFDEF MPLPARSER} 'msgeditget', {$ENDIF} 'i', iString); // 545
|
||||
AddProc ({$IFDEF MPLPARSER} 'msgeditset', {$ENDIF} 'is', iNone); // 546
|
||||
AddProc ({$IFDEF MPLPARSER} 'onekeyrange', {$ENDIF} 'sll', iChar); // 547
|
||||
AddProc ({$IFDEF MPLPARSER} 'getmbasetotal', {$ENDIF} 'o', iLongInt); // 548
|
||||
AddProc ({$IFDEF MPLPARSER} 'getmailstats', {$ENDIF} 'LL', iNone); // 549
|
||||
|
||||
{ END OF PROCEDURE DEFINITIONS }
|
||||
|
||||
|
|
|
@ -1905,7 +1905,8 @@ Begin
|
|||
Store (TempBool, 1);
|
||||
End;
|
||||
541 : Begin
|
||||
TempBool := GetMBaseStats(Param[1].L, Param[2].O, Param[3].O, LongInt(Pointer(Param[3].vData)^), LongInt(Pointer(Param[4].vData)^), LongInt(Pointer(Param[5].vData)^));
|
||||
TempBool := GetMBaseStats(Param[1].L, Param[2].O, Param[3].O, LongInt(Pointer(Param[4].vData)^), LongInt(Pointer(Param[5].vData)^), LongInt(Pointer(Param[6].vData)^));
|
||||
|
||||
Store (TempBool, 1);
|
||||
End;
|
||||
542 : WriteXY (Param[1].B, Param[2].B, Param[3].B, Param[4].S);
|
||||
|
@ -1934,6 +1935,12 @@ Begin
|
|||
|
||||
Store (TempStr[1], 1);
|
||||
End;
|
||||
548 : Begin
|
||||
TempLong := Session.Msgs.GetTotalBases(Param[1].O);
|
||||
|
||||
Store (TempLong, 4);
|
||||
End;
|
||||
549 : Session.Msgs.GetMailStats (LongInt(Pointer(Param[1].vData)^), LongInt(Pointer(Param[2].vData)^));
|
||||
End;
|
||||
End;
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ Type
|
|||
);
|
||||
|
||||
Const
|
||||
mplVer = '11G';
|
||||
mplVer = '11Z';
|
||||
mplVersion = '[MPX ' + mplVer +']' + #26;
|
||||
mplVerLength = 10;
|
||||
mplExtSource = '.mps';
|
||||
|
|
Loading…
Reference in New Issue