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