More A38 stuff see WHATSNEW

This commit is contained in:
mysticbbs 2013-09-17 22:28:47 -04:00
parent 0f72b01e12
commit e0ef7071f4
14 changed files with 151 additions and 72 deletions

View File

@ -158,7 +158,7 @@ Begin
Form.AddBits ('9', ' Pvt Reply' , 55, 21, 68, 21, 11, MBPrivReply, @MBase.Flags, Topic + 'Allow private posts in public?');
Repeat
WriteXY (19, 15, 113, strPadR(Addr2Str(bbsCfg.NetAddress[MBase.NetAddr]), 19, ' '));
WriteXY (19, 15, 113, strPadR(Addr2Str(bbsCfg.NetAddress[MBase.NetAddr]) + ' (' + bbsCfg.NetDesc[MBase.NetAddr] + ')', 33, ' '));
Links := FileByteSize(MBase.Path + MBase.FileName + '.lnk');
@ -478,7 +478,7 @@ Var
Write (MBaseFile, MBase);
End;
Procedure EraseData;
Procedure EraseData (DoScn: Boolean);
Begin
FileErase (MBase.Path + MBase.FileName + '.jhr');
FileErase (MBase.Path + MBase.FileName + '.jlr');
@ -487,7 +487,9 @@ Var
FileErase (MBase.Path + MBase.FileName + '.sqd');
FileErase (MBase.Path + MBase.FileName + '.sqi');
FileErase (MBase.Path + MBase.FileName + '.sql');
FileErase (MBase.Path + MBase.FileName + '.scn');
If DoScn Then
FileErase (MBase.Path + MBase.FileName + '.scn');
End;
Var
@ -526,7 +528,7 @@ Begin
Case List.ExitCode of
'/' : If Edit Then
Case GetCommandOption(8, 'I-Insert|D-Delete|C-Copy|M-Move|P-Paste|G-Global|S-Sort|') of
Case GetCommandOption(8, 'I-Insert|D-Delete|C-Copy|M-Move|P-Paste|G-Global|S-Sort|R-Reset|') of
'I' : If List.Picked > 1 Then Begin
AssignRecord(False);
MakeList;
@ -543,7 +545,7 @@ Begin
KillRecord (MBaseFile, Count, SizeOf(MBase));
FileErase (MBase.Path + MBase.FileName + '.lnk');
If KillData Then EraseData;
If KillData Then EraseData(True);
End;
MakeList;
@ -558,7 +560,7 @@ Begin
FileErase (MBase.Path + MBase.FileName + '.lnk');
If ShowMsgBox(1, 'Delete data: ' + strStripPipe(MBase.Name)) Then
EraseData;
EraseData(True);
MakeList;
End;
@ -605,6 +607,27 @@ Begin
GlobalEdit (MBase);
End;
'S' : SortMessageBases (List, MBaseFile);
'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
Seek (MBaseFile, Count - 1);
Read (MBaseFile, MBase);
EraseData(False);
End;
If ShowMsgBox (1, 'Reset echomail duplicate tracking?') Then
FileErase (bbsCfg.DataPath + 'echodupes.dat');
End;
End Else
If (List.Picked > 1) and (List.Picked < List.ListMax) Then
If ShowMsgBox(1, 'Reset msgs in this base?') Then Begin
Seek (MBaseFile, List.Picked - 1);
Read (MBaseFile, MBase);
EraseData(False);
End;
End;
#13 : If List.Picked < List.ListMax Then Begin
Seek (MBaseFile, List.Picked - 1);

View File

