Alpha 19 sync
This commit is contained in:
parent
360e43d724
commit
4ba62f0a5e
|
@ -4719,7 +4719,7 @@
|
||||||
! Fixed bugs with MIS calculating the wrong node number if a user was
|
! Fixed bugs with MIS calculating the wrong node number if a user was
|
||||||
logged in locally in Windows.
|
logged in locally in Windows.
|
||||||
|
|
||||||
+ Mystic in non-Unix will not assign an available node number automatically
|
+ Mystic in non-Unix will now assign an available node number automatically
|
||||||
similar to how it works in a Unix environment. This will help prevent
|
similar to how it works in a Unix environment. This will help prevent
|
||||||
a person from accidentally logging into a node that is being used during
|
a person from accidentally logging into a node that is being used during
|
||||||
a local login.
|
a local login.
|
||||||
|
@ -4739,3 +4739,70 @@
|
||||||
|
|
||||||
! MUTIL FILEBONE import was not adding the trailing slash when generating a
|
! MUTIL FILEBONE import was not adding the trailing slash when generating a
|
||||||
file path.
|
file path.
|
||||||
|
|
||||||
|
+ MUTIL now has an option to generate an allfiles list which contains a
|
||||||
|
listing of all files from each filebase in one text file.
|
||||||
|
|
||||||
|
The functionality if there, but its not very configurable yet. If
|
||||||
|
anyone has suggestions please let me know.
|
||||||
|
|
||||||
|
+ Added 3 new MPL functions: MsgEditor, MsgEditSet, MsgEditGet. These allow
|
||||||
|
access to the internal Mystic msg editor (line and/or full) from within
|
||||||
|
MPL. It even allows you to define wrap position and template to completely
|
||||||
|
make it look like its not the Mystic editor!
|
||||||
|
|
||||||
|
As a little hint the MsgEditSet and MsgEditGet stuff could be used to post
|
||||||
|
process message text on posts. Like say for example you wanted to write
|
||||||
|
a MPL that allows users to add Tag lines, you could do that by replacing
|
||||||
|
the "Saving message..." prompt and using those two in order to modify the
|
||||||
|
text before it is saved by Mystic!
|
||||||
|
|
||||||
|
Rather than trying to explain it all, here is an example of all 3:
|
||||||
|
|
||||||
|
Var
|
||||||
|
Lines : Integer = 0;
|
||||||
|
WrapPos : Integer = 79;
|
||||||
|
MaxLines : Integer = 200;
|
||||||
|
Forced : Boolean = False;
|
||||||
|
Template : String = 'ansiedit';
|
||||||
|
Subject : String = 'My subject';
|
||||||
|
Count : Integer;
|
||||||
|
Begin
|
||||||
|
MsgEditSet (1, 'this is line 1');
|
||||||
|
MsgEditSet (2, 'this is line 2!');
|
||||||
|
|
||||||
|
Lines := 2;
|
||||||
|
|
||||||
|
SetPromptInfo(1, 'MsgTo'); // if template uses &1 for "To:" display
|
||||||
|
|
||||||
|
If MsgEditor(0, Lines, WrapPos, MaxLines, Forced, Template, Subject) Then Begin
|
||||||
|
WriteLn('User selected to save.');
|
||||||
|
WriteLn('There are ' + Int2Str(Lines) + ' of text in buffer:');
|
||||||
|
|
||||||
|
For Count := 1 to Lines Do
|
||||||
|
WriteLn(MsgEditGet(Count));
|
||||||
|
|
||||||
|
Pause;
|
||||||
|
End Else Begin
|
||||||
|
WriteLn('User aborted the edit.');
|
||||||
|
|
||||||
|
Pause;
|
||||||
|
End
|
||||||
|
End
|
||||||
|
|
||||||
|
! Fixed a bug in the internal LHA archive viewing that could cause the last
|
||||||
|
file in the archive to get corrupted during the view, if the file had
|
||||||
|
comments (and was created on an Amiga?)
|
||||||
|
|
||||||
|
+ CTRL-Z and [ESCAPE] now both bring up the full screen editor prompt to
|
||||||
|
save, etc.
|
||||||
|
|
||||||
|
+ Revampped message quoting a little bit. Quoted text will now be auto
|
||||||
|
reformatted if adding the initials would cut off text in the original
|
||||||
|
message EXCEPT when quoting quoted text.
|
||||||
|
|
||||||
|
Quote initials will always be 2 characters now. If the User handle is a
|
||||||
|
single word handle, it will use the first two letters of their name.
|
||||||
|
|
||||||
|
! Fixed a bug that could corrupt a message and/or crash when editing a
|
||||||
|
message with a lot of lines.
|
||||||
|
|
|
@ -18,7 +18,7 @@ Type
|
||||||
FileTime : LongInt;
|
FileTime : LongInt;
|
||||||
Attr : Word;
|
Attr : Word;
|
||||||
FileName : String[12];
|
FileName : String[12];
|
||||||
F32 : PathStr;
|
F32 : String[255];
|
||||||
DT : DateTime;
|
DT : DateTime;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
@ -61,14 +61,17 @@ Begin
|
||||||
If _FHdr.HeadSize <> 0 Then
|
If _FHdr.HeadSize <> 0 Then
|
||||||
UnPackTime (_FHdr.FileTime, _FHdr.DT);
|
UnPackTime (_FHdr.FileTime, _FHdr.DT);
|
||||||
|
|
||||||
|
If Pos(#0, _FHdr.FileName) > 0 Then
|
||||||
|
SR.Name := Copy(_FHdr.FileName, 1, Pos(#0, _FHdr.FileName) - 1)
|
||||||
|
Else
|
||||||
SR.Name := _FHdr.FileName;
|
SR.Name := _FHdr.FileName;
|
||||||
|
|
||||||
SR.Size := _FHdr.OrigSize;
|
SR.Size := _FHdr.OrigSize;
|
||||||
SR.Time := _FHdr.FileTime;
|
SR.Time := _FHdr.FileTime;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Procedure TLzhArchive.FindFirst (Var SR: ArcSearchRec);
|
Procedure TLzhArchive.FindFirst (Var SR: ArcSearchRec);
|
||||||
Begin
|
Begin
|
||||||
_SL := 0;
|
|
||||||
GetHeader(SR);
|
GetHeader(SR);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
|
@ -201,7 +201,7 @@ Begin
|
||||||
|
|
||||||
If User.ThisUser.Calls = 1 Then Inc (History.NewUsers, 1);
|
If User.ThisUser.Calls = 1 Then Inc (History.NewUsers, 1);
|
||||||
|
|
||||||
Inc (History.Hourly[HistoryHour]);
|
If Not LocalMode Then Inc (History.Hourly[HistoryHour]);
|
||||||
|
|
||||||
ioWrite (HistoryFile, History);
|
ioWrite (HistoryFile, History);
|
||||||
Close (HistoryFile);
|
Close (HistoryFile);
|
||||||
|
|
|
@ -4,7 +4,7 @@ Unit bbs_Edit_Full;
|
||||||
|
|
||||||
Interface
|
Interface
|
||||||
|
|
||||||
Function AnsiEditor (Var Lines: SmallInt; WrapPos: Byte; MaxLines: SmallInt; TEdit, Forced: Boolean; Var Subj: String) : Boolean;
|
Function AnsiEditor (Var Lines: SmallInt; WrapPos: Byte; MaxLines: SmallInt; Forced: Boolean; Template: String; Var Subj: String) : Boolean;
|
||||||
|
|
||||||
Implementation
|
Implementation
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ Begin
|
||||||
Session.io.BufAddStr(S + #13#10);
|
Session.io.BufAddStr(S + #13#10);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function AnsiEditor (Var Lines: Integer; WrapPos: Byte; MaxLines: Integer; TEdit, Forced: Boolean; Var Subj: String) : Boolean;
|
Function AnsiEditor (Var Lines: Integer; WrapPos: Byte; MaxLines: Integer; Forced: Boolean; Template: String; Var Subj: String) : Boolean;
|
||||||
Const
|
Const
|
||||||
MaxCutText = 100;
|
MaxCutText = 100;
|
||||||
Type
|
Type
|
||||||
|
@ -411,7 +411,9 @@ End;
|
||||||
|
|
||||||
Procedure FullReDraw;
|
Procedure FullReDraw;
|
||||||
Begin
|
Begin
|
||||||
If TEdit Then Session.io.OutFile ('ansitext', True, 0) Else Session.io.OutFile ('ansiedit', True, 0);
|
Session.io.PromptInfo[2] := Subj;
|
||||||
|
|
||||||
|
Session.io.OutFile (Template, True, 0);
|
||||||
|
|
||||||
WinStart := Session.io.ScreenInfo[1].Y;
|
WinStart := Session.io.ScreenInfo[1].Y;
|
||||||
WinEnd := Session.io.ScreenInfo[2].Y;
|
WinEnd := Session.io.ScreenInfo[2].Y;
|
||||||
|
@ -933,6 +935,7 @@ Begin
|
||||||
DeleteLine (CurLine);
|
DeleteLine (CurLine);
|
||||||
TextRefreshPart;
|
TextRefreshPart;
|
||||||
End;
|
End;
|
||||||
|
^Z,
|
||||||
^[ : Begin
|
^[ : Begin
|
||||||
Commands;
|
Commands;
|
||||||
|
|
||||||
|
|
|
@ -3629,7 +3629,7 @@ Begin
|
||||||
Temp := 'Description Editor';
|
Temp := 'Description Editor';
|
||||||
B := FDir.DescLines;
|
B := FDir.DescLines;
|
||||||
|
|
||||||
If Editor(B, mysMaxFileDescLen, Config.MaxFileDesc, True, False, Temp) Then Begin
|
If Editor(B, mysMaxFileDescLen, Config.MaxFileDesc, False, fn_tplTextEdit, Temp) Then Begin
|
||||||
FDir.DescLines := B;
|
FDir.DescLines := B;
|
||||||
FDir.DescPtr := FileSize(DataFile);
|
FDir.DescPtr := FileSize(DataFile);
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ Uses
|
||||||
bbs_Edit_Full,
|
bbs_Edit_Full,
|
||||||
bbs_Edit_Line;
|
bbs_Edit_Line;
|
||||||
|
|
||||||
Function Editor (Var Lines: SmallInt; MaxLen, MaxLine: SmallInt; TEdit, Forced : Boolean; Var Subj: String) : Boolean;
|
Function Editor (Var Lines: SmallInt; MaxLen, MaxLine: SmallInt; Forced: Boolean; Template: String; Var Subj: String) : Boolean;
|
||||||
Procedure Upgrade_User_Level (Now : Boolean; Var U : RecUser; Sec: Byte);
|
Procedure Upgrade_User_Level (Now : Boolean; Var U : RecUser; Sec: Byte);
|
||||||
Procedure View_BBS_List (Long: Boolean; Data: String);
|
Procedure View_BBS_List (Long: Boolean; Data: String);
|
||||||
Procedure Add_BBS_List (Name : String);
|
Procedure Add_BBS_List (Name : String);
|
||||||
|
@ -50,12 +50,12 @@ Uses
|
||||||
bbs_Core,
|
bbs_Core,
|
||||||
bbs_NodeInfo;
|
bbs_NodeInfo;
|
||||||
|
|
||||||
Function Editor (Var Lines: SmallInt; MaxLen, MaxLine: SmallInt; TEdit, Forced : Boolean; Var Subj: String) : Boolean;
|
Function Editor (Var Lines: SmallInt; MaxLen, MaxLine: SmallInt; Forced: Boolean; Template: String; Var Subj: String) : Boolean;
|
||||||
Begin
|
Begin
|
||||||
If (Session.io.Graphics > 0) and ((Session.User.ThisUser.EditType = 1) or ((Session.User.ThisUser.EditType = 2) and Session.io.GetYN(Session.GetPrompt(106), True))) Then
|
If (Session.io.Graphics > 0) and ((Session.User.ThisUser.EditType = 1) or ((Session.User.ThisUser.EditType = 2) and Session.io.GetYN(Session.GetPrompt(106), True))) Then
|
||||||
Editor := AnsiEditor(Lines, MaxLen, MaxLine, TEdit, Forced, Subj)
|
Editor := AnsiEditor(Lines, MaxLen, MaxLine, Forced, Template, Subj)
|
||||||
Else
|
Else
|
||||||
Editor := LineEditor(Lines, MaxLen, MaxLine, TEdit, Forced, Subj);
|
Editor := LineEditor(Lines, MaxLen, MaxLine, False, Forced, Subj);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Procedure Upgrade_User_Level (Now: Boolean; Var U: RecUser; Sec: Byte);
|
Procedure Upgrade_User_Level (Now: Boolean; Var U: RecUser; Sec: Byte);
|
||||||
|
@ -120,7 +120,7 @@ Begin
|
||||||
|
|
||||||
Str := 'Signature Editor'; {++lang}
|
Str := 'Signature Editor'; {++lang}
|
||||||
|
|
||||||
If Editor (Lines, 78, Config.MaxAutoSig, True, False, Str) Then Begin
|
If Editor (Lines, 78, Config.MaxAutoSig, False, fn_tplMsgEdit, Str) Then Begin
|
||||||
{$I-} Reset (DF, 1); {$I+}
|
{$I-} Reset (DF, 1); {$I+}
|
||||||
|
|
||||||
If IoResult <> 0 Then ReWrite (DF, 1);
|
If IoResult <> 0 Then ReWrite (DF, 1);
|
||||||
|
|
|
@ -25,12 +25,14 @@ Type
|
||||||
MScan : MScanRec;
|
MScan : MScanRec;
|
||||||
Group : RecGroup;
|
Group : RecGroup;
|
||||||
MsgText : RecMessageText;
|
MsgText : RecMessageText;
|
||||||
|
MsgTextSize : SmallInt;
|
||||||
WereMsgs : Boolean;
|
WereMsgs : Boolean;
|
||||||
Reading : Boolean;
|
Reading : Boolean;
|
||||||
|
|
||||||
Constructor Create (Var Owner: Pointer);
|
Constructor Create (Var Owner: Pointer);
|
||||||
Destructor Destroy; Override;
|
Destructor Destroy; Override;
|
||||||
|
|
||||||
|
Function IsQuotedText (Str: String) : Boolean;
|
||||||
Function OpenCreateBase (Var Msg: PMsgBaseABS; Var Area: RecMessageBase) : Boolean;
|
Function OpenCreateBase (Var Msg: PMsgBaseABS; Var Area: RecMessageBase) : Boolean;
|
||||||
Procedure AppendMessageText (Var Msg: PMsgBaseABS; Lines: Integer; ReplyID: String);
|
Procedure AppendMessageText (Var Msg: PMsgBaseABS; Lines: Integer; ReplyID: String);
|
||||||
Procedure AssignMessageData (Var Msg: PMsgBaseABS);
|
Procedure AssignMessageData (Var Msg: PMsgBaseABS);
|
||||||
|
@ -113,6 +115,7 @@ Begin
|
||||||
Group.Name := 'None';
|
Group.Name := 'None';
|
||||||
WereMsgs := False;
|
WereMsgs := False;
|
||||||
Reading := False;
|
Reading := False;
|
||||||
|
MsgTextSize := 0;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Destructor TMsgBase.Destroy;
|
Destructor TMsgBase.Destroy;
|
||||||
|
@ -120,6 +123,14 @@ Begin
|
||||||
Inherited Destroy;
|
Inherited Destroy;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
Function TMsgBase.IsQuotedText (Str: String) : Boolean;
|
||||||
|
Var
|
||||||
|
Temp : Byte;
|
||||||
|
Begin
|
||||||
|
Temp := Pos('>', strStripL(Str, ' '));
|
||||||
|
Result := (Temp > 0) and (Temp < 5);
|
||||||
|
End;
|
||||||
|
|
||||||
Function TMsgBase.OpenCreateBase (Var Msg: PMsgBaseABS; Var Area: RecMessageBase) : Boolean;
|
Function TMsgBase.OpenCreateBase (Var Msg: PMsgBaseABS; Var Area: RecMessageBase) : Boolean;
|
||||||
Begin
|
Begin
|
||||||
Result := False;
|
Result := False;
|
||||||
|
@ -874,10 +885,11 @@ Var
|
||||||
Subj : String[60];
|
Subj : String[60];
|
||||||
Addr : RecEchomailAddr;
|
Addr : RecEchomailAddr;
|
||||||
MsgNew : PMsgBaseABS;
|
MsgNew : PMsgBaseABS;
|
||||||
Temp1 : String;
|
TempStr : String;
|
||||||
Temp2 : String[2];
|
Initials : String[4];
|
||||||
Temp3 : String[80];
|
WrapData : String;
|
||||||
tFile : Text;
|
DoWrap : Boolean = True;
|
||||||
|
QuoteFile : Text;
|
||||||
Lines : SmallInt;
|
Lines : SmallInt;
|
||||||
Begin
|
Begin
|
||||||
If Not Session.User.Access(MBase.PostACS) Then Begin
|
If Not Session.User.Access(MBase.PostACS) Then Begin
|
||||||
|
@ -914,9 +926,9 @@ Begin
|
||||||
|
|
||||||
MsgBase^.GetOrig(Addr);
|
MsgBase^.GetOrig(Addr);
|
||||||
|
|
||||||
Temp3 := Session.io.GetInput(20, 20, 12, strAddr2Str(Addr));
|
TempStr := Session.io.GetInput(20, 20, 12, strAddr2Str(Addr));
|
||||||
|
|
||||||
If Not strStr2Addr (Temp3, Addr) Then Exit;
|
If Not strStr2Addr (TempStr, Addr) Then Exit;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Subj := MsgBase^.GetSubj;
|
Subj := MsgBase^.GetSubj;
|
||||||
|
@ -929,47 +941,60 @@ Begin
|
||||||
|
|
||||||
If Subj = '' Then Exit;
|
If Subj = '' Then Exit;
|
||||||
|
|
||||||
Assign (tFile, Session.TempPath + 'msgtmp');
|
Assign (QuoteFile, Session.TempPath + 'msgtmp');
|
||||||
{$I-} ReWrite (tFile); {$I+}
|
{$I-} ReWrite (QuoteFile); {$I+}
|
||||||
|
|
||||||
If IoResult = 0 Then Begin
|
If IoResult = 0 Then Begin
|
||||||
Temp3 := MsgBase^.GetFrom;
|
Initials := strInitials(MsgBase^.GetFrom) + '> ';
|
||||||
Temp2 := Temp3[1];
|
TempStr := Session.GetPrompt(464);
|
||||||
|
|
||||||
If Pos(' ', Temp3) > 0 Then
|
TempStr := strReplace(TempStr, '|&1', MsgBase^.GetDate);
|
||||||
Temp2 := Temp2 + Temp3[Succ(Pos(' ', Temp3))];
|
TempStr := strReplace(TempStr, '|&2', MsgBase^.GetFrom);
|
||||||
|
TempStr := strReplace(TempStr, '|&3', Initials);
|
||||||
|
|
||||||
Temp1 := Session.GetPrompt(464);
|
WriteLn (QuoteFile, TempStr);
|
||||||
|
WriteLn (QuoteFile, ' ');
|
||||||
Temp1 := strReplace(Temp1, '|&1', MsgBase^.GetDate);
|
|
||||||
Temp1 := strReplace(Temp1, '|&2', MsgBase^.GetFrom);
|
|
||||||
Temp1 := strReplace(Temp1, '|&3', Temp2);
|
|
||||||
|
|
||||||
WriteLn (tFile, Temp1);
|
|
||||||
WriteLn (tFile, ' ');
|
|
||||||
|
|
||||||
Lines := 0;
|
|
||||||
|
|
||||||
MsgBase^.MsgTxtStartUp;
|
MsgBase^.MsgTxtStartUp;
|
||||||
|
|
||||||
While Not MsgBase^.EOM and (Lines < mysMaxMsgLines - 2) Do Begin
|
WrapData := '';
|
||||||
Inc (Lines);
|
|
||||||
|
|
||||||
Temp3 := MsgBase^.GetString(79);
|
While Not MsgBase^.EOM Do Begin
|
||||||
|
TempStr := MsgBase^.GetString(79);
|
||||||
|
|
||||||
If Temp3[1] <> #1 Then
|
If TempStr[1] = #1 Then Continue;
|
||||||
WriteLn (tFile, Temp2 + '> ' + Copy(Temp3, 1, 74));
|
|
||||||
|
DoWrap := Not IsQuotedText(TempStr);
|
||||||
|
|
||||||
|
If DoWrap Then Begin
|
||||||
|
If WrapData <> '' Then Begin
|
||||||
|
If TempStr = '' Then Begin
|
||||||
|
WriteLn (QuoteFile, Initials + WrapData);
|
||||||
|
WriteLn (QuoteFile, Initials);
|
||||||
|
|
||||||
|
WrapData := '';
|
||||||
|
|
||||||
|
Continue;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Close (tFile);
|
TempStr := WrapData + ' ' + TempStr;
|
||||||
|
End;
|
||||||
|
|
||||||
|
strWrap (TempStr, WrapData, 74);
|
||||||
|
|
||||||
|
WriteLn (QuoteFile, Initials + Copy(TempStr, 1, 74));
|
||||||
|
End Else
|
||||||
|
WriteLn (QuoteFile, Initials + Copy(TempStr, 1, 74));
|
||||||
|
End;
|
||||||
|
|
||||||
|
Close (QuoteFile);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Lines := 0;
|
Lines := 0;
|
||||||
|
|
||||||
Session.io.PromptInfo[1] := ToWho;
|
Session.io.PromptInfo[1] := ToWho;
|
||||||
Session.io.PromptInfo[2] := Subj;
|
|
||||||
|
|
||||||
If Editor(Lines, 78, mysMaxMsgLines, False, False, Subj) Then Begin
|
If Editor(Lines, 78, mysMaxMsgLines, False, fn_tplMsgEdit, Subj) Then Begin
|
||||||
|
|
||||||
Session.io.OutFull (Session.GetPrompt(107));
|
Session.io.OutFull (Session.GetPrompt(107));
|
||||||
|
|
||||||
|
@ -1043,11 +1068,13 @@ Var
|
||||||
|
|
||||||
While Not MsgBase^.EOM and (Lines < mysMaxMsgLines) Do Begin
|
While Not MsgBase^.EOM and (Lines < mysMaxMsgLines) Do Begin
|
||||||
Inc (Lines);
|
Inc (Lines);
|
||||||
|
|
||||||
MsgText[Lines] := MsgBase^.GetString(79);
|
MsgText[Lines] := MsgBase^.GetString(79);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
If Lines < mysMaxMsgLines Then Begin
|
If Lines < mysMaxMsgLines Then Begin
|
||||||
Inc (Lines);
|
Inc (Lines);
|
||||||
|
|
||||||
MsgText[Lines] := '';
|
MsgText[Lines] := '';
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
@ -1096,7 +1123,7 @@ Begin
|
||||||
'!' : Begin
|
'!' : Begin
|
||||||
Temp1 := MsgBase^.GetSubj;
|
Temp1 := MsgBase^.GetSubj;
|
||||||
|
|
||||||
If Editor(Lines, 78, mysMaxMsgLines, False, False, Temp1) Then
|
If Editor(Lines, 78, mysMaxMsgLines, False, fn_tplMsgEdit, Temp1) Then
|
||||||
MsgBase^.SetSubj(Temp1)
|
MsgBase^.SetSubj(Temp1)
|
||||||
Else
|
Else
|
||||||
ReadText;
|
ReadText;
|
||||||
|
@ -1440,9 +1467,8 @@ Var
|
||||||
Var
|
Var
|
||||||
B : Byte;
|
B : Byte;
|
||||||
Begin
|
Begin
|
||||||
B := Pos('>', strStripL(Str, ' '));
|
|
||||||
|
|
||||||
If (B > 0) and (B < 5) Then Begin
|
If IsQuotedText(Str) Then Begin
|
||||||
Session.io.AnsiColor(MBase.ColQuote);
|
Session.io.AnsiColor(MBase.ColQuote);
|
||||||
Session.io.OutPipe (Str);
|
Session.io.OutPipe (Str);
|
||||||
Session.io.AnsiColor(MBase.ColText);
|
Session.io.AnsiColor(MBase.ColText);
|
||||||
|
@ -2352,6 +2378,7 @@ Begin
|
||||||
End;
|
End;
|
||||||
|
|
||||||
MsgBase^.SetMsgPath (MBase.Path + MBase.FileName);
|
MsgBase^.SetMsgPath (MBase.Path + MBase.FileName);
|
||||||
|
MsgBase^.SetTempFile (Session.TempPath + 'msgbuf.');
|
||||||
|
|
||||||
If Not MsgBase^.OpenMsgBase Then Begin
|
If Not MsgBase^.OpenMsgBase Then Begin
|
||||||
If Mode = 'E' Then
|
If Mode = 'E' Then
|
||||||
|
@ -2555,9 +2582,9 @@ Begin
|
||||||
Lines := 0;
|
Lines := 0;
|
||||||
|
|
||||||
Session.io.PromptInfo[1] := MsgTo;
|
Session.io.PromptInfo[1] := MsgTo;
|
||||||
Session.io.PromptInfo[2] := MsgSubj;
|
// Session.io.PromptInfo[2] := MsgSubj;
|
||||||
|
|
||||||
If Editor(Lines, 78, mysMaxMsgLines, False, Forced, MsgSubj) Then Begin
|
If Editor(Lines, 78, mysMaxMsgLines, Forced, fn_tplMsgEdit, MsgSubj) Then Begin
|
||||||
Session.io.OutFull (Session.GetPrompt(107));
|
Session.io.OutFull (Session.GetPrompt(107));
|
||||||
|
|
||||||
{ all of this below should be replaced with a SaveMessage function }
|
{ all of this below should be replaced with a SaveMessage function }
|
||||||
|
@ -2997,7 +3024,7 @@ Begin
|
||||||
|
|
||||||
Lines := 0;
|
Lines := 0;
|
||||||
|
|
||||||
If Editor(Lines, 78, mysMaxMsgLines, False, False, MsgSubj) Then Begin
|
If Editor(Lines, 78, mysMaxMsgLines, False, fn_tplMsgEdit, MsgSubj) Then Begin
|
||||||
Session.io.OutFullLn (Session.GetPrompt(394));
|
Session.io.OutFullLn (Session.GetPrompt(394));
|
||||||
|
|
||||||
OLD := MBase;
|
OLD := MBase;
|
||||||
|
|
|
@ -100,7 +100,7 @@ Type
|
||||||
Function YoursFound: Boolean; Virtual; {Message found}
|
Function YoursFound: Boolean; Virtual; {Message found}
|
||||||
Function GetHighMsgNum: LongInt; Virtual; {Get highest msg number}
|
Function GetHighMsgNum: LongInt; Virtual; {Get highest msg number}
|
||||||
Procedure SetMailType(MT: MsgMailType); Virtual; {Set message base type}
|
Procedure SetMailType(MT: MsgMailType); Virtual; {Set message base type}
|
||||||
Function GetSubArea: Word; Virtual; {Get sub area number}
|
// Function GetSubArea: Word; Virtual; {Get sub area number}
|
||||||
Procedure ReWriteHdr; Virtual; {Rewrite msg header after changes}
|
Procedure ReWriteHdr; Virtual; {Rewrite msg header after changes}
|
||||||
Procedure DeleteMsg; Virtual; {Delete current message}
|
Procedure DeleteMsg; Virtual; {Delete current message}
|
||||||
Procedure SetEcho(ES: Boolean); Virtual; {Set echo status}
|
Procedure SetEcho(ES: Boolean); Virtual; {Set echo status}
|
||||||
|
@ -521,10 +521,10 @@ Procedure TMsgBaseABS.SetMailType(MT: MsgMailType);
|
||||||
Begin
|
Begin
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function TMsgBaseABS.GetSubArea: Word;
|
//Function TMsgBaseABS.GetSubArea: Word;
|
||||||
Begin
|
//Begin
|
||||||
GetSubArea := 0;
|
// GetSubArea := 0;
|
||||||
End;
|
//End;
|
||||||
|
|
||||||
Procedure TMsgBaseABS.ReWriteHdr;
|
Procedure TMsgBaseABS.ReWriteHdr;
|
||||||
Begin
|
Begin
|
||||||
|
|
|
@ -212,7 +212,7 @@ Type
|
||||||
Function IsRcvd : Boolean; Virtual; {Is current msg received}
|
Function IsRcvd : Boolean; Virtual; {Is current msg received}
|
||||||
Function IsPriv : Boolean; Virtual; {Is current msg priviledged/private}
|
Function IsPriv : Boolean; Virtual; {Is current msg priviledged/private}
|
||||||
Function IsDeleted : Boolean; Virtual; {Is current msg deleted}
|
Function IsDeleted : Boolean; Virtual; {Is current msg deleted}
|
||||||
Function IsEchoed: Boolean; Virtual; {Msg should be echoed}
|
// Function IsEchoed : Boolean; Virtual; {Msg should be echoed}
|
||||||
Function GetMsgLoc : LongInt; Virtual; {Msg location}
|
Function GetMsgLoc : LongInt; Virtual; {Msg location}
|
||||||
Procedure SetMsgLoc (ML: LongInt); Virtual; {Msg location}
|
Procedure SetMsgLoc (ML: LongInt); Virtual; {Msg location}
|
||||||
Procedure YoursFirst (Name: String; Handle: String); Virtual; {Seek your mail}
|
Procedure YoursFirst (Name: String; Handle: String); Virtual; {Seek your mail}
|
||||||
|
@ -221,11 +221,11 @@ Type
|
||||||
Procedure StartNewMsg; Virtual;
|
Procedure StartNewMsg; Virtual;
|
||||||
Function OpenMsgBase : Boolean; Virtual;
|
Function OpenMsgBase : Boolean; Virtual;
|
||||||
Procedure CloseMsgBase; Virtual;
|
Procedure CloseMsgBase; Virtual;
|
||||||
Function MsgBaseExists: Boolean; Virtual; {Does msg base exist}
|
// Function MsgBaseExists : Boolean; Virtual; {Does msg base exist}
|
||||||
Function CreateMsgBase (MaxMsg: Word; MaxDays: Word): Boolean; Virtual;
|
Function CreateMsgBase (MaxMsg: Word; MaxDays: Word): Boolean; Virtual;
|
||||||
Function SeekFound : Boolean; Virtual;
|
Function SeekFound : Boolean; Virtual;
|
||||||
Procedure SetMailType (MT: MsgMailType); Virtual; {Set message base type}
|
Procedure SetMailType (MT: MsgMailType); Virtual; {Set message base type}
|
||||||
Function GetSubArea: Word; Virtual; {Get sub area number}
|
// Function GetSubArea : Word; Virtual; {Get sub area number}
|
||||||
Procedure ReWriteHdr; Virtual; {Rewrite msg header after changes}
|
Procedure ReWriteHdr; Virtual; {Rewrite msg header after changes}
|
||||||
Procedure DeleteMsg; Virtual; {Delete current message}
|
Procedure DeleteMsg; Virtual; {Delete current message}
|
||||||
Function NumberOfMsgs : LongInt; Virtual; {Number of messages}
|
Function NumberOfMsgs : LongInt; Virtual; {Number of messages}
|
||||||
|
@ -1324,22 +1324,21 @@ Function TMsgBaseJAM.IsDeleted: Boolean; {Is current msg deleted}
|
||||||
IsDeleted := (MsgHdr^.JamHdr.Attr1 and Jam_Deleted) <> 0;
|
IsDeleted := (MsgHdr^.JamHdr.Attr1 and Jam_Deleted) <> 0;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
//Function TMsgBaseJAM.IsEchoed: Boolean; {Is current msg echoed}
|
||||||
Function TMsgBaseJAM.IsEchoed: Boolean; {Is current msg echoed}
|
//Begin
|
||||||
Begin
|
// IsEchoed := True;
|
||||||
IsEchoed := True;
|
//End;
|
||||||
End;
|
|
||||||
|
|
||||||
|
|
||||||
Procedure TMsgBaseJAM.SeekFirst(MsgNum: LongInt); {Start msg seek}
|
Procedure TMsgBaseJAM.SeekFirst(MsgNum: LongInt); {Start msg seek}
|
||||||
Begin
|
Begin
|
||||||
JM^.CurrMsgNum := MsgNum - 1;
|
JM^.CurrMsgNum := MsgNum - 1;
|
||||||
|
|
||||||
If JM^.CurrMsgNum < (JM^.BaseHdr.BaseMsgNum - 1) Then
|
If JM^.CurrMsgNum < (JM^.BaseHdr.BaseMsgNum - 1) Then
|
||||||
JM^.CurrMsgNum := JM^.BaseHdr.BaseMsgNum - 1;
|
JM^.CurrMsgNum := JM^.BaseHdr.BaseMsgNum - 1;
|
||||||
|
|
||||||
SeekNext;
|
SeekNext;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
Procedure TMsgBaseJAM.SeekNext; {Find next matching msg}
|
Procedure TMsgBaseJAM.SeekNext; {Find next matching msg}
|
||||||
Var
|
Var
|
||||||
IdxLoc: LongInt;
|
IdxLoc: LongInt;
|
||||||
|
@ -1351,6 +1350,7 @@ Begin
|
||||||
|
|
||||||
While (((JamIdx^[IdxLoc - JM^.IdxStart].HdrLoc < 0) or (JamIdx^[IdxLoc - JM^.IdxStart].MsgToCrc = -1)) And (JM^.CurrMsgNum <= GetHighMsgNum)) Do Begin
|
While (((JamIdx^[IdxLoc - JM^.IdxStart].HdrLoc < 0) or (JamIdx^[IdxLoc - JM^.IdxStart].MsgToCrc = -1)) And (JM^.CurrMsgNum <= GetHighMsgNum)) Do Begin
|
||||||
Inc (JM^.CurrMsgNum);
|
Inc (JM^.CurrMsgNum);
|
||||||
|
|
||||||
Error := ReReadIdx(IdxLoc);
|
Error := ReReadIdx(IdxLoc);
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
@ -1376,19 +1376,16 @@ Begin
|
||||||
SeekFound := ((JM^.CurrMsgNum >= JM^.BaseHdr.BaseMsgNum) and (JM^.CurrMsgNum <= GetHighMsgNum));
|
SeekFound := ((JM^.CurrMsgNum >= JM^.BaseHdr.BaseMsgNum) and (JM^.CurrMsgNum <= GetHighMsgNum));
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
Function TMsgBaseJAM.GetMsgLoc: LongInt; {Msg location}
|
Function TMsgBaseJAM.GetMsgLoc: LongInt; {Msg location}
|
||||||
Begin
|
Begin
|
||||||
GetMsgLoc := GetMsgNum;
|
GetMsgLoc := GetMsgNum;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
Procedure TMsgBaseJAM.SetMsgLoc(ML: LongInt); {Msg location}
|
Procedure TMsgBaseJAM.SetMsgLoc(ML: LongInt); {Msg location}
|
||||||
Begin
|
Begin
|
||||||
JM^.CurrMsgNum := ML;
|
JM^.CurrMsgNum := ML;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
Procedure TMsgBaseJAM.YoursFirst (Name: String; Handle: String);
|
Procedure TMsgBaseJAM.YoursFirst (Name: String; Handle: String);
|
||||||
Begin
|
Begin
|
||||||
JM^.YourName := Name;
|
JM^.YourName := Name;
|
||||||
|
@ -1396,10 +1393,10 @@ Begin
|
||||||
JM^.NameCrc := JamStrCrc(Name);
|
JM^.NameCrc := JamStrCrc(Name);
|
||||||
JM^.HdlCrc := JamStrCrc(Handle);
|
JM^.HdlCrc := JamStrCrc(Handle);
|
||||||
JM^.CurrMsgNum := JM^.BaseHdr.BaseMsgNum - 1;
|
JM^.CurrMsgNum := JM^.BaseHdr.BaseMsgNum - 1;
|
||||||
|
|
||||||
YoursNext;
|
YoursNext;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
Procedure TMsgBaseJAM.YoursNext;
|
Procedure TMsgBaseJAM.YoursNext;
|
||||||
Var
|
Var
|
||||||
Found : Boolean;
|
Found : Boolean;
|
||||||
|
@ -1412,8 +1409,10 @@ Begin
|
||||||
Found := False;
|
Found := False;
|
||||||
|
|
||||||
Inc(JM^.CurrMsgNum);
|
Inc(JM^.CurrMsgNum);
|
||||||
|
|
||||||
While ((Not Found) and (JM^.CurrMsgNum <= GetHighMsgNum) And (Error = 0)) Do Begin
|
While ((Not Found) and (JM^.CurrMsgNum <= GetHighMsgNum) And (Error = 0)) Do Begin
|
||||||
Error := ReReadIdx(IdxLoc);
|
Error := ReReadIdx(IdxLoc);
|
||||||
|
|
||||||
If Error = 0 Then Begin {Check CRC values}
|
If Error = 0 Then Begin {Check CRC values}
|
||||||
If ((JamIdx^[IdxLoc - JM^.IdxStart].MsgToCrc = JM^.NameCrc) or
|
If ((JamIdx^[IdxLoc - JM^.IdxStart].MsgToCrc = JM^.NameCrc) or
|
||||||
(JamIdx^[IdxLoc - JM^.IdxStart].MsgToCrc = JM^.HdlCrc)) Then Begin
|
(JamIdx^[IdxLoc - JM^.IdxStart].MsgToCrc = JM^.HdlCrc)) Then Begin
|
||||||
|
@ -1450,57 +1449,59 @@ Begin
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
Function TMsgBaseJAM.YoursFound: Boolean;
|
Function TMsgBaseJAM.YoursFound: Boolean;
|
||||||
Begin
|
Begin
|
||||||
YoursFound := ((JM^.CurrMsgNum >= JM^.BaseHdr.BaseMsgNum) and
|
YoursFound := ((JM^.CurrMsgNum >= JM^.BaseHdr.BaseMsgNum) and (JM^.CurrMsgNum <= GetHighMsgNum));
|
||||||
(JM^.CurrMsgNum <= GetHighMsgNum));
|
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
Procedure TMsgBaseJAM.StartNewMsg;
|
Procedure TMsgBaseJAM.StartNewMsg;
|
||||||
Begin
|
Begin
|
||||||
JM^.TxtBufStart := 0;
|
JM^.TxtBufStart := 0;
|
||||||
JM^.TxtPos := 0;
|
JM^.TxtPos := 0;
|
||||||
|
|
||||||
FillChar(MsgHdr^, SizeOf(MsgHdr^), #0);
|
FillChar(MsgHdr^, SizeOf(MsgHdr^), #0);
|
||||||
MsgHdr^.JamHdr.SubFieldLen := 0;
|
|
||||||
|
// MsgHdr^.JamHdr.SubFieldLen := 0;
|
||||||
MsgHdr^.JamHdr.MsgIdCrc := -1;
|
MsgHdr^.JamHdr.MsgIdCrc := -1;
|
||||||
MsgHdr^.JamHdr.ReplyCrc := -1;
|
MsgHdr^.JamHdr.ReplyCrc := -1;
|
||||||
MsgHdr^.JamHdr.PwdCrc := -1;
|
MsgHdr^.JamHdr.PwdCrc := -1;
|
||||||
|
|
||||||
JM^.MsgTo := '';
|
JM^.MsgTo := '';
|
||||||
JM^.MsgFrom := '';
|
JM^.MsgFrom := '';
|
||||||
JM^.MsgSubj := '';
|
JM^.MsgSubj := '';
|
||||||
|
|
||||||
FillChar(JM^.Orig, SizeOf(JM^.Orig), #0);
|
FillChar(JM^.Orig, SizeOf(JM^.Orig), #0);
|
||||||
FillChar(JM^.Dest, SizeOf(JM^.Dest), #0);
|
FillChar(JM^.Dest, SizeOf(JM^.Dest), #0);
|
||||||
|
|
||||||
JM^.MsgDate := DateDos2Str(CurDateDos, 1);
|
JM^.MsgDate := DateDos2Str(CurDateDos, 1);
|
||||||
JM^.MsgTime := TimeDos2Str(CurDateDos, False);
|
JM^.MsgTime := TimeDos2Str(CurDateDos, False);
|
||||||
// writeln(jm^.msgdate);
|
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
Function TMsgBaseJAM.MsgBaseExists: Boolean;
|
//Function TMsgBaseJAM.MsgBaseExists: Boolean;
|
||||||
Begin
|
// Begin
|
||||||
MsgBaseExists := (FileExist(JM^.MsgPath + '.jhr'));
|
// MsgBaseExists := (FileExist(JM^.MsgPath + '.jhr'));
|
||||||
End;
|
// End;
|
||||||
|
|
||||||
|
|
||||||
Function TMsgBaseJAM.ReadIdx: Word;
|
Function TMsgBaseJAM.ReadIdx: Word;
|
||||||
Begin
|
Begin
|
||||||
If JM^.IdxStart < 0 Then JM^.IdxStart := 0;
|
If JM^.IdxStart < 0 Then JM^.IdxStart := 0;
|
||||||
|
|
||||||
Seek (JM^.IdxFile, JM^.IdxStart);
|
Seek (JM^.IdxFile, JM^.IdxStart);
|
||||||
BlockRead (JM^.IdxFile, JamIdx^, JamIdxBufSize, JM^.IdxRead);
|
BlockRead (JM^.IdxFile, JamIdx^, JamIdxBufSize, JM^.IdxRead);
|
||||||
|
|
||||||
ReadIdx := IoResult;
|
ReadIdx := IoResult;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
Function TMsgBaseJAM.WriteIdx: Word;
|
Function TMsgBaseJAM.WriteIdx: Word;
|
||||||
Begin
|
Begin
|
||||||
Seek (JM^.IdxFile, JM^.IdxStart);
|
Seek (JM^.IdxFile, JM^.IdxStart);
|
||||||
BlockWrite (JM^.IdxFile, JamIdx^, JM^.IdxRead);
|
BlockWrite (JM^.IdxFile, JamIdx^, JM^.IdxRead);
|
||||||
|
|
||||||
WriteIdx := IoResult;
|
WriteIdx := IoResult;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
Function TMsgBaseJAM.OpenMsgBase: Boolean;
|
Function TMsgBaseJAM.OpenMsgBase: Boolean;
|
||||||
Var
|
Var
|
||||||
OpenError : Word;
|
OpenError : Word;
|
||||||
|
@ -1554,16 +1555,16 @@ Function TMsgBaseJAM.CreateMsgBase(MaxMsg: Word; MaxDays: Word): Boolean;
|
||||||
Var
|
Var
|
||||||
TmpHdr : ^JamHdrType;
|
TmpHdr : ^JamHdrType;
|
||||||
CreateError : Word;
|
CreateError : Word;
|
||||||
// i: Word;
|
|
||||||
|
|
||||||
Begin
|
Begin
|
||||||
CreateError := 0;
|
CreateError := 0;
|
||||||
|
|
||||||
New(TmpHdr);
|
New(TmpHdr);
|
||||||
|
|
||||||
If TmpHdr = Nil Then
|
If TmpHdr = Nil Then
|
||||||
CreateError := 500
|
CreateError := 500
|
||||||
Else Begin;
|
Else Begin;
|
||||||
FillChar(TmpHdr^, SizeOf(TmpHdr^), #0);
|
FillChar(TmpHdr^, SizeOf(TmpHdr^), #0);
|
||||||
|
|
||||||
TmpHdr^.Signature[1] := 'J';
|
TmpHdr^.Signature[1] := 'J';
|
||||||
TmpHdr^.Signature[2] := 'A';
|
TmpHdr^.Signature[2] := 'A';
|
||||||
TmpHdr^.Signature[3] := 'M';
|
TmpHdr^.Signature[3] := 'M';
|
||||||
|
@ -1571,52 +1572,57 @@ Begin
|
||||||
TmpHdr^.Created := ToUnixDate(CurDateDos);
|
TmpHdr^.Created := ToUnixDate(CurDateDos);
|
||||||
TmpHdr^.PwdCrc := -1;
|
TmpHdr^.PwdCrc := -1;
|
||||||
CreateError := SaveFile(JM^.MsgPath + '.jhr', TmpHdr^, SizeOf(TmpHdr^));
|
CreateError := SaveFile(JM^.MsgPath + '.jhr', TmpHdr^, SizeOf(TmpHdr^));
|
||||||
|
|
||||||
Dispose(TmpHdr);
|
Dispose(TmpHdr);
|
||||||
|
|
||||||
If CreateError = 0 Then
|
If CreateError = 0 Then
|
||||||
CreateError := SaveFile(JM^.MsgPath + '.jlr', CreateError, 0);
|
CreateError := SaveFile(JM^.MsgPath + '.jlr', CreateError, 0);
|
||||||
|
|
||||||
If CreateError = 0 Then
|
If CreateError = 0 Then
|
||||||
CreateError := SaveFile(JM^.MsgPath + '.jdt', CreateError, 0);
|
CreateError := SaveFile(JM^.MsgPath + '.jdt', CreateError, 0);
|
||||||
|
|
||||||
If CreateError = 0 Then
|
If CreateError = 0 Then
|
||||||
CreateError := SaveFile(JM^.MsgPath + '.jdx', CreateError , 0);
|
CreateError := SaveFile(JM^.MsgPath + '.jdx', CreateError , 0);
|
||||||
|
|
||||||
If IoResult <> 0 Then;
|
If IoResult <> 0 Then;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
CreateMsgBase := CreateError = 0;
|
CreateMsgBase := CreateError = 0;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
Procedure TMsgBaseJAM.SetMailType(MT: MsgMailType);
|
Procedure TMsgBaseJAM.SetMailType(MT: MsgMailType);
|
||||||
Begin
|
Begin
|
||||||
JM^.MailType := MT;
|
JM^.MailType := MT;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
//Function TMsgBaseJAM.GetSubArea: Word;
|
||||||
Function TMsgBaseJAM.GetSubArea: Word;
|
//Begin
|
||||||
Begin
|
// GetSubArea := 0;
|
||||||
GetSubArea := 0;
|
//End;
|
||||||
End;
|
|
||||||
|
|
||||||
|
|
||||||
Procedure TMsgBaseJAM.ReWriteHdr;
|
Procedure TMsgBaseJAM.ReWriteHdr;
|
||||||
Var
|
Var
|
||||||
IdxLoc : LongInt;
|
IdxLoc : LongInt;
|
||||||
|
|
||||||
Begin
|
Begin
|
||||||
If LockMsgBase Then
|
If LockMsgBase Then
|
||||||
Error := 0
|
Error := 0
|
||||||
Else
|
Else
|
||||||
Error := 5;
|
Error := 5;
|
||||||
|
|
||||||
Error := ReReadIdx(IdxLoc);
|
Error := ReReadIdx(IdxLoc);
|
||||||
|
|
||||||
If Error = 0 Then Begin
|
If Error = 0 Then Begin
|
||||||
Seek (JM^.HdrFile, JamIdx^[IdxLoc - JM^.IdxStart].HdrLoc);
|
Seek (JM^.HdrFile, JamIdx^[IdxLoc - JM^.IdxStart].HdrLoc);
|
||||||
Error := IoResult;
|
Error := IoResult;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
If Error = 0 Then Begin
|
If Error = 0 Then Begin
|
||||||
BlockWrite (JM^.HdrFile, MsgHdr^.JamHdr, SizeOf(MsgHdr^.JamHdr));
|
BlockWrite (JM^.HdrFile, MsgHdr^.JamHdr, SizeOf(MsgHdr^.JamHdr));
|
||||||
Error := IoResult;
|
Error := IoResult;
|
||||||
End;
|
End;
|
||||||
If UnLockMsgBase Then;
|
|
||||||
End;
|
|
||||||
|
|
||||||
|
UnLockMsgBase;
|
||||||
|
End;
|
||||||
|
|
||||||
Procedure TMsgBaseJAM.DeleteMsg;
|
Procedure TMsgBaseJAM.DeleteMsg;
|
||||||
Var
|
Var
|
||||||
|
@ -1628,20 +1634,25 @@ Begin
|
||||||
DelError := 0
|
DelError := 0
|
||||||
Else
|
Else
|
||||||
DelError := 5;
|
DelError := 5;
|
||||||
|
|
||||||
If DelError = 0 Then Begin
|
If DelError = 0 Then Begin
|
||||||
SetAttr1 (Jam_Deleted, True);
|
SetAttr1 (Jam_Deleted, True);
|
||||||
Dec (JM^.BaseHdr.ActiveMsgs);
|
Dec (JM^.BaseHdr.ActiveMsgs);
|
||||||
DelError := ReReadIdx(IdxLoc);
|
DelError := ReReadIdx(IdxLoc);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
If DelError = 0 Then ReWriteHdr;
|
If DelError = 0 Then ReWriteHdr;
|
||||||
|
|
||||||
If DelError = 0 Then Begin
|
If DelError = 0 Then Begin
|
||||||
Inc(JM^.BaseHdr.ModCounter);
|
Inc(JM^.BaseHdr.ModCounter);
|
||||||
{these three were commented out for some reason }
|
|
||||||
JamIdx^[IdxLoc - JM^.IdxStart].MsgToCrc := -1;
|
JamIdx^[IdxLoc - JM^.IdxStart].MsgToCrc := -1;
|
||||||
JamIdx^[IdxLoc - JM^.IdxStart].HdrLoc := -1;
|
JamIdx^[IdxLoc - JM^.IdxStart].HdrLoc := -1;
|
||||||
If WriteIdx = 0 Then;
|
|
||||||
|
WriteIdx;
|
||||||
End;
|
End;
|
||||||
If UnLockMsgBase Then;
|
|
||||||
|
UnLockMsgBase;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
@ -1650,43 +1661,45 @@ Begin
|
||||||
NumberOfMsgs := JM^.BaseHdr.ActiveMsgs;
|
NumberOfMsgs := JM^.BaseHdr.ActiveMsgs;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
Function TMsgBaseJAM.FindLastRead (Var LastFile: File; UNum: LongInt): LongInt;
|
Function TMsgBaseJAM.FindLastRead (Var LastFile: File; UNum: LongInt): LongInt;
|
||||||
Const
|
Const
|
||||||
LastSize = 100;
|
LastSize = 100;
|
||||||
|
Type
|
||||||
Type LastArray = Array[1..LastSize] of JamLastType;
|
LastArray = Array[1..LastSize] of JamLastType;
|
||||||
|
|
||||||
Var
|
Var
|
||||||
LastBuf : ^LastArray;
|
LastBuf : ^LastArray;
|
||||||
LastError : Word;
|
LastError : Word;
|
||||||
NumRead : LongInt;
|
NumRead : LongInt;
|
||||||
Found : Boolean;
|
Found : Boolean;
|
||||||
i: Word;
|
Count : Word;
|
||||||
LastStart : LongInt;
|
LastStart : LongInt;
|
||||||
|
|
||||||
Begin
|
Begin
|
||||||
FindLastRead := -1;
|
FindLastRead := -1;
|
||||||
Found := False;
|
Found := False;
|
||||||
|
|
||||||
New (LastBuf);
|
New (LastBuf);
|
||||||
|
|
||||||
Seek (LastFile, 0);
|
Seek (LastFile, 0);
|
||||||
|
|
||||||
LastError := IoResult;
|
LastError := IoResult;
|
||||||
While ((Not Eof(LastFile)) and (LastError = 0) And (Not Found)) Do
|
|
||||||
Begin
|
While ((Not Eof(LastFile)) and (LastError = 0) And (Not Found)) Do Begin
|
||||||
LastStart := FilePos(LastFile);
|
LastStart := FilePos(LastFile);
|
||||||
|
|
||||||
BlockRead (LastFile, LastBuf^, LastSize, NumRead);
|
BlockRead (LastFile, LastBuf^, LastSize, NumRead);
|
||||||
|
|
||||||
LastError := IoResult;
|
LastError := IoResult;
|
||||||
For i := 1 to NumRead Do Begin
|
|
||||||
If LastBuf^[i].UserNum = UNum Then
|
For Count := 1 to NumRead Do Begin
|
||||||
Begin
|
If LastBuf^[Count].UserNum = UNum Then Begin
|
||||||
Found := True;
|
Found := True;
|
||||||
FindLastRead := LastStart + i - 1;
|
FindLastRead := LastStart + Count - 1;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
Dispose(LastBuf);
|
|
||||||
End;
|
|
||||||
|
|
||||||
|
Dispose (LastBuf);
|
||||||
|
End;
|
||||||
|
|
||||||
Function TMsgBaseJAM.GetLastRead (UNum: LongInt) : LongInt;
|
Function TMsgBaseJAM.GetLastRead (UNum: LongInt) : LongInt;
|
||||||
Var
|
Var
|
||||||
|
@ -1695,14 +1708,20 @@ Var
|
||||||
TmpLast : JamLastType;
|
TmpLast : JamLastType;
|
||||||
Begin
|
Begin
|
||||||
Assign (LastFile, JM^.MsgPath + '.jlr');
|
Assign (LastFile, JM^.MsgPath + '.jlr');
|
||||||
|
|
||||||
FileMode := fmReadWrite + fmDenyNone;
|
FileMode := fmReadWrite + fmDenyNone;
|
||||||
|
|
||||||
Reset (LastFile, SizeOf(JamLastType));
|
Reset (LastFile, SizeOf(JamLastType));
|
||||||
|
|
||||||
Error := IoResult;
|
Error := IoResult;
|
||||||
RecNum := FindLastRead(LastFile, UNum);
|
RecNum := FindLastRead(LastFile, UNum);
|
||||||
|
|
||||||
If RecNum >= 0 Then Begin
|
If RecNum >= 0 Then Begin
|
||||||
Seek (LastFile, RecNum);
|
Seek (LastFile, RecNum);
|
||||||
|
|
||||||
If Error = 0 Then Begin
|
If Error = 0 Then Begin
|
||||||
BlockRead (LastFile, TmpLast, 1);
|
BlockRead (LastFile, TmpLast, 1);
|
||||||
|
|
||||||
Error := IoResult;
|
Error := IoResult;
|
||||||
GetLastRead := TmpLast.HighRead;
|
GetLastRead := TmpLast.HighRead;
|
||||||
End;
|
End;
|
||||||
|
@ -1710,6 +1729,7 @@ Begin
|
||||||
GetLastRead := 0;
|
GetLastRead := 0;
|
||||||
|
|
||||||
Close (LastFile);
|
Close (LastFile);
|
||||||
|
|
||||||
Error := IoResult;
|
Error := IoResult;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
@ -1718,26 +1738,36 @@ Procedure TMsgBaseJAM.SetLastRead(UNum: LongInt; LR: LongInt);
|
||||||
RecNum : LongInt;
|
RecNum : LongInt;
|
||||||
LastFile : File;
|
LastFile : File;
|
||||||
TmpLast : JamLastType;
|
TmpLast : JamLastType;
|
||||||
|
|
||||||
Begin
|
Begin
|
||||||
Assign (LastFile, JM^.MsgPath + '.jlr');
|
Assign (LastFile, JM^.MsgPath + '.jlr');
|
||||||
|
|
||||||
FileMode := fmReadWrite + fmDenyNone;
|
FileMode := fmReadWrite + fmDenyNone;
|
||||||
|
|
||||||
Reset (LastFile, SizeOf(JamLastType));
|
Reset (LastFile, SizeOf(JamLastType));
|
||||||
|
|
||||||
Error := IoResult;
|
Error := IoResult;
|
||||||
|
|
||||||
If Error <> 0 Then ReWrite(LastFile, SizeOf(JamLastType));
|
If Error <> 0 Then ReWrite(LastFile, SizeOf(JamLastType));
|
||||||
|
|
||||||
Error := IoResult;
|
Error := IoResult;
|
||||||
RecNum := FindLastRead(LastFile, UNum);
|
RecNum := FindLastRead(LastFile, UNum);
|
||||||
|
|
||||||
If RecNum >= 0 Then Begin
|
If RecNum >= 0 Then Begin
|
||||||
Seek (LastFile, RecNum);
|
Seek (LastFile, RecNum);
|
||||||
|
|
||||||
If Error = 0 Then Begin
|
If Error = 0 Then Begin
|
||||||
BlockRead (LastFile, TmpLast, 1);
|
BlockRead (LastFile, TmpLast, 1);
|
||||||
|
|
||||||
Error := IoResult;
|
Error := IoResult;
|
||||||
|
|
||||||
TmpLast.HighRead := LR;
|
TmpLast.HighRead := LR;
|
||||||
TmpLast.LastRead := LR;
|
TmpLast.LastRead := LR;
|
||||||
|
|
||||||
If Error = 0 Then Begin
|
If Error = 0 Then Begin
|
||||||
Seek (LastFile, RecNum);
|
Seek (LastFile, RecNum);
|
||||||
Error := IoResult;
|
Error := IoResult;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
If Error = 0 Then Begin
|
If Error = 0 Then Begin
|
||||||
BlockWrite (LastFile, TmpLast, 1);
|
BlockWrite (LastFile, TmpLast, 1);
|
||||||
Error := IoResult;
|
Error := IoResult;
|
||||||
|
@ -1748,18 +1778,22 @@ Procedure TMsgBaseJAM.SetLastRead(UNum: LongInt; LR: LongInt);
|
||||||
TmpLast.HighRead := Lr;
|
TmpLast.HighRead := Lr;
|
||||||
TmpLast.NameCrc := UNum;
|
TmpLast.NameCrc := UNum;
|
||||||
TmpLast.LastRead := Lr;
|
TmpLast.LastRead := Lr;
|
||||||
|
|
||||||
Seek (LastFile, FileSize(LastFile));
|
Seek (LastFile, FileSize(LastFile));
|
||||||
|
|
||||||
Error := IoResult;
|
Error := IoResult;
|
||||||
|
|
||||||
If Error = 0 Then Begin
|
If Error = 0 Then Begin
|
||||||
BlockWrite (LastFile, TmpLast, 1);
|
BlockWrite (LastFile, TmpLast, 1);
|
||||||
Error := IoResult;
|
Error := IoResult;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Close (LastFile);
|
Close (LastFile);
|
||||||
|
|
||||||
Error := IoResult;
|
Error := IoResult;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
Function TMsgBaseJAM.GetTxtPos : LongInt;
|
Function TMsgBaseJAM.GetTxtPos : LongInt;
|
||||||
Begin
|
Begin
|
||||||
GetTxtPos := JM^.TxtPos;
|
GetTxtPos := JM^.TxtPos;
|
||||||
|
@ -1797,7 +1831,9 @@ Var
|
||||||
LockError: Word;
|
LockError: Word;
|
||||||
Begin
|
Begin
|
||||||
LockError := 0;
|
LockError := 0;
|
||||||
|
|
||||||
If JM^.LockCount > 0 Then Dec(JM^.LockCount);
|
If JM^.LockCount > 0 Then Dec(JM^.LockCount);
|
||||||
|
|
||||||
If JM^.LockCount = 0 Then Begin
|
If JM^.LockCount = 0 Then Begin
|
||||||
If LockError = 0 Then Begin
|
If LockError = 0 Then Begin
|
||||||
// LockError := UnLockFile(JM^.HdrFile, 0, 1);
|
// LockError := UnLockFile(JM^.HdrFile, 0, 1);
|
||||||
|
@ -1811,6 +1847,7 @@ Begin
|
||||||
LockError := IoResult;
|
LockError := IoResult;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
UnLockMsgBase := (LockError = 0);
|
UnLockMsgBase := (LockError = 0);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
@ -1830,9 +1867,12 @@ Function TMsgBaseJAM.ReReadIdx(Var IdxLoc : LongInt) : Word;
|
||||||
Begin
|
Begin
|
||||||
ReReadIdx := 0;
|
ReReadIdx := 0;
|
||||||
IdxLoc := JM^.CurrMsgNum - JM^.BaseHdr.BaseMsgNum;
|
IdxLoc := JM^.CurrMsgNum - JM^.BaseHdr.BaseMsgNum;
|
||||||
|
|
||||||
If ((IdxLoc < JM^.IdxStart) OR (IdxLoc >= (JM^.IdxStart + JM^.IdxRead))) Then Begin
|
If ((IdxLoc < JM^.IdxStart) OR (IdxLoc >= (JM^.IdxStart + JM^.IdxRead))) Then Begin
|
||||||
JM^.IdxStart := IdxLoc - 30;
|
JM^.IdxStart := IdxLoc - 30;
|
||||||
|
|
||||||
If JM^.IdxStart < 0 Then JM^.IdxStart := 0;
|
If JM^.IdxStart < 0 Then JM^.IdxStart := 0;
|
||||||
|
|
||||||
ReReadIdx := ReadIdx;
|
ReReadIdx := ReadIdx;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
|
@ -135,7 +135,6 @@ Type
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Type
|
Type
|
||||||
|
|
||||||
PMsgBaseSquish = ^TMsgBaseSquish;
|
PMsgBaseSquish = ^TMsgBaseSquish;
|
||||||
TMsgBaseSquish = Object(TMsgBaseAbs)
|
TMsgBaseSquish = Object(TMsgBaseAbs)
|
||||||
SqInfo : ^SqInfoType;
|
SqInfo : ^SqInfoType;
|
||||||
|
@ -247,13 +246,13 @@ Type
|
||||||
Procedure MsgStartUp; Virtual; {Set up message}
|
Procedure MsgStartUp; Virtual; {Set up message}
|
||||||
Procedure MsgTxtStartUp; Virtual; {Set up for msg text}
|
Procedure MsgTxtStartUp; Virtual; {Set up for msg text}
|
||||||
Procedure SetMailType(MT: MsgMailType); Virtual; {Set message base type}
|
Procedure SetMailType(MT: MsgMailType); Virtual; {Set message base type}
|
||||||
Function GetSubArea: Word; Virtual; {Get sub area number}
|
// Function GetSubArea: Word; Virtual; {Get sub area number}
|
||||||
Procedure ReWriteHdr; Virtual; {Rewrite msg header after changes}
|
Procedure ReWriteHdr; Virtual; {Rewrite msg header after changes}
|
||||||
Procedure DeleteMsg; Virtual; {Delete current message}
|
Procedure DeleteMsg; Virtual; {Delete current message}
|
||||||
Procedure LoadFree; Virtual; {Load freelist into memory}
|
Procedure LoadFree; Virtual; {Load freelist into memory}
|
||||||
Function NumberOfMsgs: LongInt; Virtual; {Number of messages}
|
Function NumberOfMsgs: LongInt; Virtual; {Number of messages}
|
||||||
Procedure SetEcho(ES: Boolean); Virtual; {Set echo status}
|
Procedure SetEcho(ES: Boolean); Virtual; {Set echo status}
|
||||||
Function IsEchoed: Boolean; Virtual; {Is current msg unmoved echomail msg}
|
// Function IsEchoed: Boolean; Virtual; {Is current msg unmoved echomail msg}
|
||||||
Function GetLastRead(UNum: LongInt): LongInt; Virtual; {Get last read for user num}
|
Function GetLastRead(UNum: LongInt): LongInt; Virtual; {Get last read for user num}
|
||||||
Procedure SetLastRead(UNum: LongInt; LR: LongInt); Virtual; {Set last read}
|
Procedure SetLastRead(UNum: LongInt; LR: LongInt); Virtual; {Set last read}
|
||||||
Function GetMsgLoc: LongInt; Virtual; {To allow reseeking to message}
|
Function GetMsgLoc: LongInt; Virtual; {To allow reseeking to message}
|
||||||
|
@ -330,6 +329,7 @@ End;
|
||||||
Procedure TMsgBaseSquish.SetMsgPath(FN: String);
|
Procedure TMsgBaseSquish.SetMsgPath(FN: String);
|
||||||
Begin
|
Begin
|
||||||
SqInfo^.FN := FExpand(FN);
|
SqInfo^.FN := FExpand(FN);
|
||||||
|
|
||||||
If Pos('.', SqInfo^.FN) > 0 Then
|
If Pos('.', SqInfo^.FN) > 0 Then
|
||||||
SqInfo^.FN := Copy(SqInfo^.FN,1,Pos('.', SqInfo^.FN) - 1);
|
SqInfo^.FN := Copy(SqInfo^.FN,1,Pos('.', SqInfo^.FN) - 1);
|
||||||
End;
|
End;
|
||||||
|
@ -338,6 +338,7 @@ Function TMsgBaseSquish.OpenMsgBase: Boolean;
|
||||||
Begin
|
Begin
|
||||||
If SqiOpen Then Begin
|
If SqiOpen Then Begin
|
||||||
OpenMsgBase := SqdOpen;
|
OpenMsgBase := SqdOpen;
|
||||||
|
|
||||||
ReadIdx;
|
ReadIdx;
|
||||||
End Else
|
End Else
|
||||||
OpenMsgBase := False;
|
OpenMsgBase := False;
|
||||||
|
@ -348,8 +349,11 @@ Var
|
||||||
NumRead: LongInt;
|
NumRead: LongInt;
|
||||||
Begin
|
Begin
|
||||||
If Not SqInfo^.SqdOpened Then Begin
|
If Not SqInfo^.SqdOpened Then Begin
|
||||||
|
|
||||||
Assign(SqInfo^.SqdFile, SqInfo^.FN + '.sqd');
|
Assign(SqInfo^.SqdFile, SqInfo^.FN + '.sqd');
|
||||||
|
|
||||||
FileMode := 66; {ReadWrite + DenyNone}
|
FileMode := 66; {ReadWrite + DenyNone}
|
||||||
|
|
||||||
If Not ioReset(SqInfo^.SqdFile, 1, fmreadwrite + fmdenynone) Then
|
If Not ioReset(SqInfo^.SqdFile, 1, fmreadwrite + fmdenynone) Then
|
||||||
SqdOpen := False
|
SqdOpen := False
|
||||||
Else Begin
|
Else Begin
|
||||||
|
@ -391,18 +395,21 @@ Procedure TMsgBaseSquish.CloseMsgBase;
|
||||||
Begin
|
Begin
|
||||||
SqdClose;
|
SqdClose;
|
||||||
SqiClose;
|
SqiClose;
|
||||||
FileMode := fmReadWrite + fmDenyNone; { shouldn't be needed... }
|
|
||||||
|
FileMode := fmRWDN; { shouldn't be needed... }
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function TMsgBaseSquish.CreateMsgBase(MaxMsg: Word; MaxDays: Word): Boolean;
|
Function TMsgBaseSquish.CreateMsgBase(MaxMsg: Word; MaxDays: Word): Boolean;
|
||||||
Begin
|
Begin
|
||||||
If Not SqInfo^.SqdOpened Then Begin
|
If Not SqInfo^.SqdOpened Then Begin
|
||||||
FillChar(SqInfo^.SqBase, SizeOf(SqInfo^.SqBase), 0);
|
FillChar(SqInfo^.SqBase, SizeOf(SqInfo^.SqBase), 0);
|
||||||
|
|
||||||
SqInfo^.SqBase.Len := 256;
|
SqInfo^.SqBase.Len := 256;
|
||||||
SqInfo^.SqBase.SqHdrSize := SqFSize;
|
SqInfo^.SqBase.SqHdrSize := SqFSize;
|
||||||
SqInfo^.SqBase.UID := 1;
|
SqInfo^.SqBase.UID := 1;
|
||||||
SqInfo^.SqBase.NumMsg := 0;
|
SqInfo^.SqBase.NumMsg := 0;
|
||||||
SqInfo^.SqBase.Base := SqInfo^.FN;
|
SqInfo^.SqBase.Base := SqInfo^.FN;
|
||||||
|
|
||||||
Str2Az(SqInfo^.FN, 78, SqInfo^.SqBase.Base);
|
Str2Az(SqInfo^.FN, 78, SqInfo^.SqBase.Base);
|
||||||
|
|
||||||
SqInfo^.SqBase.MaxMsg := MaxMsg;
|
SqInfo^.SqBase.MaxMsg := MaxMsg;
|
||||||
|
@ -410,8 +417,9 @@ Begin
|
||||||
SqInfo^.SqBase.EndFrame := SqInfo^.SqBase.Len;
|
SqInfo^.SqBase.EndFrame := SqInfo^.SqBase.Len;
|
||||||
|
|
||||||
CreateMsgBase := (SaveFile(SqInfo^.FN + '.sqd', SqInfo^.SqBase, SqInfo^.SqBase.Len) = 0);
|
CreateMsgBase := (SaveFile(SqInfo^.FN + '.sqd', SqInfo^.SqBase, SqInfo^.SqBase.Len) = 0);
|
||||||
If SaveFile(SqInfo^.FN + '.sqi', SqInfo^.SqBase, 0) = 0 Then;
|
|
||||||
If SaveFile(SqInfo^.FN + '.sql', SqInfo^.SqBase, 0) = 0 Then;
|
SaveFile (SqInfo^.FN + '.sqi', SqInfo^.SqBase, 0);
|
||||||
|
SaveFile (SqInfo^.FN + '.sql', SqInfo^.SqBase, 0);
|
||||||
End Else
|
End Else
|
||||||
CreateMsgBase := False;
|
CreateMsgBase := False;
|
||||||
End;
|
End;
|
||||||
|
@ -424,7 +432,9 @@ End;
|
||||||
Procedure TMsgBaseSquish.SqdClose;
|
Procedure TMsgBaseSquish.SqdClose;
|
||||||
Begin
|
Begin
|
||||||
If SqInfo^.SqdOpened Then Close(SqInfo^.SqdFile);
|
If SqInfo^.SqdOpened Then Close(SqInfo^.SqdFile);
|
||||||
|
|
||||||
If IOResult <> 0 Then;
|
If IOResult <> 0 Then;
|
||||||
|
|
||||||
SqInfo^.SqdOpened := False;
|
SqInfo^.SqdOpened := False;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
@ -532,8 +542,7 @@ Function TMsgBaseSquish.GetDate: String; {Get message date mm-dd-yy}
|
||||||
Var
|
Var
|
||||||
TmpDate: LongInt;
|
TmpDate: LongInt;
|
||||||
Begin
|
Begin
|
||||||
TmpDate := (SqInfo^.MsgHdr.DateWritten shr 16) +
|
TmpDate := (SqInfo^.MsgHdr.DateWritten shr 16) + ((SqInfo^.MsgHdr.DateWritten and $ffff) shl 16);
|
||||||
((SqInfo^.MsgHdr.DateWritten and $ffff) shl 16);
|
|
||||||
GetDate := DateDos2Str(TmpDate, 1);
|
GetDate := DateDos2Str(TmpDate, 1);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
@ -541,8 +550,7 @@ Function TMsgBaseSquish.GetTime: String; {Get message time hh:mm}
|
||||||
Var
|
Var
|
||||||
TmpDate: LongInt;
|
TmpDate: LongInt;
|
||||||
Begin
|
Begin
|
||||||
TmpDate := (SqInfo^.MsgHdr.DateWritten shr 16) +
|
TmpDate := (SqInfo^.MsgHdr.DateWritten shr 16) + ((SqInfo^.MsgHdr.DateWritten and $ffff) shl 16);
|
||||||
((SqInfo^.MsgHdr.DateWritten and $ffff) shl 16);
|
|
||||||
GetTime := TimeDos2Str(TmpDate, False);
|
GetTime := TimeDos2Str(TmpDate, False);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
@ -584,12 +592,17 @@ Var
|
||||||
Begin
|
Begin
|
||||||
Hash := 0;
|
Hash := 0;
|
||||||
Counter := 1;
|
Counter := 1;
|
||||||
|
|
||||||
While Counter <= Length(Name) Do Begin
|
While Counter <= Length(Name) Do Begin
|
||||||
|
|
||||||
Hash := (Hash shl 4) + Ord(LoCase(Name[Counter]));
|
Hash := (Hash shl 4) + Ord(LoCase(Name[Counter]));
|
||||||
Tmp := Hash and $F0000000;
|
Tmp := Hash and $F0000000;
|
||||||
|
|
||||||
If (Tmp <> 0) Then Hash := (Hash or (Tmp shr 24)) or Tmp;
|
If (Tmp <> 0) Then Hash := (Hash or (Tmp shr 24)) or Tmp;
|
||||||
|
|
||||||
Inc (Counter);
|
Inc (Counter);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
SqHashName := Hash and $7fffffff;
|
SqHashName := Hash and $7fffffff;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
@ -603,7 +616,9 @@ Var
|
||||||
NumRead : LongInt;
|
NumRead : LongInt;
|
||||||
Begin
|
Begin
|
||||||
Seek (SqInfo^.SqdFile, FPos);
|
Seek (SqInfo^.SqdFile, FPos);
|
||||||
|
|
||||||
SqInfo^.Error := IoResult;
|
SqInfo^.Error := IoResult;
|
||||||
|
|
||||||
If SqInfo^.Error = 0 Then Begin
|
If SqInfo^.Error = 0 Then Begin
|
||||||
If Not ioBlockRead (SqInfo^.SqdFile, Frame, SizeOf(SqFrameHdrType), NumRead) Then
|
If Not ioBlockRead (SqInfo^.SqdFile, Frame, SizeOf(SqFrameHdrType), NumRead) Then
|
||||||
SqInfo^.Error := ioCode;
|
SqInfo^.Error := ioCode;
|
||||||
|
@ -620,7 +635,9 @@ Var
|
||||||
Res : LongInt;
|
Res : LongInt;
|
||||||
Begin
|
Begin
|
||||||
Seek (SqInfo^.SqdFile, FPos);
|
Seek (SqInfo^.SqdFile, FPos);
|
||||||
|
|
||||||
SqInfo^.Error := IoResult;
|
SqInfo^.Error := IoResult;
|
||||||
|
|
||||||
If SqInfo^.Error = 0 Then Begin
|
If SqInfo^.Error = 0 Then Begin
|
||||||
If Not ioBlockWrite(SqInfo^.SqdFile, Frame, SizeOf(SqFrameHdrType), Res) Then
|
If Not ioBlockWrite(SqInfo^.SqdFile, Frame, SizeOf(SqFrameHdrType), Res) Then
|
||||||
SqInfo^.Error := ioCode;
|
SqInfo^.Error := ioCode;
|
||||||
|
@ -633,12 +650,17 @@ Var
|
||||||
Begin
|
Begin
|
||||||
If Frame.PrevFrame <> 0 Then Begin
|
If Frame.PrevFrame <> 0 Then Begin
|
||||||
ReadVarFrame(TmpFrame, Frame.PrevFrame);
|
ReadVarFrame(TmpFrame, Frame.PrevFrame);
|
||||||
|
|
||||||
TmpFrame.NextFrame := Frame.NextFrame;
|
TmpFrame.NextFrame := Frame.NextFrame;
|
||||||
|
|
||||||
WriteVarFrame(TmpFrame, Frame.PrevFrame);
|
WriteVarFrame(TmpFrame, Frame.PrevFrame);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
If Frame.NextFrame <> 0 Then Begin
|
If Frame.NextFrame <> 0 Then Begin
|
||||||
ReadVarFrame(TmpFrame, Frame.NextFrame);
|
ReadVarFrame(TmpFrame, Frame.NextFrame);
|
||||||
|
|
||||||
TmpFrame.PrevFrame := Frame.PrevFrame;
|
TmpFrame.PrevFrame := Frame.PrevFrame;
|
||||||
|
|
||||||
WriteVarFrame(TmpFrame, Frame.NextFrame);
|
WriteVarFrame(TmpFrame, Frame.NextFrame);
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
@ -653,9 +675,11 @@ Begin
|
||||||
FreeArray^[i].FreePos := 0;
|
FreeArray^[i].FreePos := 0;
|
||||||
FreeArray^[i].FreeSize := 0;
|
FreeArray^[i].FreeSize := 0;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
SqInfo^.FreeLoaded := True;
|
SqInfo^.FreeLoaded := True;
|
||||||
i := 0;
|
i := 0;
|
||||||
TmpPos := SqInfo^.SqBase.FirstFree;
|
TmpPos := SqInfo^.SqBase.FirstFree;
|
||||||
|
|
||||||
While ((TmpPos <> 0) and (i < MaxFree)) Do Begin
|
While ((TmpPos <> 0) and (i < MaxFree)) Do Begin
|
||||||
ReadVarFrame(TmpFrame, TmpPos);
|
ReadVarFrame(TmpFrame, TmpPos);
|
||||||
Inc(i);
|
Inc(i);
|
||||||
|
@ -663,6 +687,7 @@ Begin
|
||||||
FreeArray^[i].FreePos := TmpPos;
|
FreeArray^[i].FreePos := TmpPos;
|
||||||
TmpPos := TmpFrame.NextFrame;
|
TmpPos := TmpFrame.NextFrame;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
SqInfo^.HighestFree := i;
|
SqInfo^.HighestFree := i;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
@ -693,6 +718,7 @@ Begin
|
||||||
|
|
||||||
If FramePos <> 0 Then Begin
|
If FramePos <> 0 Then Begin
|
||||||
ReadVarFrame(TmpFrame, FramePos);
|
ReadVarFrame(TmpFrame, FramePos);
|
||||||
|
|
||||||
FreeArray^[BestIdx].FreePos := 0;
|
FreeArray^[BestIdx].FreePos := 0;
|
||||||
FreeArray^[BestIdx].FreeSize := 0;
|
FreeArray^[BestIdx].FreeSize := 0;
|
||||||
End;
|
End;
|
||||||
|
@ -1301,10 +1327,10 @@ Begin
|
||||||
IsPriv := ((SqInfo^.MsgHdr.Attr and SqMsgPriv) <> 0);
|
IsPriv := ((SqInfo^.MsgHdr.Attr and SqMsgPriv) <> 0);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function TMsgBaseSquish.IsEchoed: Boolean;
|
//Function TMsgBaseSquish.IsEchoed: Boolean;
|
||||||
Begin
|
//Begin
|
||||||
IsEchoed := ((SqInfo^.MsgHdr.Attr and SqMsgScanned) = 0);
|
// IsEchoed := ((SqInfo^.MsgHdr.Attr and SqMsgScanned) = 0);
|
||||||
End;
|
//End;
|
||||||
|
|
||||||
Function TMsgBaseSquish.IsDeleted: Boolean; {Is current msg deleted}
|
Function TMsgBaseSquish.IsDeleted: Boolean; {Is current msg deleted}
|
||||||
Begin
|
Begin
|
||||||
|
@ -1423,10 +1449,10 @@ Procedure TMsgBaseSquish.SetMailType(MT: MsgMailType);
|
||||||
Begin
|
Begin
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function TMsgBaseSquish.GetSubArea: Word;
|
//Function TMsgBaseSquish.GetSubArea: Word;
|
||||||
Begin
|
//Begin
|
||||||
GetSubArea := 0;
|
// GetSubArea := 0;
|
||||||
End;
|
//End;
|
||||||
|
|
||||||
Procedure TMsgBaseSquish.ReWriteHdr;
|
Procedure TMsgBaseSquish.ReWriteHdr;
|
||||||
Var
|
Var
|
||||||
|
|
|
@ -256,6 +256,8 @@ Begin
|
||||||
|
|
||||||
Client := TIOSocket.Create;
|
Client := TIOSocket.Create;
|
||||||
|
|
||||||
|
Client.FTelnetClient := True;
|
||||||
|
|
||||||
If Not Client.Connect('127.0.0.1', bbsConfig.InetTNPort) Then
|
If Not Client.Connect('127.0.0.1', bbsConfig.InetTNPort) Then
|
||||||
Console.WriteLine('Unable to connect')
|
Console.WriteLine('Unable to connect')
|
||||||
Else Begin
|
Else Begin
|
||||||
|
|
|
@ -104,7 +104,7 @@ Var
|
||||||
NewCmd : String;
|
NewCmd : String;
|
||||||
NewData : String;
|
NewData : String;
|
||||||
Begin
|
Begin
|
||||||
NewCmd := strWordGet(1, Data, ' ');
|
NewCmd := strUpper(strWordGet(1, Data, ' '));
|
||||||
NewData := Copy(Data, Pos(' ', Data) + 1, 255);
|
NewData := Copy(Data, Pos(' ', Data) + 1, 255);
|
||||||
|
|
||||||
If NewCmd = 'USER' Then Begin
|
If NewCmd = 'USER' Then Begin
|
||||||
|
|
|
@ -292,6 +292,9 @@ Begin
|
||||||
AddProc ({$IFDEF MPLPARSER} 'getmbasestats', {$ENDIF} 'lLLL', iBool); // 541
|
AddProc ({$IFDEF MPLPARSER} 'getmbasestats', {$ENDIF} 'lLLL', iBool); // 541
|
||||||
AddProc ({$IFDEF MPLPARSER} 'writexy', {$ENDIF} 'bbbs', iNone); // 542
|
AddProc ({$IFDEF MPLPARSER} 'writexy', {$ENDIF} 'bbbs', iNone); // 542
|
||||||
AddProc ({$IFDEF MPLPARSER} 'writexypipe', {$ENDIF} 'bbbis', iNone); // 543
|
AddProc ({$IFDEF MPLPARSER} 'writexypipe', {$ENDIF} 'bbbis', iNone); // 543
|
||||||
|
AddProc ({$IFDEF MPLPARSER} 'msgeditor', {$ENDIF} 'iIiiosS', iBool); // 544
|
||||||
|
AddProc ({$IFDEF MPLPARSER} 'msgeditget', {$ENDIF} 'i', iString); // 545
|
||||||
|
AddProc ({$IFDEF MPLPARSER} 'msgeditset', {$ENDIF} 'is', iNone); // 546
|
||||||
|
|
||||||
{ END OF PROCEDURE DEFINITIONS }
|
{ END OF PROCEDURE DEFINITIONS }
|
||||||
|
|
||||||
|
|
|
@ -837,7 +837,17 @@ Begin
|
||||||
If RecData[VarData[VN]^.RecID]^.Fields[Count].ArrDem > 0 Then Begin
|
If RecData[VarData[VN]^.RecID]^.Fields[Count].ArrDem > 0 Then Begin
|
||||||
GetStr(tkw[wOpenArray], True, False);
|
GetStr(tkw[wOpenArray], True, False);
|
||||||
|
|
||||||
|
// output if zero based here asdf asdf
|
||||||
|
|
||||||
For X := 1 to RecData[VarData[VN]^.RecID]^.Fields[Count].ArrDem Do Begin
|
For X := 1 to RecData[VarData[VN]^.RecID]^.Fields[Count].ArrDem Do Begin
|
||||||
|
|
||||||
|
OutWord(RecData[VarData[VN]^.RecID]^.Fields[Count].ArrStart[X]);
|
||||||
|
|
||||||
|
// If RecData[VarData[VN]^.RecID]^.Fields[Count].ArrStart[X] = 0 Then
|
||||||
|
// OutWord(0)
|
||||||
|
// Else
|
||||||
|
// OutWord(1);
|
||||||
|
|
||||||
ParseVarNumber(True);
|
ParseVarNumber(True);
|
||||||
|
|
||||||
If X < RecData[VarData[VN]^.RecID]^.Fields[Count].ArrDem Then
|
If X < RecData[VarData[VN]^.RecID]^.Fields[Count].ArrDem Then
|
||||||
|
|
|
@ -452,6 +452,7 @@ Var
|
||||||
Count : Word;
|
Count : Word;
|
||||||
Temp : TArrayInfo;
|
Temp : TArrayInfo;
|
||||||
Offset : Word;
|
Offset : Word;
|
||||||
|
ArrStart : Word;
|
||||||
Begin
|
Begin
|
||||||
For Count := 1 to mplMaxArrayDem Do A[Count] := 1;
|
For Count := 1 to mplMaxArrayDem Do A[Count] := 1;
|
||||||
|
|
||||||
|
@ -484,13 +485,17 @@ Begin
|
||||||
R.ArrDem := W;
|
R.ArrDem := W;
|
||||||
|
|
||||||
If R.ArrDem > 0 Then Begin
|
If R.ArrDem > 0 Then Begin
|
||||||
For Count := 1 to R.ArrDem Do
|
|
||||||
Temp[Count] := Trunc(EvaluateNumber);
|
|
||||||
|
|
||||||
Offset := 0;
|
Offset := 0;
|
||||||
|
|
||||||
For Count := 1 to R.ArrDem Do
|
For Count := 1 to R.ArrDem Do Begin
|
||||||
Offset := Offset + ((Temp[Count] - 1) * R.OneSize);
|
NextWord;
|
||||||
|
|
||||||
|
ArrStart := W;
|
||||||
|
|
||||||
|
Temp[Count] := Trunc(EvaluateNumber);
|
||||||
|
|
||||||
|
Offset := Offset + ((Temp[Count] - ArrStart) * R.OneSize);
|
||||||
|
End;
|
||||||
|
|
||||||
R.Offset := R.Offset + Offset;
|
R.Offset := R.Offset + Offset;
|
||||||
End;
|
End;
|
||||||
|
@ -1018,16 +1023,8 @@ Begin
|
||||||
RecID := FindVariable(W);
|
RecID := FindVariable(W);
|
||||||
|
|
||||||
CheckArray (RecID, AD, RI);
|
CheckArray (RecID, AD, RI);
|
||||||
//asdf DEBUG DEBUG
|
|
||||||
// how do we get the real size of the shit here?
|
|
||||||
// i added Checkarray here and ParseElement in ParseVarRecord for compiler
|
|
||||||
//session.io.outfullln('datasize=' + stri2s(vardata[recid]^.datasize));
|
|
||||||
//session.io.outfullln('varsize=' + stri2s(vardata[recid]^.varsize));
|
|
||||||
//session.io.outfullln('|PN');
|
|
||||||
|
|
||||||
Move (GetDataPtr(RecID, AD, RI)^, GetDataPtr(VarNum, ArrayData, RecInfo)^, RecInfo.OneSize {VarData[RecID]^.VarSize});
|
Move (GetDataPtr(RecID, AD, RI)^, GetDataPtr(VarNum, ArrayData, RecInfo)^, RecInfo.OneSize {VarData[RecID]^.VarSize});
|
||||||
|
|
||||||
// Move (VarData[RecID]^.Data^, GetDataPtr(VarNum, ArrayData, RecInfo)^, VarData[RecID]^.DataSize);
|
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
@ -1144,7 +1141,7 @@ Begin
|
||||||
Result := DataSize;
|
Result := DataSize;
|
||||||
|
|
||||||
GetMem (Data, DataSize);
|
GetMem (Data, DataSize);
|
||||||
FillChar (Data^, DataSize, 0);
|
FillChar (Data^, DataSize, #0);
|
||||||
|
|
||||||
Kill := True;
|
Kill := True;
|
||||||
End;
|
End;
|
||||||
|
@ -1389,7 +1386,7 @@ Begin
|
||||||
VarData[VarNum]^.Kill := False;
|
VarData[VarNum]^.Kill := False;
|
||||||
|
|
||||||
GetMem (VarData[VarNum]^.Data, VarData[VarNum]^.DataSize);
|
GetMem (VarData[VarNum]^.Data, VarData[VarNum]^.DataSize);
|
||||||
FillChar (VarData[VarNum]^.Data^, VarData[VarNum]^.DataSize, 0);
|
FillChar (VarData[VarNum]^.Data^, VarData[VarNum]^.DataSize, #0);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
ExecuteBlock (SavedVar);
|
ExecuteBlock (SavedVar);
|
||||||
|
@ -1903,6 +1900,25 @@ Begin
|
||||||
End;
|
End;
|
||||||
542 : WriteXY (Param[1].B, Param[2].B, Param[3].B, Param[4].S);
|
542 : WriteXY (Param[1].B, Param[2].B, Param[3].B, Param[4].S);
|
||||||
543 : WriteXYPipe (Param[1].B, Param[2].B, Param[3].B, Param[4].I, Param[5].S);
|
543 : WriteXYPipe (Param[1].B, Param[2].B, Param[3].B, Param[4].I, Param[5].S);
|
||||||
|
544 : Begin
|
||||||
|
TempBool := Editor(SmallInt(Pointer(Param[2].vData)^),
|
||||||
|
Param[3].I,
|
||||||
|
Param[4].I,
|
||||||
|
Param[5].O,
|
||||||
|
Param[6].S,
|
||||||
|
String(Pointer(Param[7].vData)^));
|
||||||
|
Store (TempBool, 1);
|
||||||
|
End;
|
||||||
|
545 : Begin
|
||||||
|
If (Param[1].I > 0) and (Param[1].I <= mysMaxMsgLines) Then
|
||||||
|
TempStr := Session.Msgs.MsgText[Param[1].I]
|
||||||
|
Else
|
||||||
|
TempStr := '';
|
||||||
|
|
||||||
|
Store (TempStr, 255);
|
||||||
|
End;
|
||||||
|
546 : If (Param[1].I > 0) and (Param[1].I <= mysMaxMsgLines) Then
|
||||||
|
Session.Msgs.MsgText[Param[1].I] := Param[2].S;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ Type
|
||||||
);
|
);
|
||||||
|
|
||||||
Const
|
Const
|
||||||
mplVer = '11B';
|
mplVer = '11C';
|
||||||
mplVersion = '[MPX ' + mplVer +']' + #26;
|
mplVersion = '[MPX ' + mplVer +']' + #26;
|
||||||
mplVerLength = 10;
|
mplVerLength = 10;
|
||||||
mplExtSource = '.mps';
|
mplExtSource = '.mps';
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
; - Mass upload files to all file bases (with FILE_ID.DIZ import)
|
; - Mass upload files to all file bases (with FILE_ID.DIZ import)
|
||||||
; - Generate Top 1 up to 99 Callers, Posters, Downloaders, Uploaders, PCR
|
; - Generate Top 1 up to 99 Callers, Posters, Downloaders, Uploaders, PCR
|
||||||
; - Import FILES.BBS into file bases
|
; - Import FILES.BBS into file bases
|
||||||
|
; - Generate all files listing
|
||||||
;
|
;
|
||||||
; ==========================================================================
|
; ==========================================================================
|
||||||
; ==========================================================================
|
; ==========================================================================
|
||||||
|
@ -41,11 +42,11 @@
|
||||||
Import_FIDONET.NA = false
|
Import_FIDONET.NA = false
|
||||||
Import_FILEBONE.NA = false
|
Import_FILEBONE.NA = false
|
||||||
Import_FILES.BBS = false
|
Import_FILES.BBS = false
|
||||||
MassUpload = false
|
MassUpload = true
|
||||||
GenerateTopLists = false
|
GenerateTopLists = false
|
||||||
|
GenerateAllFiles = false
|
||||||
|
|
||||||
; WIP next to be added:
|
; work in progress below
|
||||||
GenerateAllFiles = true
|
|
||||||
PurgeMessageBases = false
|
PurgeMessageBases = false
|
||||||
PackMessageBases = false
|
PackMessageBases = false
|
||||||
|
|
||||||
|
@ -262,14 +263,14 @@
|
||||||
|
|
||||||
[GenerateAllFiles]
|
[GenerateAllFiles]
|
||||||
|
|
||||||
; Generate all files list [NOT COMPLETED]
|
; Generate all files list
|
||||||
|
|
||||||
; Path / filename of output filename. If the path is not included then the
|
; Path / filename of output filename. If the path is not included then the
|
||||||
; file will be created in whatever the current working directory is.
|
; file will be created in whatever the current working directory is.
|
||||||
|
|
||||||
filename = allfiles.txt
|
filename = allfiles.txt
|
||||||
|
|
||||||
; features needed:
|
; ideas/features for the future?
|
||||||
; header, footer, baseheader, basefooter, exclude bases, uploader optional
|
; header, footer, baseheader, basefooter, exclude bases, uploader optional
|
||||||
; uploader line, format list line 1st,2nd line, space between files?
|
; uploader line, format list line 1st,2nd line, space between files?
|
||||||
|
|
||||||
|
|
|
@ -9,19 +9,133 @@ Procedure uAllFilesList;
|
||||||
Implementation
|
Implementation
|
||||||
|
|
||||||
Uses
|
Uses
|
||||||
|
m_DateTime,
|
||||||
m_Strings,
|
m_Strings,
|
||||||
|
m_FileIO,
|
||||||
mUtil_Common,
|
mUtil_Common,
|
||||||
mUtil_Status;
|
mUtil_Status;
|
||||||
|
|
||||||
Const
|
Const
|
||||||
AddedFiles : Cardinal = 0;
|
TotalFiles : Cardinal = 0;
|
||||||
|
TotalSize : Cardinal = 0;
|
||||||
|
TotalBases : Cardinal = 0;
|
||||||
|
BaseFiles : Cardinal = 0;
|
||||||
|
BaseSize : Cardinal = 0;
|
||||||
|
|
||||||
Procedure uAllFilesList;
|
Procedure uAllFilesList;
|
||||||
|
Var
|
||||||
|
OutFile : Text;
|
||||||
|
Buffer : Array[1..1024 * 4] of Char;
|
||||||
|
BaseFile : File of RecFileBase;
|
||||||
|
ListFile : File of RecFileList;
|
||||||
|
DescFile : File;
|
||||||
|
Base : RecFileBase;
|
||||||
|
List : RecFileList;
|
||||||
|
DescStr : String[50];
|
||||||
|
Count : LongInt;
|
||||||
Begin
|
Begin
|
||||||
ProcessName ('Generating AllFiles List', True);
|
ProcessName ('Generating AllFiles List', True);
|
||||||
ProcessResult (rWORKING, False);
|
ProcessResult (rWORKING, False);
|
||||||
|
|
||||||
ProcessStatus ('Added |15' + strI2S(AddedFiles) + ' |07file(s)');
|
Assign (OutFile, INI.ReadString(Header_ALLFILES, 'filename', 'allfiles.txt'));
|
||||||
|
SetTextBuf (OutFile, Buffer);
|
||||||
|
ReWrite (OutFile);
|
||||||
|
|
||||||
|
If IoResult <> 0 Then Begin
|
||||||
|
ProcessStatus ('Cannot create output file');
|
||||||
|
ProcessResult (rWARN, True);
|
||||||
|
|
||||||
|
Exit;
|
||||||
|
End;
|
||||||
|
|
||||||
|
Assign (BaseFile, bbsConfig.DataPath + 'fbases.dat');
|
||||||
|
|
||||||
|
If Not ioReset (BaseFile, SizeOf(RecFileBase), fmRWDN) Then Begin
|
||||||
|
ProcessStatus ('Cannot open fbases.dat');
|
||||||
|
ProcessResult (rWARN, True);
|
||||||
|
|
||||||
|
Close (OutFile);
|
||||||
|
|
||||||
|
Exit;
|
||||||
|
End;
|
||||||
|
|
||||||
|
While Not Eof(BaseFile) Do Begin
|
||||||
|
BaseFiles := 0;
|
||||||
|
BaseSize := 0;
|
||||||
|
|
||||||
|
Read (BaseFile, Base);
|
||||||
|
|
||||||
|
// If Excludedbase then continue;
|
||||||
|
|
||||||
|
Assign (ListFile, bbsConfig.DataPath + Base.FileName + '.dir');
|
||||||
|
Assign (DescFile, bbsConfig.DataPath + Base.FileName + '.des');
|
||||||
|
|
||||||
|
If Not ioReset (ListFile, SizeOf(RecFileList), fmRWDN) Then Continue;
|
||||||
|
|
||||||
|
If Not ioReset (DescFile, 1, fmRWDN) Then Begin
|
||||||
|
Close (ListFile);
|
||||||
|
|
||||||
|
Continue;
|
||||||
|
End;
|
||||||
|
|
||||||
|
While Not Eof(ListFile) Do Begin
|
||||||
|
Read (ListFile, List);
|
||||||
|
|
||||||
|
If List.Flags AND FDirDeleted <> 0 Then Continue;
|
||||||
|
// check exclude offline, exclude failed, etc
|
||||||
|
|
||||||
|
If BaseFiles = 0 Then Begin
|
||||||
|
Inc (TotalBases);
|
||||||
|
|
||||||
|
WriteLn (OutFile, '');
|
||||||
|
WriteLn (OutFile, strStripPipe(Base.Name));
|
||||||
|
WriteLn (OutFile, strRep('=', strMCILen(Base.Name)));
|
||||||
|
WriteLn (OutFile, '');
|
||||||
|
WriteLn (OutFile, 'Filename Size Date Description');
|
||||||
|
WriteLn (OutFile, strrep('-', 79));
|
||||||
|
End;
|
||||||
|
|
||||||
|
Inc (BaseFiles);
|
||||||
|
Inc (TotalFiles);
|
||||||
|
Inc (BaseSize, List.Size DIV 1024);
|
||||||
|
Inc (TotalSize, List.Size DIV 1024);
|
||||||
|
|
||||||
|
WriteLn (OutFile, List.FileName);
|
||||||
|
Write (OutFile, ' ' + strPadL(strComma(List.Size), 11, ' ') + ' ' + DateDos2Str(List.DateTime, 1 {dateformat}) + ' ');
|
||||||
|
|
||||||
|
Seek (DescFile, List.DescPtr);
|
||||||
|
|
||||||
|
For Count := 1 to List.DescLines Do Begin
|
||||||
|
BlockRead (DescFile, DescStr[0], 1);
|
||||||
|
BlockRead (DescFile, DescStr[1], Ord(DescStr[0]));
|
||||||
|
|
||||||
|
If Count = 1 Then
|
||||||
|
WriteLn (OutFile, DescStr)
|
||||||
|
Else
|
||||||
|
WriteLn (OutFile, strRep(' ', 27) + DescStr);
|
||||||
|
End;
|
||||||
|
End;
|
||||||
|
|
||||||
|
Close (ListFile);
|
||||||
|
Close (DescFile);
|
||||||
|
|
||||||
|
If BaseFiles > 0 Then Begin
|
||||||
|
WriteLn (OutFile, strRep('-', 79));
|
||||||
|
WriteLn (OutFile, 'Total files: ' + strComma(BaseFiles) + ' (' + strComma(BaseSize DIV 1024) + 'mb)');
|
||||||
|
End;
|
||||||
|
End;
|
||||||
|
|
||||||
|
If TotalFiles > 0 Then Begin
|
||||||
|
WriteLn (OutFile, '');
|
||||||
|
WriteLn (OutFile, '* Total bases: ' + strComma(TotalBases));
|
||||||
|
WriteLn (OutFile, '* Total files: ' + strComma(TotalFiles));
|
||||||
|
WriteLn (OutFile, '* Total size: ' + strComma(TotalSize DIV 1024) + 'mb');
|
||||||
|
End;
|
||||||
|
|
||||||
|
Close (BaseFile);
|
||||||
|
Close (OutFile);
|
||||||
|
|
||||||
|
ProcessStatus ('Added |15' + strI2S(TotalFiles) + ' |07file(s)');
|
||||||
ProcessResult (rDONE, True);
|
ProcessResult (rDONE, True);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
|
@ -228,7 +228,7 @@ Begin
|
||||||
|
|
||||||
Read (ArcFile, Arc);
|
Read (ArcFile, Arc);
|
||||||
|
|
||||||
If (Not Arc.Active) or (Arc.OSType <> OSType) Then Continue;
|
If (Not Arc.Active) or ((Arc.OSType <> OSType) and (Arc.OSType <> 3)) Then Continue;
|
||||||
|
|
||||||
If strUpper(Arc.Ext) = Temp Then Break;
|
If strUpper(Arc.Ext) = Temp Then Break;
|
||||||
Until False;
|
Until False;
|
||||||
|
|
|
@ -53,7 +53,7 @@ Const
|
||||||
UpdateNode = 500;
|
UpdateNode = 500;
|
||||||
UpdateStats = 6000 * 10; // 10 minutes
|
UpdateStats = 6000 * 10; // 10 minutes
|
||||||
|
|
||||||
AutoSnoop : Boolean = True;
|
AutoSnoop : Boolean = False;
|
||||||
AutoSnoopID : LongInt = 0;
|
AutoSnoopID : LongInt = 0;
|
||||||
|
|
||||||
Type
|
Type
|
||||||
|
@ -613,6 +613,8 @@ Begin
|
||||||
|
|
||||||
Client := TIOSocket.Create;
|
Client := TIOSocket.Create;
|
||||||
|
|
||||||
|
Client.FTelnetClient := True;
|
||||||
|
|
||||||
If Not Client.Connect('127.0.0.1', Config.INetTNPort) Then
|
If Not Client.Connect('127.0.0.1', Config.INetTNPort) Then
|
||||||
ShowMsgBox (0, 'Unable to connect')
|
ShowMsgBox (0, 'Unable to connect')
|
||||||
Else Begin
|
Else Begin
|
||||||
|
|
|
@ -64,6 +64,8 @@ Const
|
||||||
fn_SemFileEcho = 'echomail.now';
|
fn_SemFileEcho = 'echomail.now';
|
||||||
fn_SemFileNews = 'newsmail.now';
|
fn_SemFileNews = 'newsmail.now';
|
||||||
fn_SemFileNet = 'netmail.now';
|
fn_SemFileNet = 'netmail.now';
|
||||||
|
fn_tplMsgEdit = 'ansiedit';
|
||||||
|
fn_tplTextEdit = 'ansitext';
|
||||||
|
|
||||||
Type
|
Type
|
||||||
SmallWord = System.Word;
|
SmallWord = System.Word;
|
||||||
|
|
|
@ -14,18 +14,16 @@ BUGS AND POSSIBLE ISSUES
|
||||||
! After data file review, add missing variables to various MPL Get/Put
|
! After data file review, add missing variables to various MPL Get/Put
|
||||||
functions.
|
functions.
|
||||||
! RAR internal viewer does not work with files that have embedded comments
|
! RAR internal viewer does not work with files that have embedded comments
|
||||||
! Investigate strange crashing when Mystic is built in the FPC editor vs
|
|
||||||
the makewin script. Something is out of whack with compiler options? OR
|
|
||||||
FPC BUG? DirAttr is suspect in MPL is it 1 byte or 4 in size?
|
|
||||||
! View archive not working if its external view? [Griffin]
|
|
||||||
! Test MIS blocking features or just rewrite MIS completely.
|
|
||||||
! Test midnight rollovers for time (flag for user to be immune to timecheck)
|
! Test midnight rollovers for time (flag for user to be immune to timecheck)
|
||||||
! Elasped time will need to be recalculated based on flag above ^^
|
|
||||||
! Validate that "groupX.ans" and "fgroupX.ans" actually work.
|
! Validate that "groupX.ans" and "fgroupX.ans" actually work.
|
||||||
|
! Test NNTP with Thunderbird specifically FUBAR dates on messages.
|
||||||
|
|
||||||
FUTURE / IDEAS / WORK IN PROGRESS / NOTES
|
FUTURE / IDEAS / WORK IN PROGRESS / NOTES
|
||||||
=========================================
|
=========================================
|
||||||
|
|
||||||
|
- Auto wrapping of quotes before the FS editor gets to it.
|
||||||
|
- Finish Threaded message reader
|
||||||
|
- Add "high roller Smack talk" into BlackJack
|
||||||
- Add better MIS logging per server (connect, refuse, blocked, etc)
|
- Add better MIS logging per server (connect, refuse, blocked, etc)
|
||||||
- BBS email autoforwarded to Internet email
|
- BBS email autoforwarded to Internet email
|
||||||
- Ability to send internet email to people from within the BBS.
|
- Ability to send internet email to people from within the BBS.
|
||||||
|
@ -74,6 +72,8 @@ FUTURE / IDEAS / WORK IN PROGRESS / NOTES
|
||||||
- Template system similar to Mystic 2 (ansiedit.ans ansiedit.ans.cfg)
|
- Template system similar to Mystic 2 (ansiedit.ans ansiedit.ans.cfg)
|
||||||
- Rename Template filenames to allow more than 8 characters (for clarity)
|
- Rename Template filenames to allow more than 8 characters (for clarity)
|
||||||
- Does anyone use Version 7 compiled nodelists? Worth supporting?
|
- Does anyone use Version 7 compiled nodelists? Worth supporting?
|
||||||
|
How do other softwares leverage nodelists? Reference TG, RG, RA,
|
||||||
|
SearchLight, PCBoard, etc, and come up with the best solution.
|
||||||
- ANSI message upload post processor option: Auto/Disabled/Ask
|
- ANSI message upload post processor option: Auto/Disabled/Ask
|
||||||
- Prompt for disconect after UL or DL (and add option to filebase settings)
|
- Prompt for disconect after UL or DL (and add option to filebase settings)
|
||||||
- Finish optional user prompts
|
- Finish optional user prompts
|
||||||
|
@ -92,6 +92,7 @@ FUTURE / IDEAS / WORK IN PROGRESS / NOTES
|
||||||
- ^^ AREAFIX
|
- ^^ AREAFIX
|
||||||
- ^^ TIC processing
|
- ^^ TIC processing
|
||||||
- ^^ Needs to be powerful enough to HUB an entire FTN network
|
- ^^ Needs to be powerful enough to HUB an entire FTN network
|
||||||
|
- QWK Networking support internally WHO CAN HELP THIS HAPPEN?
|
||||||
- MPL trunc/round?
|
- MPL trunc/round?
|
||||||
- Internal Zmodem and TN/Link protocols or at least MBBSPROT executable
|
- Internal Zmodem and TN/Link protocols or at least MBBSPROT executable
|
||||||
^^ driver that ships with Mystic and can be used by others.
|
^^ driver that ships with Mystic and can be used by others.
|
||||||
|
@ -119,6 +120,7 @@ Disconnect while posting design:
|
||||||
Line 5: Network address (or blank if none)
|
Line 5: Network address (or blank if none)
|
||||||
Line 6: MsgText
|
Line 6: MsgText
|
||||||
overwrite if exists
|
overwrite if exists
|
||||||
|
NOTE WHAT ABOUT QUOTE TEXT
|
||||||
5. During LOGIN, check for msg_<UID>.txt or have menu command to do it?
|
5. During LOGIN, check for msg_<UID>.txt or have menu command to do it?
|
||||||
6. If exists, process and prompt user:
|
6. If exists, process and prompt user:
|
||||||
|
|
||||||
|
@ -163,9 +165,9 @@ mode library updates and screensave/restore changes)
|
||||||
1. terminal "screen length" is no longer an option of lines but a
|
1. terminal "screen length" is no longer an option of lines but a
|
||||||
selection:
|
selection:
|
||||||
|
|
||||||
80x25
|
80x24
|
||||||
80x50
|
80x49
|
||||||
132x50
|
132x49
|
||||||
|
|
||||||
2. all display files and templates will have this logic added:
|
2. all display files and templates will have this logic added:
|
||||||
|
|
||||||
|
@ -193,7 +195,7 @@ ansiflst.50.an1 = ansiflist.50.an1.cfg
|
||||||
|
|
||||||
FILE rating / comments system
|
FILE rating / comments system
|
||||||
|
|
||||||
1. what type? 4 or 5 start or 0-100 rating system?
|
1. what type? 4 or 5 stars, or 1-10, or 0-100 rating system?
|
||||||
2. records already updated to allow for either
|
2. records already updated to allow for either
|
||||||
|
|
||||||
-----------------------------------------------------------------------
|
-----------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue