Updates
This commit is contained in:
parent
ed7564cbc2
commit
55ca6b6b1c
|
@ -450,7 +450,7 @@ Begin
|
|||
NoInput := False;
|
||||
LastBarPos := 0;
|
||||
StatusProc := NIL;
|
||||
SearchProc := DefListBoxSearch;
|
||||
SearchProc := @DefListBoxSearch;
|
||||
SearchX := 0;
|
||||
SearchY := 0;
|
||||
SearchA := 0;
|
||||
|
|
|
@ -243,7 +243,7 @@ Begin
|
|||
KillData := ShowMsgBox(1, 'Delete data files for ' + strI2S(List.Marked) + ' bases?');
|
||||
|
||||
For Count := List.ListMax DownTo 1 Do
|
||||
If List.List[Count].Tagged = 1 Then Begin
|
||||
If List.List[Count]^.Tagged = 1 Then Begin
|
||||
Seek (FBaseFile, Count - 1);
|
||||
Read (FBaseFile, FBase);
|
||||
|
||||
|
|
|
@ -538,7 +538,7 @@ Begin
|
|||
KillData := ShowMsgBox(1, 'Delete data files for ' + strI2S(List.Marked) + ' bases?');
|
||||
|
||||
For Count := List.ListMax DownTo 1 Do
|
||||
If List.List[Count].Tagged = 1 Then Begin
|
||||
If List.List[Count]^.Tagged = 1 Then Begin
|
||||
Seek (MBaseFile, Count - 1);
|
||||
Read (MBaseFile, MBase);
|
||||
|
||||
|
@ -610,7 +610,7 @@ Begin
|
|||
'R' : If List.Marked > 0 Then Begin
|
||||
If ShowMsgBox(1, 'Reset msgs in ' + strI2S(List.Marked) + ' bases?') Then Begin
|
||||
For Count := List.ListMax DownTo 1 Do
|
||||
If List.List[Count].Tagged = 1 Then Begin
|
||||
If List.List[Count]^.Tagged = 1 Then Begin
|
||||
Seek (MBaseFile, Count - 1);
|
||||
Read (MBaseFile, MBase);
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ Type
|
|||
Procedure BatchDelete;
|
||||
Procedure SetFileScan;
|
||||
Procedure GetFileScan;
|
||||
Function SelectProtocol (UseDefault, Batch: Boolean) : Char;
|
||||
Function SelectProtocol (UseDefault, UseBatch: Boolean) : Char;
|
||||
Procedure CheckFileNameLength (FPath : String; Var FName: String);
|
||||
Procedure GetFileDescription (FN: String);
|
||||
Function CheckFileLimits (DL: Byte; DLK: Integer) : Byte;
|
||||
|
@ -956,17 +956,17 @@ End;
|
|||
|
||||
Function TFileBase.ArchiveList (FName : String) : Boolean;
|
||||
Var
|
||||
Arc : PArchive;
|
||||
SR : ArcSearchRec;
|
||||
ArcView : PArchive;
|
||||
SR : ArcSearchRec;
|
||||
Begin
|
||||
Result := False;
|
||||
|
||||
If Not FileExist(FName) Then Exit;
|
||||
|
||||
Arc := New(PArchive, Init);
|
||||
ArcView := New(PArchive, Init);
|
||||
|
||||
If Not Arc^.Name(FName) Then Begin
|
||||
Dispose (Arc, Done);
|
||||
If Not ArcView^.Name(FName) Then Begin
|
||||
Dispose (ArcView, Done);
|
||||
|
||||
If FileExist(FName) Then Begin
|
||||
ExecuteArchive (FName, '', '_view_.tmp', 3);
|
||||
|
@ -986,7 +986,7 @@ Begin
|
|||
|
||||
Session.io.OutFullLn (Session.GetPrompt(192));
|
||||
|
||||
Arc^.FindFirst(SR);
|
||||
ArcView^.FindFirst(SR);
|
||||
|
||||
While SR.Name <> '' Do Begin
|
||||
Session.io.PromptInfo[1] := SR.Name;
|
||||
|
@ -1007,10 +1007,10 @@ Begin
|
|||
'C' : Session.io.AllowPause := False;
|
||||
End;
|
||||
|
||||
Arc^.FindNext(SR);
|
||||
ArcView^.FindNext(SR);
|
||||
End;
|
||||
|
||||
Dispose (Arc, Done);
|
||||
Dispose (ArcView, Done);
|
||||
|
||||
Result := True;
|
||||
|
||||
|
@ -1360,7 +1360,7 @@ Begin
|
|||
Result := True;
|
||||
End;
|
||||
|
||||
Function TFileBase.SelectProtocol (UseDefault, Batch: Boolean) : Char;
|
||||
Function TFileBase.SelectProtocol (UseDefault, UseBatch: Boolean) : Char;
|
||||
|
||||
Function LoadByKey (Key: Char) : Boolean;
|
||||
Begin
|
||||
|
@ -1377,7 +1377,7 @@ Function TFileBase.SelectProtocol (UseDefault, Batch: Boolean) : Char;
|
|||
While Not Eof(ProtocolFile) Do Begin
|
||||
Read (ProtocolFile, Protocol);
|
||||
|
||||
If ((Protocol.Active) And (Key = Protocol.Key) And (Protocol.Batch = Batch) And ((Protocol.OSType = OSType) or (Protocol.OSType = 3))) Then Begin
|
||||
If ((Protocol.Active) And (Key = Protocol.Key) And (Protocol.Batch = UseBatch) And ((Protocol.OSType = OSType) or (Protocol.OSType = 3))) Then Begin
|
||||
Result := True;
|
||||
Break;
|
||||
End;
|
||||
|
@ -1411,7 +1411,7 @@ Begin
|
|||
While Not Eof(ProtocolFile) Do Begin
|
||||
Read (ProtocolFile, Protocol);
|
||||
|
||||
If Protocol.Active And (Protocol.Batch = Batch) And ((Protocol.OSType = OSTYpe) or (Protocol.OSType = 3)) Then Begin
|
||||
If Protocol.Active And (Protocol.Batch = UseBatch) And ((Protocol.OSType = OSTYpe) or (Protocol.OSType = 3)) Then Begin
|
||||
Keys := Keys + Protocol.Key;
|
||||
|
||||
Session.io.PromptInfo[1] := Protocol.Key;
|
||||
|
|
|
@ -1166,9 +1166,9 @@ Var
|
|||
Session.io.PromptInfo[5] := '';
|
||||
Session.io.PromptInfo[6] := '';
|
||||
End Else Begin
|
||||
Session.io.PromptInfo[4] := DirList[BarPos].Author;
|
||||
Session.io.PromptInfo[5] := DirList[BarPos].Title;
|
||||
Session.io.PromptInfo[6] := DirList[BarPos].Group;
|
||||
Session.io.PromptInfo[4] := DirList[BarPos]^.Author;
|
||||
Session.io.PromptInfo[5] := DirList[BarPos]^.Title;
|
||||
Session.io.PromptInfo[6] := DirList[BarPos]^.Group;
|
||||
End;
|
||||
End;
|
||||
|
||||
|
|
|
@ -546,7 +546,7 @@ End;
|
|||
|
||||
Procedure TMsgBase.GetMailStats (Var Total, UnRead: LongInt);
|
||||
Var
|
||||
MsgBase : PMsgBaseABS;
|
||||
TempMsg : PMsgBaseABS;
|
||||
TempBase : RecMessageBase;
|
||||
Begin
|
||||
Total := 0;
|
||||
|
@ -557,24 +557,24 @@ Begin
|
|||
Read (MBaseFile, TempBase);
|
||||
Close (MBaseFile);
|
||||
|
||||
If MBaseOpenCreate (MsgBase, TempBase, Session.TempPath) Then Begin
|
||||
MsgBase^.SeekFirst (1);
|
||||
If MBaseOpenCreate (TempMsg, TempBase, Session.TempPath) Then Begin
|
||||
TempMsg^.SeekFirst (1);
|
||||
|
||||
While MsgBase^.SeekFound Do Begin
|
||||
MsgBase^.MsgStartUp;
|
||||
While TempMsg^.SeekFound Do Begin
|
||||
TempMsg^.MsgStartUp;
|
||||
|
||||
If Session.User.IsThisUser(MsgBase^.GetTo) Then Begin
|
||||
If Session.User.IsThisUser(TempMsg^.GetTo) Then Begin
|
||||
Inc (Total);
|
||||
|
||||
If Not MsgBase^.IsRcvd Then Inc (UnRead);
|
||||
If Not TempMsg^.IsRcvd Then Inc (UnRead);
|
||||
End;
|
||||
|
||||
MsgBase^.SeekNext;
|
||||
TempMsg^.SeekNext;
|
||||
End;
|
||||
|
||||
MsgBase^.CloseMsgBase;
|
||||
TempMsg^.CloseMsgBase;
|
||||
|
||||
Dispose (MsgBase, Done);
|
||||
Dispose (TempMsg, Done);
|
||||
End;
|
||||
End;
|
||||
|
||||
|
@ -2396,7 +2396,7 @@ Var
|
|||
If PageTotal < PageSize Then Begin
|
||||
FirstPage := True;
|
||||
|
||||
MsgBase.SeekFirst(MsgInfo[PageTotal].Num);
|
||||
MsgBase^.SeekFirst(MsgInfo[PageTotal].Num);
|
||||
|
||||
While SeekNextMsg(False, False) and (PageTotal < PageSize) Do Begin
|
||||
Inc (PageTotal);
|
||||
|
@ -3228,7 +3228,7 @@ End;
|
|||
|
||||
Procedure TMsgBase.CheckEMail (CmdData: String);
|
||||
Var
|
||||
MsgBase : PMsgBaseABS;
|
||||
TempMsg : PMsgBaseABS;
|
||||
TempBase : RecMessageBase;
|
||||
Total : Integer;
|
||||
UnRead : Integer;
|
||||
|
@ -3255,34 +3255,34 @@ Begin
|
|||
Exit;
|
||||
End;
|
||||
|
||||
If MBaseOpenCreate (MsgBase, MBase, Session.TempPath) Then Begin
|
||||
MsgBase^.SeekFirst (1);
|
||||
If MBaseOpenCreate (TempMsg, MBase, Session.TempPath) Then Begin
|
||||
TempMsg^.SeekFirst (1);
|
||||
|
||||
While MsgBase^.SeekFound Do Begin
|
||||
MsgBase^.MsgStartUp;
|
||||
While TempMsg^.SeekFound Do Begin
|
||||
TempMsg^.MsgStartUp;
|
||||
|
||||
If Session.User.IsThisUser(MsgBase^.GetTo) Then Begin
|
||||
If Session.User.IsThisUser(TempMsg^.GetTo) Then Begin
|
||||
Inc (Total);
|
||||
|
||||
If Not MsgBase^.IsRcvd Then Inc (UnRead);
|
||||
If Not TempMsg^.IsRcvd Then Inc (UnRead);
|
||||
|
||||
If Total = 1 Then
|
||||
Session.io.OutFullLn (Session.GetPrompt(125));
|
||||
|
||||
Session.io.PromptInfo[1] := strI2S(Total);
|
||||
Session.io.PromptInfo[2] := MsgBase^.GetFrom;
|
||||
Session.io.PromptInfo[3] := MsgBase^.GetSubj;
|
||||
Session.io.PromptInfo[4] := MsgBase^.GetDate;
|
||||
Session.io.PromptInfo[2] := TempMsg^.GetFrom;
|
||||
Session.io.PromptInfo[3] := TempMsg^.GetSubj;
|
||||
Session.io.PromptInfo[4] := TempMsg^.GetDate;
|
||||
|
||||
Session.io.OutFullLn (Session.GetPrompt(126));
|
||||
End;
|
||||
|
||||
MsgBase^.SeekNext;
|
||||
TempMsg^.SeekNext;
|
||||
End;
|
||||
|
||||
MsgBase^.CloseMsgBase;
|
||||
TempMsg^.CloseMsgBase;
|
||||
|
||||
Dispose (MsgBase, Done);
|
||||
Dispose (TempMsg, Done);
|
||||
End;
|
||||
|
||||
Session.LastScanHadNew := UnRead > 0;
|
||||
|
@ -3922,7 +3922,7 @@ Procedure TMsgBase.PostTextFile (Data: String; AllowCodes: Boolean);
|
|||
Const
|
||||
MaxLines = 10000;
|
||||
Var
|
||||
MBaseFile : File;
|
||||
MBFile : File;
|
||||
mName : String;
|
||||
mArea : Word;
|
||||
mFrom : String;
|
||||
|
@ -3958,20 +3958,20 @@ Begin
|
|||
Exit;
|
||||
End;
|
||||
|
||||
Assign (MBaseFile, bbsCfg.DataPath + 'mbases.dat');
|
||||
ioReset (MBaseFile, SizeOf(RecMessageBase), fmReadWrite + fmDenyNone);
|
||||
Assign (MBFile, bbsCfg.DataPath + 'mbases.dat');
|
||||
ioReset (MBFile, SizeOf(RecMessageBase), fmRWDN);
|
||||
|
||||
If Not ioSeek (MBaseFile, mArea) Then Begin
|
||||
Close (MBaseFile);
|
||||
If Not ioSeek (MBFile, mArea) Then Begin
|
||||
Close (MBFile);
|
||||
Exit;
|
||||
End;
|
||||
|
||||
If Not ioRead (MBaseFile, TempBase) Then Begin
|
||||
Close (MBaseFile);
|
||||
If Not ioRead (MBFile, TempBase) Then Begin
|
||||
Close (MBFile);
|
||||
Exit;
|
||||
End;
|
||||
|
||||
Close (MBaseFile);
|
||||
Close (MBFile);
|
||||
|
||||
Assign (InFile, mName);
|
||||
SetTextBuf (InFile, TextBuf, SizeOf(TextBuf));
|
||||
|
|
|
@ -56,7 +56,7 @@ Type
|
|||
Procedure WriteLine (Line: Word; Flush: Boolean);
|
||||
Procedure DrawLine (Y, Line: Word; Flush: Boolean);
|
||||
Procedure DrawPage (pStart, pEnd, pLine: Word);
|
||||
Procedure SetLineColor (Attr, Line: Word);
|
||||
Procedure SetLineColor (NewAttr, Line: Word);
|
||||
Procedure RemoveLine (Line: Word);
|
||||
End;
|
||||
|
||||
|
@ -536,12 +536,12 @@ Begin
|
|||
Session.io.BufFlush;
|
||||
End;
|
||||
|
||||
Procedure TMsgBaseAnsi.SetLineColor (Attr, Line: Word);
|
||||
Procedure TMsgBaseAnsi.SetLineColor (NewAttr, Line: Word);
|
||||
Var
|
||||
Count : Word;
|
||||
Begin
|
||||
For Count := 1 to 80 Do
|
||||
Data[Line][Count].Attr := Attr;
|
||||
Data[Line][Count].Attr := NewAttr;
|
||||
End;
|
||||
|
||||
Procedure TMsgBaseAnsi.RemoveLine (Line: Word);
|
||||
|
|
|
@ -393,7 +393,7 @@ Begin
|
|||
|
||||
Session.AllowMessages := False;
|
||||
|
||||
Session.io.GetKeyCallBack := GetKeyNodeChatFunc;
|
||||
Session.io.GetKeyCallBack := @GetKeyNodeChatFunc;
|
||||
|
||||
Repeat
|
||||
Session.io.PromptInfo[1] := Session.User.ThisUser.Handle;
|
||||
|
@ -468,7 +468,7 @@ Begin
|
|||
Send_Node_Message (7, '0;Topic changed to "' + Session.Room.Name + '"', Session.CurRoom); // ++lang
|
||||
End;
|
||||
|
||||
Session.io.GetKeyCallBack := GetKeyNodeChatFunc;
|
||||
Session.io.GetKeyCallBack := @GetKeyNodeChatFunc;
|
||||
End Else
|
||||
If Str <> '' Then Begin
|
||||
Send_Node_Message (1, '0;' + Str, Session.CurRoom);
|
||||
|
|
|
@ -174,7 +174,7 @@ Var
|
|||
Res := Access(Session.Msgs.MBase.SysopACS);
|
||||
|
||||
If Session.Msgs.Reading Then
|
||||
Res := Res or IsThisUser(Session.msgs.MsgBase^.GetFrom);
|
||||
Res := Res or IsThisUser(Session.Msgs.MsgBase^.GetFrom);
|
||||
End;
|
||||
'N' : Res := Session.LastScanHadNew;
|
||||
'P' : If (ThisUser.Calls > 0) And (ThisUser.Flags AND UserNoRatio = 0) Then Begin
|
||||
|
|
|
@ -87,7 +87,7 @@ Begin
|
|||
|
||||
BinkP := TBinkP.Create(Client, Client, Queue, True, EchoNode.binkTimeOut * 100);
|
||||
|
||||
BinkP.StatusUpdate := BinkPStatus;
|
||||
BinkP.StatusUpdate := @BinkPStatus;
|
||||
BinkP.SetOutPath := GetFTNOutPath(EchoNode);
|
||||
BinkP.SetPassword := EchoNode.binkPass;
|
||||
BinkP.SetBlockSize := EchoNode.binkBlock;
|
||||
|
@ -209,4 +209,4 @@ Begin
|
|||
Else
|
||||
If Not PollByAddress(Str) Then
|
||||
BinkPStatus (NIL, 1, 'Invalid command line or address');
|
||||
End.
|
||||
End.
|
||||
|
|
|
@ -156,7 +156,7 @@ Implementation
|
|||
|
||||
// PROTOCOL CLASS IMPLEMENTATION
|
||||
|
||||
Procedure DefaultBinkPStatusProc (Owner: Pointer; Str: String);
|
||||
Procedure DefaultBinkPStatusProc (Owner: Pointer; Level: Byte; Str: String);
|
||||
Begin
|
||||
//writeln(str);
|
||||
End;
|
||||
|
@ -429,7 +429,7 @@ Begin
|
|||
|
||||
End;
|
||||
|
||||
Function TBinkP.DoAuthentication;
|
||||
Function TBinkP.DoAuthentication : Boolean;
|
||||
Var
|
||||
Str : String;
|
||||
Count : LongInt;
|
||||
|
@ -453,10 +453,14 @@ Begin
|
|||
Count := Pos('MD5-', Str);
|
||||
|
||||
If Count > 0 Then
|
||||
MD5Challenge := Copy(Str, Count + 4, 255);
|
||||
|
||||
// If Not IsClient Then
|
||||
StatusUpdate (Owner, 1, Str);
|
||||
MD5Challenge := Copy(Str, Count + 4, 255)
|
||||
Else
|
||||
StatusUpdate(Owner, 1, Str);
|
||||
// Case String(Copy(Str, 1, 3)) of
|
||||
// 'LOC',
|
||||
// 'SYS',
|
||||
// 'ZYZ' : StatusUpdate (Owner, 1, Str);
|
||||
// End;
|
||||
End;
|
||||
|
||||
// WriteLn ('AuthState: ', GetStateStr(AuthState), ', HasHeader: ', HaveHeader, ' Data: ', GetDataStr);
|
||||
|
@ -659,7 +663,7 @@ Begin
|
|||
End;
|
||||
End;
|
||||
|
||||
StatusUpdate(Owner, 1, 'Receiving: ' + InFN);
|
||||
StatusUpdate(Owner, 1, 'Receiving ' + InFN + ' (' + strComma(InSize) + ' bytes)');
|
||||
|
||||
Assign (InFile, bbsCfg.InBoundPath + InFN);
|
||||
Reset (InFile, 1);
|
||||
|
@ -718,10 +722,10 @@ Begin
|
|||
Inc (SkipFiles);
|
||||
End Else
|
||||
If RxCommand = M_GOT Then Begin
|
||||
FileList.QData[FileList.QPos].Status := QueueSuccess;
|
||||
FileList.QData[FileList.QPos]^.Status := QueueSuccess;
|
||||
|
||||
FileErase (FileList.QData[FileList.QPos].FilePath + FileList.QData[FileList.QPos].FileName);
|
||||
RemoveFilesFromFLO (FileList.QData[FileList.QPos].FilePath + FileList.QData[FileList.QPos].FileName);
|
||||
FileErase (FileList.QData[FileList.QPos]^.FilePath + FileList.QData[FileList.QPos]^.FileName);
|
||||
RemoveFilesFromFLO (FileList.QData[FileList.QPos]^.FilePath + FileList.QData[FileList.QPos]^.FileName);
|
||||
|
||||
HaveHeader := False;
|
||||
NeedHeader := True;
|
||||
|
@ -731,15 +735,15 @@ Begin
|
|||
End;
|
||||
End;
|
||||
TxNextFile : If FileList.Next Then Begin
|
||||
Assign (OutFile, FileList.QData[FileList.QPos].FilePath + FileList.QData[FileList.QPos].FileName);
|
||||
Assign (OutFile, FileList.QData[FileList.QPos]^.FilePath + FileList.QData[FileList.QPos]^.FileName);
|
||||
Reset (OutFile, 1);
|
||||
|
||||
If IoResult <> 0 Then Continue;
|
||||
|
||||
// use real filetime instead of tempfiletime
|
||||
SendFrame (M_FILE, EscapeFileName(FileList.QData[FileList.QPos].FileNew) + ' ' + strI2S(FileList.QData[FileList.QPos].FileSize) + ' ' + strI2S(TempFileTime) + ' 0');
|
||||
SendFrame (M_FILE, EscapeFileName(FileList.QData[FileList.QPos]^.FileNew) + ' ' + strI2S(FileList.QData[FileList.QPos]^.FileSize) + ' ' + strI2S(TempFileTime) + ' 0');
|
||||
|
||||
StatusUpdate (Owner, 1, 'Sending ' + FileList.QData[FileList.QPos].FileNew);
|
||||
StatusUpdate (Owner, 1, 'Sending ' + FileList.QData[FileList.QPos]^.FileNew + ' (' + strComma(FileList.QData[FileList.QPos]^.FileSize) + ' bytes)');
|
||||
|
||||
TxState := TxSendData;
|
||||
End Else Begin
|
||||
|
@ -764,7 +768,7 @@ Begin
|
|||
|
||||
// use real filetime instead of tempfiletime
|
||||
|
||||
SendFrame (M_FILE, EscapeFileName(FileList.QData[FileList.QPos].FileNew) + ' ' + Str + ' ' + strI2S(TempFileTime) + ' 0');
|
||||
SendFrame (M_FILE, EscapeFileName(FileList.QData[FileList.QPos]^.FileNew) + ' ' + Str + ' ' + strI2S(TempFileTime) + ' 0');
|
||||
|
||||
HaveHeader := False;
|
||||
NeedHeader := True;
|
||||
|
@ -912,7 +916,7 @@ Begin
|
|||
Result := TBINKPServer.Create(Owner, CliSock);
|
||||
End;
|
||||
|
||||
Procedure Status (Owner: Pointer; Str: String);
|
||||
Procedure Status (Owner: Pointer; Level: Byte; Str: String);
|
||||
Begin
|
||||
TServerManager(Owner).Status(-1, Str);
|
||||
End;
|
||||
|
|
|
@ -125,8 +125,8 @@ Begin
|
|||
|
||||
For Count := 1 to MailSize Do
|
||||
If MailInfo[Count] <> NIL Then Begin
|
||||
If Assigned(MailInfo[Count].Text) Then
|
||||
MailInfo[Count].Text.Free;
|
||||
If Assigned(MailInfo[Count]^.Text) Then
|
||||
MailInfo[Count]^.Text.Free;
|
||||
|
||||
Dispose (MailInfo[Count]);
|
||||
End;
|
||||
|
@ -142,9 +142,9 @@ Begin
|
|||
TotalSize := 0;
|
||||
|
||||
For Count := 1 to MailSize Do
|
||||
If Not MailInfo[Count].Deleted Then Begin
|
||||
If Not MailInfo[Count]^.Deleted Then Begin
|
||||
Inc (TotalMsg);
|
||||
Inc (TotalSize, MailInfo[Count].MsgSize);
|
||||
Inc (TotalSize, MailInfo[Count]^.MsgSize);
|
||||
End;
|
||||
End;
|
||||
|
||||
|
@ -176,9 +176,9 @@ Var
|
|||
|
||||
Procedure AddLine (Str: String);
|
||||
Begin
|
||||
MailInfo[MailSize].Text.Add(Str);
|
||||
MailInfo[MailSize]^.Text.Add(Str);
|
||||
|
||||
Inc (MailInfo[MailSize].MsgSize, Length(Str) + 2); {CRLF}
|
||||
Inc (MailInfo[MailSize]^.MsgSize, Length(Str) + 2); {CRLF}
|
||||
End;
|
||||
|
||||
Begin
|
||||
|
@ -189,18 +189,7 @@ Begin
|
|||
ioRead (MBaseFile, MBase);
|
||||
Close (MBaseFile);
|
||||
|
||||
Case MBase.BaseType of
|
||||
0 : MsgBase := New(PMsgBaseJAM, Init);
|
||||
1 : MsgBase := New(PMsgBaseSquish, Init);
|
||||
End;
|
||||
|
||||
MsgBase^.SetMsgPath (MBase.Path + MBase.FileName);
|
||||
MsgBase^.SetTempFile (TempPath + 'msgbuf.');
|
||||
|
||||
If Not MsgBase^.OpenMsgBase Then Begin
|
||||
Dispose (MsgBase, Done);
|
||||
Exit;
|
||||
End;
|
||||
If Not MBaseOpenCreate (MsgBase, MBase, TempPath) Then Exit;
|
||||
|
||||
MsgBase^.SeekFirst(1);
|
||||
|
||||
|
@ -214,11 +203,11 @@ Begin
|
|||
|
||||
New (MailInfo[MailSize]);
|
||||
|
||||
MailInfo[MailSize].Text := TStringList.Create;
|
||||
MailInfo[MailSize]^.Text := TStringList.Create;
|
||||
|
||||
AddLine ('Date: ' + ParseDateTime(MsgBase^.GetDate, MsgBase^.GetTime));
|
||||
AddLine ('From: ' + MsgBase^.GetFrom + ' <' + strReplace(MsgBase^.GetFrom, ' ', '_') + '@' + bbsCfg.inetDomain + '>');
|
||||
AddLine ('X-Mailer: Mystic BBS ' + mysVersion);
|
||||
AddLine ('X-Mailer: Mystic ' + mysVersion);
|
||||
AddLine ('To: ' + MsgBase^.GetTo + ' <' + strReplace(MsgBase^.GetTo, ' ', '_') + '@' + bbsCfg.inetDomain + '>');
|
||||
AddLine ('Subject: ' + MsgBase^.GetSubj);
|
||||
AddLine ('Content-Type: text/plain; charset=us-ascii');
|
||||
|
@ -227,9 +216,9 @@ Begin
|
|||
While Not MsgBase^.EOM Do
|
||||
AddLine(MsgBase^.GetString(79));
|
||||
|
||||
MailInfo[MailSize].MD5 := GetMessageUID(MsgBase);
|
||||
MailInfo[MailSize].GotRETR := False;
|
||||
MailInfo[MailSize].Deleted := False;
|
||||
MailInfo[MailSize]^.MD5 := GetMessageUID(MsgBase);
|
||||
MailInfo[MailSize]^.GotRETR := False;
|
||||
MailInfo[MailSize]^.Deleted := False;
|
||||
End;
|
||||
|
||||
MsgBase^.SeekNext;
|
||||
|
@ -254,28 +243,17 @@ Begin
|
|||
ioRead (MBaseFile, MBase);
|
||||
Close (MBaseFile);
|
||||
|
||||
Case MBase.BaseType of
|
||||
0 : MsgBase := New(PMsgBaseJAM, Init);
|
||||
1 : MsgBase := New(PMsgBaseSquish, Init);
|
||||
End;
|
||||
|
||||
MsgBase^.SetMsgPath (MBase.Path + MBase.FileName);
|
||||
MsgBase^.SetTempFile (TempPath + 'msgbuf.');
|
||||
|
||||
If Not MsgBase^.OpenMsgBase Then Begin
|
||||
Dispose (MsgBase, Done);
|
||||
Exit;
|
||||
End;
|
||||
If Not MBaseOpenCreate (MsgBase, MBase, TempPath) Then Exit;
|
||||
|
||||
For Count := 1 to MailSize Do Begin
|
||||
If MailInfo[Count].Deleted or (MailInfo[Count].GotRETR and bbsCfg.inetPOP3Delete) Then Begin
|
||||
If MailInfo[Count]^.Deleted or (MailInfo[Count]^.GotRETR and bbsCfg.inetPOP3Delete) Then Begin
|
||||
MsgBase^.SeekFirst(1);
|
||||
|
||||
While MsgBase^.SeekFound Do Begin
|
||||
MsgBase^.MsgStartUp;
|
||||
|
||||
If IsUser(MsgBase^.GetTo) Then
|
||||
If GetMessageUID(MsgBase) = MailInfo[Count].MD5 Then Begin
|
||||
If GetMessageUID(MsgBase) = MailInfo[Count]^.MD5 Then Begin
|
||||
MsgBase^.DeleteMsg;
|
||||
Break;
|
||||
End;
|
||||
|
@ -344,8 +322,8 @@ Begin
|
|||
If Data <> '' Then Begin
|
||||
MsgNum := strS2I(Data);
|
||||
|
||||
If (MsgNum > 0) and (MsgNum <= MailSize) and (Not MailInfo[MsgNum].Deleted) Then
|
||||
Client.WriteLine(re_OK + strI2S(MsgNum) + ' ' + strI2O(MailInfo[MsgNum].MsgSize))
|
||||
If (MsgNum > 0) and (MsgNum <= MailSize) and (Not MailInfo[MsgNum]^.Deleted) Then
|
||||
Client.WriteLine(re_OK + strI2S(MsgNum) + ' ' + strI2O(MailInfo[MsgNum]^.MsgSize))
|
||||
Else
|
||||
Client.WriteLine(re_UnknownMail);
|
||||
End Else Begin
|
||||
|
@ -354,8 +332,8 @@ Begin
|
|||
Client.WriteLine (re_OK + strI2S(MsgNum) + ' messages (' + strI2O(MsgSize) + ' octets)');
|
||||
|
||||
For Count := 1 to MailSize Do
|
||||
If Not MailInfo[Count].Deleted Then
|
||||
Client.WriteLine (strI2S(Count) + ' ' + strI2O(MailInfo[Count].MsgSize));
|
||||
If Not MailInfo[Count]^.Deleted Then
|
||||
Client.WriteLine (strI2S(Count) + ' ' + strI2O(MailInfo[Count]^.MsgSize));
|
||||
|
||||
Client.WriteLine('.');
|
||||
End;
|
||||
|
@ -372,16 +350,16 @@ Begin
|
|||
If Data <> '' Then Begin
|
||||
MsgNum := strS2I(Data);
|
||||
|
||||
If (MsgNum > 0) and (MsgNum <= MailSize) and (Not MailInfo[MsgNum].Deleted) Then
|
||||
Client.WriteLine(re_OK + strI2S(MsgNum) + ' ' + MailInfo[MsgNum].MD5)
|
||||
If (MsgNum > 0) and (MsgNum <= MailSize) and (Not MailInfo[MsgNum]^.Deleted) Then
|
||||
Client.WriteLine(re_OK + strI2S(MsgNum) + ' ' + MailInfo[MsgNum]^.MD5)
|
||||
Else
|
||||
Client.WriteLine(re_UnknownMail);
|
||||
End Else Begin
|
||||
Client.WriteLine (re_OK + 'Message list follows');
|
||||
|
||||
For Count := 1 to MailSize Do
|
||||
If Not MailInfo[Count].Deleted Then Begin
|
||||
Client.WriteLine (strI2S(Count) + ' ' + MailInfo[Count].MD5);
|
||||
If Not MailInfo[Count]^.Deleted Then Begin
|
||||
Client.WriteLine (strI2S(Count) + ' ' + MailInfo[Count]^.MD5);
|
||||
End;
|
||||
Client.WriteLine('.');
|
||||
End;
|
||||
|
@ -397,15 +375,15 @@ Begin
|
|||
If LoggedIn Then Begin
|
||||
MsgNum := strS2I(Data);
|
||||
|
||||
If (MsgNum > 0) and (MsgNum <= MailSize) and (Not MailInfo[MsgNum].Deleted) Then Begin
|
||||
If (MsgNum > 0) and (MsgNum <= MailSize) and (Not MailInfo[MsgNum]^.Deleted) Then Begin
|
||||
Client.WriteLine (re_GetMessage + strI2S(MsgNum));
|
||||
|
||||
For Count := 0 to MailInfo[MsgNum].Text.Count - 1 Do
|
||||
Client.WriteLine(MailInfo[MsgNum].Text[Count]);
|
||||
For Count := 0 to MailInfo[MsgNum]^.Text.Count - 1 Do
|
||||
Client.WriteLine(MailInfo[MsgNum]^.Text[Count]);
|
||||
|
||||
Client.WriteLine('.');
|
||||
|
||||
MailInfo[MsgNum].GotRETR := True;
|
||||
MailInfo[MsgNum]^.GotRETR := True;
|
||||
End Else
|
||||
Client.WriteLine(re_UnknownMail);
|
||||
End Else
|
||||
|
@ -418,7 +396,7 @@ Var
|
|||
Begin
|
||||
If LoggedIn Then Begin
|
||||
For Count := 1 to MailSize Do
|
||||
MailInfo[Count].Deleted := False;
|
||||
MailInfo[Count]^.Deleted := False;
|
||||
|
||||
Client.WriteLine (re_ResetOK);
|
||||
End Else
|
||||
|
@ -432,8 +410,8 @@ Begin
|
|||
If LoggedIn Then Begin
|
||||
MsgNum := strS2I(Data);
|
||||
|
||||
If (MsgNum > 0) and (MsgNum <= MailSize) and (Not MailInfo[MsgNum].Deleted) Then Begin
|
||||
MailInfo[MsgNum].Deleted := True;
|
||||
If (MsgNum > 0) and (MsgNum <= MailSize) and (Not MailInfo[MsgNum]^.Deleted) Then Begin
|
||||
MailInfo[MsgNum]^.Deleted := True;
|
||||
|
||||
Client.WriteLine(re_MsgDeleted);
|
||||
End Else
|
||||
|
|
|
@ -215,28 +215,13 @@ Begin
|
|||
ioRead (MBaseFile, MBase);
|
||||
Close (MBaseFile);
|
||||
|
||||
Case MBase.BaseType of
|
||||
0 : MsgBase := New(PMsgBaseJAM, Init);
|
||||
1 : MsgBase := New(PMsgBaseSquish, Init);
|
||||
If Not MBaseOpenCreate (MsgBase, MBase, TempPath) Then Begin
|
||||
MsgText.Free;
|
||||
Client.WriteLine(re_ErrorSending);
|
||||
|
||||
Exit;
|
||||
End;
|
||||
|
||||
MsgBase^.SetMsgPath (MBase.Path + MBase.FileName);
|
||||
MsgBase^.SetTempFile (TempPath + 'msgbuf.');
|
||||
|
||||
If Not MsgBase^.OpenMsgBase Then
|
||||
If Not MsgBase^.CreateMsgBase (MBase.MaxMsgs, MBase.MaxAge) Then Begin
|
||||
Dispose(MsgBase, Done);
|
||||
MsgText.Free;
|
||||
Client.WriteLine(re_ErrorSending);
|
||||
Exit;
|
||||
End Else
|
||||
If Not MsgBase^.OpenMsgBase Then Begin
|
||||
Dispose(MsgBase, Done);
|
||||
MsgText.Free;
|
||||
Client.WriteLine(re_ErrorSending);
|
||||
Exit;
|
||||
End;
|
||||
|
||||
MsgSubject := '';
|
||||
Count := 0;
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ Type
|
|||
TTelnetServer = Class(TServerClient)
|
||||
ND : TNodeData;
|
||||
|
||||
Constructor Create (Owner: TServerManager; ND: TNodeData; CliSock: TIOSocket);
|
||||
Constructor Create (Owner: TServerManager; NewND: TNodeData; CliSock: TIOSocket);
|
||||
Procedure Execute; Override;
|
||||
Destructor Destroy; Override;
|
||||
End;
|
||||
|
@ -65,11 +65,11 @@ Begin
|
|||
Result := TTelnetServer.Create(Owner, ND, CliSock);
|
||||
End;
|
||||
|
||||
Constructor TTelnetServer.Create (Owner: TServerManager; ND: TNodeData; CliSock: TIOSocket);
|
||||
Constructor TTelnetServer.Create (Owner: TServerManager; NewND: TNodeData; CliSock: TIOSocket);
|
||||
Begin
|
||||
Inherited Create(Owner, CliSock);
|
||||
|
||||
Self.ND := ND;
|
||||
Self.ND := NewND;
|
||||
End;
|
||||
|
||||
{$IFDEF WINDOWS}
|
||||
|
|
|
@ -75,7 +75,7 @@ Begin
|
|||
FindFirst ('*.mps', AnyFile - Directory - VolumeID, Dir);
|
||||
|
||||
While DosError = 0 Do Begin
|
||||
Parser := TParserEngine.Create(Status);
|
||||
Parser := TParserEngine.Create(@Status);
|
||||
|
||||
Parser.Compile(Dir.Name);
|
||||
|
||||
|
@ -86,7 +86,7 @@ Begin
|
|||
|
||||
FindClose(Dir);
|
||||
End Else Begin
|
||||
Parser := TParserEngine.Create(Status);
|
||||
Parser := TParserEngine.Create(@Status);
|
||||
Parser.Compile(ParamStr(1));
|
||||
Parser.Free;
|
||||
End;
|
||||
|
|
|
@ -369,7 +369,6 @@ End;
|
|||
|
||||
Var
|
||||
Count : Byte;
|
||||
Saved : LongInt;
|
||||
Temp : String[120];
|
||||
Script : String[120];
|
||||
Begin
|
||||
|
|
Loading…
Reference in New Issue