From 8796ac66f443d34d41156a98416d3116860502da Mon Sep 17 00:00:00 2001 From: mysticbbs Date: Thu, 5 Sep 2013 21:08:36 -0400 Subject: [PATCH] More QWKnet work --- mystic/bbs_cfg_msgbase.pas | 2 +- mystic/bbs_cfg_qwknet.pas | 8 +- mystic/bbs_database.pas | 28 ++++++ mystic/bbs_msgbase.pas | 24 +++--- mystic/bbs_msgbase_qwk.pas | 169 ++++++++++++++++++++++++------------- mystic/mis_client_ftp.pas | 26 ++++-- mystic/records.pas | 8 +- mystic/whatsnew.txt | 3 + 8 files changed, 180 insertions(+), 88 deletions(-) diff --git a/mystic/bbs_cfg_msgbase.pas b/mystic/bbs_cfg_msgbase.pas index b6494af..62dc574 100644 --- a/mystic/bbs_cfg_msgbase.pas +++ b/mystic/bbs_cfg_msgbase.pas @@ -137,7 +137,7 @@ Begin Form.AddStr ('T', ' R Template' , 5, 19, 19, 19, 12, 20, 20, @MBase.RTemplate, Topic + 'Template for full screen reader'); Form.AddStr ('M', ' L Template' , 5, 20, 19, 20, 12, 20, 20, @MBase.ITemplate, Topic + 'Template for lightbar message list'); Form.AddNone ('0', ' QWK Network' , 4, 21, 19, 21, 13, Topic + 'QWK network associated to this base'); - Form.AddLong ('!', ' QWK Base ID' , 4, 22, 19, 22, 13, 6, 0, 999999, @MBase.QwkConfID, Topic + 'QWK network base ID'); + Form.AddWord ('!', ' QWK Base ID' , 4, 22, 19, 22, 13, 5, 0, 65535, @MBase.QwkConfID, Topic + 'QWK network base ID'); Form.AddAttr ('Q', ' Quote Color' , 53, 5, 68, 5, 13, @MBase.ColQuote, Topic + 'Color for quoted text'); Form.AddAttr ('X', ' Text Color' , 54, 6, 68, 6, 12, @MBase.ColText, Topic + 'Color for message text'); diff --git a/mystic/bbs_cfg_qwknet.pas b/mystic/bbs_cfg_qwknet.pas index f50c6b7..99e1e9c 100644 --- a/mystic/bbs_cfg_qwknet.pas +++ b/mystic/bbs_cfg_qwknet.pas @@ -30,8 +30,8 @@ Begin Box.Header := ' Index ' + strI2S(QwkNet.Index) + ' '; - Box.Open (16, 5, 65, 16); - VerticalLine (32, 7, 14); + Box.Open (16, 5, 65, 17); + VerticalLine (32, 7, 15); Form.AddStr ('D', ' Network Name', 18, 7, 34, 7, 14, 30, 30, @QwkNet.Description, Topic + 'Network name'); Form.AddTog ('M', ' Member Type', 19, 8, 34, 8, 13, 4, 0, 1, 'HUB Node', @QwkNet.MemberType, Topic + 'Are you a HUB or a Node of this network?'); @@ -40,7 +40,8 @@ Begin Form.AddPass ('P', ' Password', 22, 11, 34, 11, 10, 20, 20, @QwkNet.Password, Topic + 'FTP password'); Form.AddBol ('U', ' Use Passive', 19, 12, 34, 12, 13, 3, @QwkNet.UsePassive, Topic + 'Use passive FTP with HUB'); Form.AddStr ('I', ' Packet ID', 21, 13, 34, 13, 11, 20, 20, @QwkNet.PacketID, Topic + 'QWK packet name to use with HUB'); - Form.AddBol ('E', ' Use QWKE', 22, 14, 34, 14, 10, 3, @QwkNet.UseQWKE, Topic + 'Create QWKE packets for HUB'); + Form.AddCaps ('A', ' Archive Type', 18, 14, 34, 14, 14, 4, 4, @QwkNet.ArcType, Topic + 'Archive type used for packets'); + Form.AddBol ('E', ' Use QWKE', 22, 15, 34, 15, 10, 3, @QwkNet.UseQWKE, Topic + 'Create QWKE packets for HUB'); Form.Execute; @@ -111,6 +112,7 @@ Var With QwkNet Do Begin Description := 'New QWK Network'; + ArcType := 'ZIP'; Index := GetPermanentIndex(FileSize(QwkFile)); End; diff --git a/mystic/bbs_database.pas b/mystic/bbs_database.pas index ac6e91c..a139188 100644 --- a/mystic/bbs_database.pas +++ b/mystic/bbs_database.pas @@ -4,6 +4,8 @@ Unit BBS_DataBase; // replace with this new stuff one at a time. including moving everything // to bbscfg. +// add generatembase/fbase/userindex functions? + {$I M_OPS.PAS} Interface @@ -44,6 +46,7 @@ Function Addr2Str (Addr : RecEchoMailAddr) : String; Function MBaseOpenCreate (Var Msg: PMsgBaseABS; Var Area: RecMessageBase; TP: String) : Boolean; Function GetOriginLine (Var mArea: RecMessageBase) : String; Function GetMBaseByIndex (Num: LongInt; Var TempBase: RecMessageBase) : Boolean; +Function GetMBaseByQwkID (QwkNet, QwkConf: LongInt; Var TempBase: RecMessageBase) : Boolean; Procedure GetMessageScan (UN: Cardinal; TempBase: RecMessageBase; Var TempScan: MScanRec); Procedure PutMessageScan (UN: Cardinal; TempBase: RecMessageBase; TempScan: MScanRec); Procedure MBaseAssignData (Var User: RecUser; Var Msg: PMsgBaseABS; Var TempBase: RecMessageBase); @@ -242,6 +245,31 @@ Begin Close (F); End; +Function GetMBaseByQwkID (QwkNet, QwkConf: LongInt; Var TempBase: RecMessageBase) : Boolean; +Var + F : File; +Begin + Result := False; + + Assign (F, bbsCfg.DataPath + 'mbases.dat'); + + If Not ioReset(F, SizeOf(RecMessageBase), fmRWDN) Then Exit; + + While Not Eof(F) Do Begin + ioRead (F, TempBase); + + If (TempBase.QwkNetID = QwkNet) and (TempBase.QwkConfID = QwkConf) Then Begin + Result := True; + + Break; + End; + End; + +writeln ('base result:',result); + + Close (F); +End; + Function GetQWKNetByIndex (Num: LongInt; Var TempNet: RecQwkNetwork) : Boolean; Var F : File; diff --git a/mystic/bbs_msgbase.pas b/mystic/bbs_msgbase.pas index b6ea54c..bad6578 100644 --- a/mystic/bbs_msgbase.pas +++ b/mystic/bbs_msgbase.pas @@ -809,7 +809,7 @@ Var While Not Eof(MBaseFile) Do Begin Read (MBaseFile, MBase); - If QwkNet And (MBase.Flags AND MBAllowQWKNet = 0) Then Continue; + If QwkNet And (MBase.QwkNetID <> Session.User.ThisUser.QwkNetwork) Then Continue; If Session.User.Access(MBase.ListACS) Then Begin Inc (Total); @@ -3304,14 +3304,7 @@ Var Begin Found := False; - Case TempBase.BaseType of - 0 : MsgBase := New(PMsgBaseJAM, Init); - 1 : MsgBase := New(PMsgBaseSquish, Init); - End; - - MsgBase^.SetMsgPath (TempBase.Path + TempBase.FileName); - - If MsgBase^.OpenMsgBase Then Begin + If MBaseOpenCreate (MsgBase, TempBase, Session.TempPath) Then Begin MsgBase^.SeekFirst(1); While MsgBase^.SeekFound Do Begin @@ -3319,9 +3312,12 @@ Var If DateStr2Dos(MsgBase^.GetDate) >= NewDate Then Begin MsgBase^.SetLastRead(Session.User.UserNum, MsgBase^.GetMsgNum - 1); + Found := True; + Break; End; + MsgBase^.SeekNext; End; @@ -3359,6 +3355,8 @@ Begin UpdateBase; End; + + Close (MBaseFile); End Else Begin TempBase := MBase; @@ -4162,7 +4160,7 @@ Begin Write (tFile, bbsCfg.SysopName + CRLF); Write (tFile, '0,' + bbsCfg.qwkBBSID + CRLF); Write (tFile, DateDos2Str(CurDateDos, 1), ',', TimeDos2Str(CurDateDos, 0) + CRLF); - Write (tFile, strUpper(Session.User.ThisUser.Handle) + CRLF); + Write (tFile, Session.User.ThisUser.Handle + CRLF); Write (tFile, CRLF); Write (tFile, '0' + CRLF); Write (tFile, TotalMsgs, CRLF); {TOTAL MSG IN PACKET} @@ -4303,9 +4301,9 @@ Begin strPadR(strI2S(MsgBase^.GetMsgNum), 7, ' ') + MsgBase^.GetDate + MsgBase^.GetTime + - strPadR(strUpper(MsgBase^.GetTo), 25, ' ') + - strPadR(strUpper(MsgBase^.GetFrom), 25, ' ') + - strPadR(strUpper(MsgBase^.GetSubj), 25, ' ') + + strPadR(MsgBase^.GetTo, 25, ' ') + + strPadR(MsgBase^.GetFrom, 25, ' ') + + strPadR(MsgBase^.GetSubj, 25, ' ') + strPadR('', 12, ' ') + strPadR(strI2S(MsgBase^.GetRefer), 8, ' ') + strPadR(strI2S(Chunks), 6, ' ') + diff --git a/mystic/bbs_msgbase_qwk.pas b/mystic/bbs_msgbase_qwk.pas index b24ca65..dfd8779 100644 --- a/mystic/bbs_msgbase_qwk.pas +++ b/mystic/bbs_msgbase_qwk.pas @@ -57,7 +57,7 @@ Type WorkPath : String; PacketID : String; UserRecord : RecUser; - UserNumber : Cardinal; + UserNumber : LongInt; TotalMessages : LongInt; TotalBases : LongInt; RepOK : LongInt; @@ -71,15 +71,15 @@ Type QwkLRFile : File of QwkLRRec; MsgBase : PMsgBaseABS; - Constructor Create (QwkPath, QwkID: String; UN: Cardinal; UR: RecUser); + Constructor Create (QwkPath, QwkID: String; UN: LongInt; UR: RecUser); Procedure LONG2MSB (Index: LongInt; Var MS: BSingle); Procedure WriteDOORID; Procedure WriteTOREADEREXT; Procedure WriteCONTROLDAT; - Function WriteMSGDAT : LongInt; + Function WriteMSGDAT (IsRep: Boolean) : LongInt; Procedure UpdateLastReadPointers; - Procedure CreatePacket; - Function ProcessReply : Boolean; + Procedure ExportPacket (IsRep: Boolean); + Function ImportPacket (IsQwk: Boolean) : Boolean; End; Implementation @@ -88,7 +88,7 @@ Uses m_Strings, m_DateTime; -Constructor TQWKEngine.Create (QwkPath, QwkID: String; UN: Cardinal; UR: RecUser); +Constructor TQWKEngine.Create (QwkPath, QwkID: String; UN: LongInt; UR: RecUser); Begin Inherited Create; @@ -215,7 +215,7 @@ Begin Write (TempFile, bbsCfg.SysopName + QWK_EOL); Write (TempFile, '0,' + PacketID + QWK_EOL); Write (TempFile, DateDos2Str(CurDateDos, 1), ',', TimeDos2Str(CurDateDos, 0) + QWK_EOL); - Write (TempFile, strUpper(UserRecord.Handle) + QWK_EOL); + Write (TempFile, UserRecord.Handle + QWK_EOL); Write (TempFile, QWK_EOL); Write (TempFile, '0' + QWK_EOL); Write (TempFile, TotalMessages, QWK_EOL); @@ -227,7 +227,10 @@ Begin ioRead (BaseFile, Base); If HasAccess(Self, Base.ReadACS) Then Begin - Write (TempFile, Base.Index, QWK_EOL); + If IsNetworked Then + Write (TempFile, Base.QwkConfID, QWK_EOL) + Else + Write (TempFile, Base.Index, QWK_EOL); If IsExtended Then Write (TempFile, strStripMCI(Base.Name) + QWK_EOL) @@ -246,7 +249,7 @@ Begin Close (TempFile); End; -Function TQWKEngine.WriteMSGDAT : LongInt; +Function TQWKEngine.WriteMSGDAT (IsRep: Boolean) : LongInt; Var NdxFile : File of QwkNdxHdr; NdxHdr : QwkNdxHdr; @@ -280,24 +283,38 @@ Begin If Not MBaseOpenCreate(MsgBase, MBase, WorkPath) Then Exit; - LastRead := MsgBase^.GetLastRead(UserNumber) + 1; + If IsRep Then + LastRead := 1 + Else + LastRead := MsgBase^.GetLastRead(UserNumber) + 1; MsgBase^.SeekFirst (LastRead); While MsgBase^.SeekFound Do Begin - If Not IsNetworked Then - If ((bbsCfg.QwkMaxBase > 0) and (MsgAdded = bbsCfg.QwkMaxBase)) or - ((bbsCfg.QwkMaxPacket > 0) and (TotalMessages = bbsCfg.QwkMaxPacket)) Then Break; + If ((bbsCfg.QwkMaxBase > 0) and (MsgAdded = bbsCfg.QwkMaxBase)) or + ((bbsCfg.QwkMaxPacket > 0) and (TotalMessages = bbsCfg.QwkMaxPacket)) Then Break; MsgBase^.MsgStartUp; - If MsgBase^.IsPriv And Not IsThisUser(UserRecord, MsgBase^.GetTo) Then Begin + If IsRep And MsgBase^.IsSent Then Begin MsgBase^.SeekNext; Continue; End; + If Not IsNetworked Then + If MsgBase^.IsPriv And Not IsThisUser(UserRecord, MsgBase^.GetTo) Then Begin + MsgBase^.SeekNext; + + Continue; + End; + + If IsRep Then Begin + MsgBase^.SetSent(True); + MsgBase^.ReWriteHdr; + End; + Inc (MsgAdded); Inc (TotalMessages); @@ -327,9 +344,9 @@ Begin strPadR(strI2S(MsgBase^.GetMsgNum), 7, ' ') + MsgBase^.GetDate + MsgBase^.GetTime + - strPadR(strUpper(MsgBase^.GetTo), 25, ' ') + - strPadR(strUpper(MsgBase^.GetFrom), 25, ' ') + - strPadR(strUpper(MsgBase^.GetSubj), 25, ' ') + + strPadR(MsgBase^.GetTo, 25, ' ') + + strPadR(MsgBase^.GetFrom, 25, ' ') + + strPadR(MsgBase^.GetSubj, 25, ' ') + strPadR('', 12, ' ') + strPadR(strI2S(MsgBase^.GetRefer), 8, ' ') + strPadR(strI2S(Chunks), 6, ' ') + @@ -338,6 +355,11 @@ Begin ' ' + ' '; + If IsNetworked Then + Move (Word(MBase.QwkConfID), Header[124], 2) + Else + Move (Word(MBase.Index), Header[124], 2); + If Not IsNetworked Then Begin If MsgAdded = 1 Then Begin Assign (NdxFile, WorkPath + strPadL(strI2S(MBase.Index), 3, '0') + '.ndx'); @@ -425,16 +447,24 @@ Begin Close (MBaseFile); End; -Procedure TQWKEngine.CreatePacket; +Procedure TQWKEngine.ExportPacket (IsRep: Boolean); Var Temp : String; MScan : MScanRec; Begin + If IsRep Then + Temp := PacketID + '.msg' + Else + Temp := 'messages.dat'; + DataFile := TFileBuffer.Create(4 * 1024); - DataFile.OpenStream (WorkPath + 'messages.dat', 1, fmCreate, fmRWDN); + DataFile.OpenStream (WorkPath + Temp, 1, fmCreate, fmRWDN); - Temp := strPadR('Produced By ' + mysSoftwareID + ' v' + mysVersion + '. ' + mysCopyNotice, 128, ' '); + If IsRep Then + Temp := strPadR(PacketID, 128, ' ') + Else + Temp := strPadR('Produced By ' + mysSoftwareID + ' v' + mysVersion + '. ' + mysCopyNotice, 128, ' '); DataFile.WriteBlock (Temp[1], 128); @@ -449,18 +479,21 @@ Begin While Not Eof(MBaseFile) Do Begin ioRead (MBaseFile, MBase); - If IsNetworked And (MBase.Flags AND MBAllowQWKNet = 0) Then + If IsNetworked And ((MBase.QwkNetID <> UserRecord.QwkNetwork) or (UserRecord.QwkNetwork = 0)) Then Continue; - If HasAccess(Self, MBase.ReadACS) Then Begin + If IsRep Or (HasAccess(Self, MBase.ReadACS)) Then Begin - GetMessageScan (UserNumber, MBase, MScan); + If IsRep Then + MScan.QwkScan := 1 + Else + GetMessageScan (UserNumber, MBase, MScan); If MScan.QwkScan > 0 Then Begin Inc (TotalBases); QwkLR.Base := FilePos(MBaseFile); - QwkLR.Pos := WriteMSGDAT; + QwkLR.Pos := WriteMSGDAT(IsRep); Write (QwkLRFile, QwkLR); End; @@ -474,14 +507,12 @@ Begin DataFile.Free; - If Not IsNetworked Then Begin - WriteControlDAT; - WriteDOORID; - WriteTOREADEREXT; - End; + WriteControlDAT; + WriteDOORID; + WriteTOREADEREXT; End; -Function TQWKEngine.ProcessReply : Boolean; +Function TQWKEngine.ImportPacket (IsQwk: Boolean) : Boolean; Procedure QwkControl (Idx: LongInt; Mode: Byte); Var @@ -511,12 +542,18 @@ Var ExtFile : Text; Count1 : SmallInt; Count2 : SmallInt; + BaseFound : Boolean; Begin Result := False; + If IsQwk Then + Line := 'messages.dat' + Else + Line := PacketID + '.msg'; + DataFile := TFileBuffer.Create(4 * 1024); - If Not DataFile.OpenStream (FileFind(WorkPath + PacketID + '.msg'), 1, fmOpen, fmRWDN) Then Begin + If Not DataFile.OpenStream (FileFind(WorkPath + Line), 1, fmOpen, fmRWDN) Then Begin DataFile.Free; DirClean (WorkPath, ''); @@ -525,33 +562,44 @@ Begin End; DataFile.ReadBlock(QwkBlock[1], 128); + QwkBlock[0] := #128; - If Pos(strUpper(PacketID), strUpper(QwkBlock)) = 0 Then Begin - DataFile.Free; + If Not IsQwk Then + If Pos(strUpper(PacketID), strUpper(QwkBlock)) = 0 Then Begin + DataFile.Free; - DirClean(WorkPath, ''); + DirClean(WorkPath, ''); - Exit; - End; + Exit; + End; While Not DataFile.EOF Do Begin DataFile.ReadBlock(QwkHeader, SizeOf(QwkHeader)); - Move (QwkHeader.MsgNum, QwkBlock[1], 7); + Move (QwkHeader.NumChunk, QwkBlock[1], 6); + QwkBlock[0] := #6; - QwkBlock[0] := #7; + Chunks := strS2I(QwkBlock) - 1; - If GetMBaseByIndex(strS2I(QwkBlock), MBase) Then Begin + If IsNetworked Then + BaseFound := GetMBaseByQwkID (UserRecord.QwkNetwork, QwkHeader.ConfNum, MBase) + // when polling userrecord.qwknetwork needs to be set to qwknetwork ID + Else + BaseFound := GetMBaseByIndex (QwkHeader.ConfNum, MBase); + If BaseFound Then Begin If MBaseOpenCreate(MsgBase, MBase, WorkPath) Then Begin MBaseAssignData(UserRecord, MsgBase, MBase); - If IsNetworked Then + If IsNetworked Then Begin MsgBase^.SetLocal(False); - // need to think this stuff through for both HUB and node - // situations + + QwkBlock[0] := #25; + Move (QwkHeader.UpFrom, QwkBlock[1], 25); + MsgBase^.SetFrom(strStripR(QwkBlock, ' ')); + End; QwkBlock[0] := #25; Move (QwkHeader.UpTo, QwkBlock[1], 25); @@ -565,15 +613,13 @@ Begin MsgBase^.SetRefer(strS2I(strStripR(QwkBlock, ' '))); - Move (QwkHeader.NumChunk, QwkBlock[1], 6); - - Chunks := strS2I(QwkBlock) - 1; Line := ''; LineCount := 0; IsControl := MsgBase^.GetTo = QWK_CONTROL; GotControl := False; // disable control in network packets (for now?) + // prob need to skip controls not just ignore? If IsNetworked Then IsControl := False; @@ -597,7 +643,7 @@ Begin // ignore from name unless its networked If IsNetworked Then - MsgBase^.SetTo(strStripB(Copy(Line, 6, Length(Line)), ' ')); + MsgBase^.SetFrom(strStripB(Copy(Line, 6, Length(Line)), ' ')); End Else If (LineCount < 4) and (Copy(Line, 1, 3) = 'To:') Then Begin MsgBase^.SetTo(strStripB(Copy(Line, 4, Length(Line)), ' ')); @@ -621,20 +667,19 @@ Begin If Line <> '' Then MsgBase^.DoStringLn(Line); - If MBase.NetType > 0 Then Begin - If IsNetworked Then Begin + If Not IsNetworked Then + If MBase.NetType > 0 Then Begin MsgBase^.DoStringLn (#13 + '--- ' + mysSoftwareID + '/QWK v' + mysVersion + ' (' + OSID + ')'); - MsgBase^.DoStringLn (' * Origin: ' + GetOriginLine(MBase)); - End Else Begin - MsgBase^.DoStringLn (#13 + '--- ' + mysSoftwareID + '/QWK v' + mysVersion + ' (' + OSID + ')'); - MsgBase^.DoStringLn (' * Origin: ' + GetOriginLine(MBase) + ' (' + Addr2Str(MsgBase^.GetOrigAddr) + ')'); + + MsgBase^.DoStringLn (' * Origin: ' + GetOriginLine(MBase) + ' (' + Addr2Str(MsgBase^.GetOrigAddr) + ')'); End; - End; If Not IsControl Then Begin - If HasAccess(Self, MBase.PostACS) Then Begin - MsgBase^.WriteMsg; - Inc (RepOK); // must increase user and history posts by repOK + If ((IsQwk) or (HasAccess(Self, MBase.PostACS))) and + ((IsNetworked And (UserRecord.QwkNetwork = MBase.QwkNetID)) or (Not IsNetworked)) Then Begin + MsgBase^.WriteMsg; + + Inc (RepOK); // must increase user and history posts by repOK End Else Inc (RepFailed); End; @@ -642,10 +687,18 @@ Begin MsgBase^.CloseMsgBase; Dispose (MsgBase, Done); - End Else + End Else Begin Inc (RepFailed); - End Else + + For Count1 := 1 to Chunks Do + DataFile.ReadBlock (QwkBlock[1], 128); + End; + End Else Begin Inc (RepFailed); + + For Count1 := 1 to Chunks Do + DataFile.ReadBlock (QwkBlock[1], 128); + End; End; DataFile.Free; diff --git a/mystic/mis_client_ftp.pas b/mystic/mis_client_ftp.pas index c5bb2e3..f865740 100644 --- a/mystic/mis_client_ftp.pas +++ b/mystic/mis_client_ftp.pas @@ -56,7 +56,7 @@ Type Function FindDirectory (Var TempBase: RecFileBase) : LongInt; Function GetQWKName : String; Function GetFTPDate (DD: LongInt) : String; - Procedure SendFile (Str: String); + Function SendFile (Str: String) : Boolean; Function RecvFile (Str: String; IsAppend: Boolean) : Boolean; Function QWKCreatePacket : Boolean; @@ -484,7 +484,7 @@ Begin InTransfer := False; End; -Procedure TFTPServer.SendFile (Str: String); +Function TFTPServer.SendFile (Str: String) : Boolean; Var F : File; Buf : Array[1..FileXferSize] of Byte; @@ -512,8 +512,11 @@ Begin Close (F); - Server.Status(ProcessID, 'Send complete'); + Result := Res = 0; + // need to send failed here if failed what do we send? + + Server.Status(ProcessID, 'Send complete'); Client.WriteLine (re_XferOK); CloseDataSession; @@ -537,15 +540,17 @@ Begin QWK := TQwkEngine.Create(TempPath, GetQWKName, UserPos, User); QWK.HasAccess := @QWKHasAccess; - QWK.IsNetworked := User.Flags AND UserQWKNetwork <> 0; + QWK.IsNetworked := (User.Flags AND UserQWKNetwork <> 0); QWK.IsExtended := User.QwkExtended; - QWK.CreatePacket; - QWK.UpdateLastReadPointers; - QWK.Free; + QWK.ExportPacket(False); ExecuteArchive (TempPath, TempPath + GetQWKName + '.qwk', User.Archive, TempPath + '*', 1); - SendFile (TempPath + GetQWKName + '.qwk'); + + If SendFile (TempPath + GetQWKName + '.qwk') Then + QWK.UpdateLastReadPointers; + + QWK.Free; DirClean (TempPath, ''); End; @@ -567,7 +572,7 @@ Begin QWK.IsNetworked := User.Flags AND UserQWKNetwork <> 0; QWK.IsExtended := User.QwkExtended; - QWK.ProcessReply; + QWK.ImportPacket(False); QWK.Free; // update user stats posts and bbs history if not networked @@ -600,6 +605,9 @@ Begin GetSecurityLevel(User.Security, SecLevel); Server.Status (ProcessID, User.Handle + ' logged in'); + server.status (processID, 'DEBUG Pos ' + strI2S(UserPos)); + if user.flags and userqwknetwork <> 0 then + server.status (processID, 'DEBUG has networking'); End Else Client.WriteLine(re_BadPW); End; diff --git a/mystic/records.pas b/mystic/records.pas index 6e39fff..1fe5974 100644 --- a/mystic/records.pas +++ b/mystic/records.pas @@ -141,7 +141,8 @@ Type HostName : String[60]; Login : String[20]; Password : String[20]; - Res : Array[1..80] of Byte; + ArcType : String[4]; + Res : Array[1..75] of Byte; End; RecSauceInfo = Packed Record @@ -511,7 +512,6 @@ Const MBNoAttach = $00000008; // 4 MBPrivate = $00000010; // 5 MBPrivReply = $00000020; // 6 - MBAllowQWKNet = $00000040; // 7 Type RecMessageBase = Record // MBASES.DAT @@ -549,8 +549,8 @@ Type Created : LongInt; EchoTag : String[40]; // EchoMail Tag QwkNetID : LongInt; - QwkConfID : LongInt; - Res : Array[1..27] of Byte; // RESERVED + QwkConfID : Word; + Res : Array[1..29] of Byte; // RESERVED End; FScanRec = Record { *.SCN } diff --git a/mystic/whatsnew.txt b/mystic/whatsnew.txt index ead125e..2d16d99 100644 --- a/mystic/whatsnew.txt +++ b/mystic/whatsnew.txt @@ -3638,4 +3638,7 @@ This defines the QWK network message bases that they have access to if they are flagged as a QWK network account. + + Mystic's QWK system no longer forces all upper case user names and + subjects. +