@ -1414,12 +1414,12 @@ Begin
Result := #255;
IsArrow := False;
If Input.KeyWait(Wait) Then Begin
Result := Input.ReadKey;
If Keyboard.KeyWait(Wait) Then Begin
Result := Keyboard.ReadKey;
LocalInput := True;
If Result = #0 Then Begin
Result := Input.ReadKey;
Result := Keyboard.ReadKey;
If (AllowArrow) and (Result in [#71..#73, #75, #77, #79..#83]) Then Begin
IsArrow := True;
@ -2294,7 +2294,7 @@ End;
Procedure TBBSIO.PurgeInputBuffer;
Begin
{$IFDEF UNIX}
While Input.KeyPressed Do Input.ReadKey;
While Keyboard.KeyPressed Do Keyboard.ReadKey;
{$ENDIF}
{$IFDEF WINDOWS}
If Not TBBSCore(Core).LocalMode Then TBBSCore(Core).Client.PurgeInputData(100);

View File

@ -758,7 +758,7 @@ Begin
End;
MsgHdr^.JamHdr.Rev := 1;
MsgHdr^.JamHdr.DateArrived := ToUnixDate(CurDateDos); {Get date processed}
MsgHdr^.JamHdr.DateArrived := DateDos2Unix(CurDateDos); {Get date processed}
DT.Year := strS2I(Copy(JM^.MsgDate, 7, 2)); {Convert date written}
DT.Month := strS2I(Copy(JM^.MsgDate, 1, 2));
@ -773,7 +773,7 @@ Begin
DT.Hour := strS2I(Copy(JM^.MsgTime, 1, 2));
DT.Min := strS2I(Copy(JM^.MsgTime, 4, 2));
MsgHdr^.JamHdr.DateWritten := DTToUnixDate(DT);
MsgHdr^.JamHdr.DateWritten := DateDT2Unix(DT);
End;
If WriteError = 0 Then Begin {Lock message base for update}
@ -941,7 +941,7 @@ Procedure TMsgBaseJAM.MsgStartUp;
Error := IoResult;
End;
If Error = 0 Then Begin
UnixToDt(MsgHdr^.JamHdr.DateWritten, DT);
DT := DateUnix2DT(MsgHdr^.JamHdr.DateWritten);
JM^.MsgDate := strZero(DT.Month) + '-' + strZero(DT.Day) + '-' + Copy(strI2S(DT.Year), 3, 2);
JM^.MsgTime := strZero(DT.Hour) + ':' + strZero(DT.Min);
@ -1542,7 +1542,7 @@ Begin
TmpHdr^.Signature[2] := 'A';
TmpHdr^.Signature[3] := 'M';
TmpHdr^.BaseMsgNum := 1;
TmpHdr^.Created := ToUnixDate(CurDateDos);
TmpHdr^.Created := DateDos2Unix(CurDateDos);
TmpHdr^.PwdCrc := -1;
CreateError := SaveFilePos(JM^.MsgPath + '.jhr', TmpHdr^, SizeOf(TmpHdr^), 0);

View File

@ -427,8 +427,8 @@ Begin
Console.BufFlush;
For Loop := 1 to 24 Do Begin
While Input.KeyPressed Do
If Input.ReadKey in [#27, '[', '0'..'9', ';', 'R'] Then Begin
While Keyboard.KeyPressed Do
If Keyboard.ReadKey in [#27, '[', '0'..'9', ';', 'R'] Then Begin
Session.io.Graphics := 1;
Break;
End;
@ -438,7 +438,8 @@ Begin
WaitMS(250);
End;
While Input.KeyPressed Do Loop := Byte(Input.ReadKey);
While Keyboard.KeyPressed Do
Loop := Byte(Keyboard.ReadKey);
Session.io.OutFullLn (Session.GetPrompt(259));
Session.io.BufFlush;

View File

@ -6,6 +6,7 @@ Interface
Uses
DOS,
MKCRAP,
m_io_Sockets,
m_DateTime,
m_FileIO,
@ -670,6 +671,7 @@ Begin
// set file time based on intime value
// does this not work in linux?
SetFTime (InFile, DateUnix2Dos(InTime));
Close (InFile);
SendFrame (M_GOT, EscapeFileName(InFN) + ' ' + strI2S(InSize) + ' ' + strI2S(InTime));

View File

@ -473,7 +473,6 @@ Var
Count : LongInt;
GotStart : Boolean;
Found : Boolean;
SemFile : File;
Begin
If Not LoggedIn Then Begin
ClientWriteLine(re_AuthReq);

View File

@ -13,9 +13,10 @@ Interface
Uses
DOS;
Function ToUnixDate (DosDate: LongInt): LongInt;
Function DTToUnixDate (DT: DateTime): LongInt;
Procedure UnixToDT (SecsPast: LongInt; Var Dt: DateTime);
Function DateDos2Unix (DosDate: LongInt): LongInt;
Function DateDT2Unix (DT: DateTime): LongInt;
Function DateUnix2DT (SecsPast: LongInt) : DateTime;
Function DateUnix2Dos (D: LongInt) : LongInt;
Procedure Str2Az (Str: String; MaxLen: Byte; Var AZStr); {Convert string to asciiz}
Function LoadFilePos (FN: String; Var Rec; FS: Word; FPos: LongInt): Word;
Function ExtendFile (FN: String; ToSize: LongInt): Word;
@ -34,7 +35,15 @@ Const
// DATED1 = 146097;
// DATED2 = 1721119;
Function DTToUnixDate (DT: DateTime): LongInt;
Function DateUnix2Dos (D: LongInt) : LongInt;
Var
DT : DateTime;
Begin
DT := DateUnix2DT(D);
PackTime (DT, Result);
End;
Function DateDT2Unix (DT: DateTime): LongInt;
Var
SecsPast, DaysPast: LongInt;
Begin
@ -44,33 +53,33 @@ Begin
SecsPast := DaysPast * 86400;
SecsPast := SecsPast + (LongInt(DT.Hour) * 3600) + (DT.Min * 60) + (DT.Sec);
DTToUnixDate := SecsPast;
Result := SecsPast;
End;
Function ToUnixDate (DosDate: LongInt): LongInt;
Function DateDos2Unix (DosDate: LongInt): LongInt;
Var
DT: DateTime;
Begin
UnpackTime(DosDate, DT);
ToUnixDate := DTToUnixDate(DT);
Result := DateDT2Unix(DT);
End;
Procedure UnixToDT (SecsPast: LongInt; Var DT: DateTime);
Function DateUnix2DT (SecsPast: LongInt) : DateTime;
Var
DateNum : LongInt; //might be able to remove this
Begin
Datenum := (SecsPast Div 86400) + DATEc1970;
DateNum := (SecsPast Div 86400) + DATEc1970;
FillChar(DT, SizeOf(DT), 0);
FillChar(Result, SizeOf(Result), 0);
DateJ2G(DateNum, SmallInt(DT.Year), SmallInt(DT.Month), SmallInt(DT.Day));
DateJ2G(DateNum, SmallInt(Result.Year), SmallInt(Result.Month), SmallInt(Result.Day));
SecsPast := SecsPast Mod 86400;
DT.Hour := SecsPast Div 3600;
SecsPast := SecsPast Mod 3600;
DT.Min := SecsPast Div 60;
DT.Sec := SecsPast Mod 60;
SecsPast := SecsPast Mod 86400;
Result.Hour := SecsPast Div 3600;
SecsPast := SecsPast Mod 3600;
Result.Min := SecsPast Div 60;
Result.Sec := SecsPast Mod 60;
End;
Function SaveFilePos (FN: String; Var Rec; FS: Word; FPos: LongInt): Word;

View File

@ -1737,6 +1737,8 @@ Function TParserEngine.ParseVariableInfo (Param: Boolean; IsRec: Boolean; Var In
End;
Begin
Result := 0;
FillChar (Info, SizeOf(Info), 0);
Case tkwType of

View File

@ -1610,7 +1610,7 @@ Begin
End;
18 : Begin
{$IFDEF UNIX}
TempBool := Input.KeyPressed;
TempBool := Keyboard.KeyPressed;
{$ELSE}
TempBool := Keyboard.KeyPressed OR Session.Client.DataWaiting;
{$ENDIF}

View File

@ -10,8 +10,10 @@ Implementation
Uses
DOS,
Classes,
m_FileIO,
m_Strings,
m_DateTime,
AView,
BBS_Records,
BBS_DataBase,
@ -242,7 +244,7 @@ Var
Inc (TotalEcho);
Log (2, '+', ' Added Msg #' + strI2S(MsgBase^.GetHighMsgNum) + ' to ' + strStripPipe(MBase.Name));
Log (2, '+', ' Added Msg #' + strI2S(MsgBase^.GetHighMsgNum) + ' (' + MsgBase^.GetDate + ') to ' + strStripPipe(MBase.Name));
End;
End;
End;
@ -264,13 +266,13 @@ Var
Procedure ImportPacketBundle (PktBundle: String);
Var
PKTFound : Boolean;
PKTMatched : Boolean;
DirInfo : SearchRec;
NodeFile : File of RecEchoMailNode;
EchoNode : RecEchoMailNode;
ArcType : String[4];
Count : Byte;
Count : LongInt;
BundleList : TStringList;
Begin
PKTMatched := False;
@ -306,21 +308,18 @@ Var
End;
End;
PKTFound := False;
ProcessStatus ('Extracting ' + PktBundle, False);
ExecuteArchive (TempPath, bbsCfg.InboundPath + PktBundle, ArcType, '*', 2);
BundleList := TStringList.Create;
FindFirst (TempPath + '*', AnyFile, DirInfo);
While DosError = 0 Do Begin
If DirInfo.Attr And Directory = 0 Then Begin
If strUpper(JustFileExt(DirInfo.Name)) = 'PKT' Then Begin
PKTFound := True;
ImportPacketFile (TempPath + DirInfo.Name);
End;
If strUpper(JustFileExt(DirInfo.Name)) = 'PKT' Then
BundleList.Add(FormatDate(DateDos2DT(DirInfo.Time), 'YYYYMMDDHHIISS') + ' ' + DirInfo.Name);
End;
FindNext (DirInfo);
@ -328,16 +327,26 @@ Var
FindClose (DirInfo);
If Not PKTFound Then
BundleList.Sort;
If BundleList.Count = 0 Then
Log (2, '!', ' Unable to extract bundle; skipping')
Else
Else Begin
For Count := 1 to BundleList.Count Do
ImportPacketFile (TempPath + strWordGet(2, BundleList.Strings[Count - 1], ' '));
FileErase (bbsCfg.InboundPath + PktBundle);
End;
BundleList.Free;
End;
Var
DirInfo : SearchRec;
Count : LongInt;
FileExt : String;
DirInfo : SearchRec;
Count : LongInt;
FileExt : String;
PktList : TStringList;
FileName : String;
Begin
TotalEcho := 0;
TotalNet := 0;
@ -386,39 +395,48 @@ Begin
If Not GetMBaseByIndex (DupeIndex, DupeMBase) Then
DupeIndex := -1;
PktList := TStringList.Create;
FindFirst (bbsCfg.InboundPath + '*', AnyFile, DirInfo);
While DosError = 0 Do Begin
If DirInfo.Attr And Directory = 0 Then Begin
FileExt := Copy(strUpper(JustFileExt(DirInfo.Name)), 1, 2);
If FileExt = 'PK' Then
ImportPacketFile(bbsCfg.InboundPath + DirInfo.Name)
Else
If (FileExt = 'SU') or
(FileExt = 'MO') or
(FileExt = 'TU') or
(FileExt = 'WE') or
(FileExt = 'TH') or
(FileExt = 'FR') or
(FileExt = 'SA') Then
ImportPacketBundle(DirInfo.Name)
Else
Log (2, '!', ' Unknown inbound file ' + DirInfo.Name);
End;
If DirInfo.Attr And Directory = 0 Then
PktList.Add(FormatDate(DateDos2DT(DirInfo.Time), 'YYYYMMDDHHIISS') + ' ' + DirInfo.Name);
FindNext (DirInfo);
End;
FindClose (DirInfo);
PktList.Sort;
For Count := 1 to PktList.Count Do Begin
FileName := strWordGet(2, PktList.Strings[Count - 1], ' ');
FileExt := Copy(strUpper(JustFileExt(FileName)), 1, 2);
If FileExt = 'PK' Then
ImportPacketFile(bbsCfg.InboundPath + FileName)
Else
If (FileExt = 'SU') or
(FileExt = 'MO') or
(FileExt = 'TU') or
(FileExt = 'WE') or
(FileExt = 'TH') or
(FileExt = 'FR') or
(FileExt = 'SA') Then
ImportPacketBundle(FileName)
Else
Log (2, '!', ' Unknown inbound file ' + FileName);
End;
PKT.Free;
Dupes.Free;
PktList.Free;
ProcessStatus ('Total |15' + strI2S(TotalEcho) + ' |07echo |15' + strI2S(TotalNet) + ' |07net |15' + strI2S(TotalDupes) + ' |07dupe', True);
ProcessResult (rDONE, True);
FileErase (bbsCfg.SemaPath + fn_SemFileEchoIn);
End;
End;
End.

View File

@ -369,6 +369,7 @@ End;
Var
Count : Byte;
Saved : LongInt;
Temp : String[120];
Script : String[120];
Begin

View File

@ -63,17 +63,19 @@ Begin
Case FTP.SendFile(QwkNet.UsePassive, TempPath + QwkNet.PacketID + '.rep') of
ftpResOK : SentFile := True;
ftpResFailed : WriteLn (' - Failed');
ftpResBadData : WriteLn (' - Unable to open data connection');
Else
WriteLn (' - Failed');
End;
End;
WriteLn (' - Downloading QWK packet');
Case FTP.GetFile (QwkNet.UsePassive, TempPath + QwkNet.PacketID + '.qwk') of
Case FTP.GetFile(QwkNet.UsePassive, TempPath + QwkNet.PacketID + '.qwk') of
ftpResOK : WriteLn (' - OK: ' + QwkNet.PacketID + '.qwk', ' (' + strComma(FileByteSize(TempPath + QwkNet.PacketID + '.qwk')) + ' bytes)');
ftpResFailed : WriteLn (' - Failed');
ftpResBadData : WriteLn (' - Unable to open data connection');
ftpResNoFile : WriteLn (' - Packet does not exist on remote');
End;
End;
End;
@ -93,12 +95,13 @@ Begin
WriteLn (' - Importing QWK packet');
filecopy(temppath + qwknet.packetid + '.qwk', 'd:\s7\vert.qwk');
If QWK.ImportPacket(True) Then
WriteLn (' - Imported ', QWK.RepOK, ' messages (', QWK.RepFailed, ' failed)')
Else
WriteLn (' - Unable to find QWK packet');
End Else
Writeln (' - No QWK file received');
End;
QWK.Free;

View File

@ -44,6 +44,7 @@ BUGS AND POSSIBLE ISSUES
FUTURE / IDEAS / WORK IN PROGRESS / NOTES
=========================================
- auto create qwk network message bases?
- make -CFG mode NOT use inactivity timeout
- ability when editing a posted message to be able to toggle the Private flag
if the base is Pub/Priv
- when editing an already posted message with reference linkage, export the

View File

@ -3763,4 +3763,24 @@
! Fixed: Posts to networked bases via NNTP were not adding origin lines.
! BINKP server should now properly escape filenames with spaces in them.
+ When tossing ECHOMAIL PKT files and bundles, Mystic will now sort the
entire incoming directory by filename and then filename as a secondary and
process each PKT or bundle in order.
+ When tossing an ECHOMAIL bundle, Mystic will now extract the bundle and
then sort the contents of the bundle by filedate and secondly by filename
and process each PKT in the sorted order.
+ The message base editor now has a new function /R (Reset messages). This
will take a single base or a selection of tagged bases and remove ALL
messages in them without effecting your user's new scan/qwk scan settings
OR the echomail linkage. IF bases are tagged before /R Mystic will also
offer to reset the echomail duplicate tracking pointers as well.
+ QWKPOLL should now provide more detail during the polling process,
including possible data port issues and when the HUB does not have a QWK
packet with new messages for you.
<ALPHA 38 RELEASED>