Added message forwarding while reading

This commit is contained in:
mysticbbs 2012-07-15 16:14:53 -04:00
parent 05f2be1961
commit 85b9af2562
1 changed files with 24 additions and 9 deletions

View File

@ -1104,7 +1104,7 @@ Var
HelpFile := 'emailhlp'; HelpFile := 'emailhlp';
End Else End Else
If Session.User.Access(MBase.SysopACS) or Session.User.IsThisUser(MsgBase^.GetFrom) Then Begin If Session.User.Access(MBase.SysopACS) or Session.User.IsThisUser(MsgBase^.GetFrom) Then Begin
ValidKeys := 'ADEGHIJLMNPQRTX[]?'#13; ValidKeys := 'ADEFGHIJLMNPQRTX[]?'#13;
HelpFile := 'readshlp'; HelpFile := 'readshlp';
End Else Begin End Else Begin
ValidKeys := 'AGHIJLNPQRTX[]?'#13; ValidKeys := 'AGHIJLNPQRTX[]?'#13;
@ -1112,7 +1112,7 @@ Var
End; End;
End; End;
Function Move_Message : Boolean; Function MoveMessage (IsCopy: Boolean) : Boolean;
Var Var
MsgNew : PMsgBaseABS; MsgNew : PMsgBaseABS;
Str : String; Str : String;
@ -1124,7 +1124,10 @@ Var
Session.User.IgnoreGroup := True; Session.User.IgnoreGroup := True;
Repeat Repeat
Session.io.OutFull (Session.GetPrompt(282)); If IsCopy Then
Session.io.OutFull (Session.GetPrompt(492))
Else
Session.io.OutFull (Session.GetPrompt(282));
Str := Session.io.GetInput(4, 4, 12, ''); Str := Session.io.GetInput(4, 4, 12, '');
@ -1181,13 +1184,17 @@ Var
MsgNew^.CloseMsgBase; MsgNew^.CloseMsgBase;
Session.SystemLog('Moved msg to ' + strStripMCI(TempBase.Name));
Dispose (MsgNew, Done); Dispose (MsgNew, Done);
MsgBase^.DeleteMsg; If IsCopy Then
Session.SystemLog('Forward msg to ' + strStripMCI(TempBase.Name))
Else Begin
Session.SystemLog('Moved msg to ' + strStripMCI(TempBase.Name));
MsgBase^.DeleteMsg;
End;
Result := True;
Move_Message := True;
Break; Break;
End Else Begin End Else Begin
Close (MBaseFile); Close (MBaseFile);
@ -1543,6 +1550,10 @@ Var
EditMessage; EditMessage;
Break; Break;
End; End;
'F' : Begin
MoveMessage(True);
Break;
End;
'G' : Begin 'G' : Begin
Ansi_View_Message := True; Ansi_View_Message := True;
Exit; Exit;
@ -1574,7 +1585,7 @@ Var
End; End;
'L' : Exit; 'L' : Exit;
'M' : Begin 'M' : Begin
If Move_Message Then If MoveMessage(False) Then
If Not SeekNextMsg(False, False) Then Begin If Not SeekNextMsg(False, False) Then Begin
Ansi_View_Message := True; Ansi_View_Message := True;
Exit; Exit;
@ -2084,6 +2095,10 @@ Var
EditMessage; EditMessage;
Break; Break;
End; End;
'F' : Begin
MoveMessage(True);
Break;
End;
'G' : Exit; 'G' : Exit;
'H' : LastRead := MsgBase^.GetMsgNum - 1; 'H' : LastRead := MsgBase^.GetMsgNum - 1;
'I' : Begin 'I' : Begin
@ -2133,7 +2148,7 @@ Var
MsgBase^.MsgStartup; MsgBase^.MsgStartup;
End; End;
'M' : Begin 'M' : Begin
If Move_Message Then If MoveMessage(False) Then
If Not SeekNextMsg(False, False) Then Exit; If Not SeekNextMsg(False, False) Then Exit;
Break; Break;