From 1fe5fbfd2d3efe4cd911bf86e9380cc03620468c Mon Sep 17 00:00:00 2001 From: mysticbbs Date: Thu, 29 Aug 2013 06:04:20 -0400 Subject: [PATCH] More work towards QWK networking --- mystic/bbs_ansi_help.pas | 7 +- mystic/bbs_ansi_menuform.pas | 10 +- mystic/bbs_cfg_archive.pas | 11 +- mystic/bbs_cfg_echomail.pas | 11 +- mystic/bbs_cfg_events.pas | 11 +- mystic/bbs_cfg_filebase.pas | 11 +- mystic/bbs_cfg_groups.pas | 11 +- mystic/bbs_cfg_menuedit.pas | 1 + mystic/bbs_cfg_msgbase.pas | 5 +- mystic/bbs_cfg_protocol.pas | 11 +- mystic/bbs_cfg_seclevel.pas | 10 +- mystic/bbs_cfg_syscfg.pas | 8 +- mystic/bbs_cfg_theme.pas | 15 +- mystic/bbs_cfg_useredit.pas | 5 +- mystic/bbs_common.pas | 5 +- mystic/bbs_core.pas | 7 +- mystic/bbs_database.pas | 59 +++- mystic/bbs_doors.pas | 9 +- mystic/bbs_edit_ansi.pas | 9 +- mystic/bbs_edit_line.pas | 11 +- mystic/bbs_filebase.pas | 11 +- mystic/bbs_general.pas | 5 +- mystic/bbs_io.pas | 11 +- mystic/bbs_menudata.pas | 2 +- mystic/bbs_menus.pas | 3 +- mystic/bbs_msgbase.pas | 61 ++-- mystic/bbs_msgbase_abs.pas | 2 +- mystic/bbs_msgbase_ansi.pas | 3 +- mystic/bbs_msgbase_jam.pas | 6 +- mystic/bbs_msgbase_qwk.pas | 579 ++------------------------------- mystic/bbs_msgbase_squish.pas | 5 +- mystic/bbs_nodechat.pas | 29 +- mystic/bbs_nodeinfo.pas | 40 +-- mystic/bbs_nodelist.pas | 3 +- mystic/bbs_user.pas | 45 +-- mystic/bbs_userchat.pas | 8 +- mystic/mis.pas | 2 + mystic/mis_client_ftp.pas | 3 + mystic/mpl_execute.pas | 3 +- mystic/mutil.pas | 1 + mystic/mutil_allfiles.pas | 2 +- mystic/mutil_common.pas | 2 +- mystic/mutil_echocore.pas | 2 +- mystic/mutil_echoexport.pas | 8 +- mystic/mutil_echofix.pas | 2 +- mystic/mutil_echoimport.pas | 2 +- mystic/mutil_filebone.pas | 2 +- mystic/mutil_filesbbs.pas | 2 +- mystic/mutil_importmsgbase.pas | 2 +- mystic/mutil_importna.pas | 2 +- mystic/mutil_msgpost.pas | 6 +- mystic/mutil_msgpurge.pas | 2 +- mystic/mutil_toplists.pas | 2 +- mystic/mutil_upload.pas | 2 +- mystic/mystic.pas | 1 + mystic/records.pas | 7 +- mystic/todo.pas | 73 ++++- mystic/whatsnew.txt | 3 + 58 files changed, 395 insertions(+), 776 deletions(-) diff --git a/mystic/bbs_ansi_help.pas b/mystic/bbs_ansi_help.pas index a7ad56a..4482363 100644 --- a/mystic/bbs_ansi_help.pas +++ b/mystic/bbs_ansi_help.pas @@ -40,10 +40,9 @@ Implementation Uses m_Strings, - bbs_Ansi_MenuBox, - bbs_Core, - bbs_Common, - bbs_dataBase, + BBS_Records, + BBS_Ansi_MenuBox, + BBS_Core, MPL_Execute; Constructor TAnsiMenuHelp.Create; diff --git a/mystic/bbs_ansi_menuform.pas b/mystic/bbs_ansi_menuform.pas index ef2f370..e521418 100644 --- a/mystic/bbs_ansi_menuform.pas +++ b/mystic/bbs_ansi_menuform.pas @@ -6,9 +6,8 @@ Interface Uses m_Types, - bbs_Ansi_MenuInput, - bbs_dataBase, - bbs_Common; + BBS_Records, + BBS_Ansi_MenuInput; Const FormMaxItems = 60; @@ -137,8 +136,9 @@ Implementation Uses m_FileIO, m_Strings, - bbs_Core, - bbs_Ansi_MenuBox; + BBS_Common, + BBS_Core, + BBS_Ansi_MenuBox; Constructor TAnsiMenuForm.Create; Begin diff --git a/mystic/bbs_cfg_archive.pas b/mystic/bbs_cfg_archive.pas index 131e100..185baad 100644 --- a/mystic/bbs_cfg_archive.pas +++ b/mystic/bbs_cfg_archive.pas @@ -11,11 +11,12 @@ Implementation Uses m_FileIO, m_Strings, - bbs_Common, - bbs_dataBase, - bbs_Ansi_MenuBox, - bbs_Ansi_MenuForm, - bbs_cfg_Common; + BBS_Records, + BBS_DataBase, + BBS_Common, + BBS_Ansi_MenuBox, + BBS_Ansi_MenuForm, + BBS_Cfg_Common; Procedure EditArchive (Var Arc: RecArchive); Var diff --git a/mystic/bbs_cfg_echomail.pas b/mystic/bbs_cfg_echomail.pas index f01d49b..b083dd1 100644 --- a/mystic/bbs_cfg_echomail.pas +++ b/mystic/bbs_cfg_echomail.pas @@ -6,8 +6,7 @@ Interface Uses BBS_Core, - BBS_Common, - bbs_dataBase; + BBS_Records; Function GetNodeByIndex (Num: LongInt; Var TempNode: RecEchoMailNode) : Boolean; Procedure AddExportByBase (Var MBase: RecMessageBase; Idx: LongInt); @@ -27,7 +26,9 @@ Uses bbs_Ansi_MenuBox, bbs_Ansi_MenuForm, bbs_cfg_Common, - bbs_Cfg_MsgBase; + bbs_Cfg_MsgBase, + BBS_Common, + BBS_DataBase; Function IsExportNode (Var MBase: RecMessageBase; Idx: LongInt) : Boolean; Var @@ -239,7 +240,7 @@ Begin NewIdx := Configuration_MessageBaseEditor(False); If NewIdx <> -1 Then - If Session.Msgs.GetBaseByIndex(NewIdx, MBase) Then Begin + If GetMBaseByIndex(NewIdx, MBase) Then Begin If MBase.EchoTag = '' Then ShowMsgBox(0, 'Missing ECHOTAG for ' + strStripPipe(MBase.Name)) Else @@ -248,7 +249,7 @@ Begin End; 'D' : If List.ListMax > 0 Then If ShowMsgBox(1, 'Delete this entry?') Then - If Session.Msgs.GetBaseByIndex (strS2I(strWordGet(1, List.List[List.Picked]^.Name, ' ')), MBase) Then Begin + If GetMBaseByIndex (strS2I(strWordGet(1, List.List[List.Picked]^.Name, ' ')), MBase) Then Begin RemoveExportFromBase(MBase, Node.Index); End; diff --git a/mystic/bbs_cfg_events.pas b/mystic/bbs_cfg_events.pas index ec7c3b1..39f54bf 100644 --- a/mystic/bbs_cfg_events.pas +++ b/mystic/bbs_cfg_events.pas @@ -12,11 +12,12 @@ Uses m_Strings, m_DateTime, m_FileIO, - bbs_Common, - bbs_dataBase, - bbs_ansi_MenuBox, - bbs_ansi_MenuForm, - bbs_cfg_Common; + BBS_Records, + BBS_DataBase, + BBS_Common, + BBS_Ansi_MenuBox, + BBS_Ansi_MenuForm, + BBS_Cfg_Common; Procedure EditEvent (Var Event: RecEvent); Var diff --git a/mystic/bbs_cfg_filebase.pas b/mystic/bbs_cfg_filebase.pas index 76a7483..59a87bc 100644 --- a/mystic/bbs_cfg_filebase.pas +++ b/mystic/bbs_cfg_filebase.pas @@ -13,11 +13,12 @@ Uses m_Strings, m_FileIO, m_QuickSort, - bbs_Ansi_MenuBox, - bbs_Ansi_MenuForm, - bbs_Common, - bbs_DataBase, - bbs_cfg_Common; + BBS_Ansi_MenuBox, + BBS_Ansi_MenuForm, + BBS_Records, + BBS_DataBase, + BBS_Common, + BBS_Cfg_Common; Type RecFileBaseFile = File of RecFileBase; diff --git a/mystic/bbs_cfg_groups.pas b/mystic/bbs_cfg_groups.pas index 54055be..46fbedf 100644 --- a/mystic/bbs_cfg_groups.pas +++ b/mystic/bbs_cfg_groups.pas @@ -9,11 +9,12 @@ Implementation Uses m_FileIO, m_Strings, - bbs_Ansi_MenuBox, - bbs_Ansi_MenuForm, - bbs_cfg_Common, - bbs_dataBase, - bbs_Common; + BBS_Ansi_MenuBox, + BBS_Ansi_MenuForm, + BBS_Cfg_Common, + BBS_Records, + BBS_DataBase, + BBS_Common; Procedure EditGroup (Var Group: RecGroup); Var diff --git a/mystic/bbs_cfg_menuedit.pas b/mystic/bbs_cfg_menuedit.pas index 272f151..6839d05 100644 --- a/mystic/bbs_cfg_menuedit.pas +++ b/mystic/bbs_cfg_menuedit.pas @@ -19,6 +19,7 @@ Uses bbs_Ansi_MenuForm, BBS_Core, BBS_Common, + BBS_Records, BBS_MenuData, bbs_dataBase, bbs_cfg_Theme, diff --git a/mystic/bbs_cfg_msgbase.pas b/mystic/bbs_cfg_msgbase.pas index 84e6bff..57e4aba 100644 --- a/mystic/bbs_cfg_msgbase.pas +++ b/mystic/bbs_cfg_msgbase.pas @@ -18,8 +18,9 @@ Uses bbs_Ansi_MenuForm, bbs_Cfg_Common, bbs_Cfg_EchoMail, - bbs_Common, - bbs_dataBase; + BBS_Records, + BBS_DataBase, + BBS_Common; Type RecMessageBaseFile = File of RecMessageBase; diff --git a/mystic/bbs_cfg_protocol.pas b/mystic/bbs_cfg_protocol.pas index fe23ca4..5407c12 100644 --- a/mystic/bbs_cfg_protocol.pas +++ b/mystic/bbs_cfg_protocol.pas @@ -11,11 +11,12 @@ Implementation Uses m_FileIO, m_Strings, - bbs_Common, - bbs_dataBase, - bbs_ansi_MenuBox, - bbs_ansi_MenuForm, - bbs_cfg_Common; + BBS_Records, + BBS_DataBase, + BBS_Common, + BBS_Ansi_MenuBox, + BBS_Ansi_MenuForm, + BBS_Cfg_Common; Procedure EditProtocol (Var Prot: RecProtocol); Var diff --git a/mystic/bbs_cfg_seclevel.pas b/mystic/bbs_cfg_seclevel.pas index 4fcc03f..6467cf1 100644 --- a/mystic/bbs_cfg_seclevel.pas +++ b/mystic/bbs_cfg_seclevel.pas @@ -11,11 +11,11 @@ Implementation Uses m_Strings, m_FileIO, - bbs_Common, - bbs_dataBase, - bbs_Ansi_MenuBox, - bbs_Ansi_MenuForm, - bbs_Cfg_Common; + BBS_Records, + BBS_DataBase, + BBS_Ansi_MenuBox, + BBS_Ansi_MenuForm, + BBS_Cfg_Common; Procedure EditLevel (Var Sec: RecSecurity); Var diff --git a/mystic/bbs_cfg_syscfg.pas b/mystic/bbs_cfg_syscfg.pas index 813b134..f6e38d3 100644 --- a/mystic/bbs_cfg_syscfg.pas +++ b/mystic/bbs_cfg_syscfg.pas @@ -26,10 +26,10 @@ Implementation Uses m_Strings, - bbs_Common, - bbs_dataBase, - bbs_ansi_MenuBox, - bbs_ansi_MenuForm; + BBS_Records, + BBS_DataBase, + BBS_Ansi_MenuBox, + BBS_Ansi_MenuForm; Procedure Configuration_SysPaths; Var diff --git a/mystic/bbs_cfg_theme.pas b/mystic/bbs_cfg_theme.pas index 53345e2..097ab52 100644 --- a/mystic/bbs_cfg_theme.pas +++ b/mystic/bbs_cfg_theme.pas @@ -12,13 +12,14 @@ Uses m_Types, m_FileIO, m_Strings, - bbs_Ansi_MenuBox, - bbs_Ansi_MenuForm, - bbs_Ansi_MenuInput, - bbs_Core, - bbs_Common, - bbs_dataBase, - bbs_Cfg_Common; + BBS_Ansi_MenuBox, + BBS_Ansi_MenuForm, + BBS_Ansi_MenuInput, + BBS_Core, + BBS_Records, + BBS_DataBase, + BBS_Common, + BBS_Cfg_Common; (* Procedure CompileTheme (Var Theme: RecTheme); diff --git a/mystic/bbs_cfg_useredit.pas b/mystic/bbs_cfg_useredit.pas index 1146975..d299a79 100644 --- a/mystic/bbs_cfg_useredit.pas +++ b/mystic/bbs_cfg_useredit.pas @@ -3,8 +3,7 @@ Unit bbs_Cfg_UserEdit; Interface Uses - bbs_Common, - bbs_dataBase; + BBS_Records; Procedure Configuration_EditUser (Var U: RecUser); Procedure Configuration_UserEditor; @@ -22,6 +21,8 @@ Uses bbs_io, bbs_Core, bbs_General, + BBS_Common, + BBS_DataBase, bbs_Cfg_SecLevel; Procedure Configuration_EditUser (Var U: RecUser); diff --git a/mystic/bbs_common.pas b/mystic/bbs_common.pas index 9c35e60..295a221 100644 --- a/mystic/bbs_common.pas +++ b/mystic/bbs_common.pas @@ -18,7 +18,7 @@ Uses m_Input, m_DateTime, m_FileIO, - bbs_dataBase; + BBS_Records; // This unit is very old (like 1994) and its functions need to be phased out // This is the stuff that hasn't been worked into a class somewhere or @@ -26,7 +26,6 @@ Uses Const WinConsoleTitle = mysSoftwareID + ' Node '; - CopyID = 'Copyright (C) ' + mysCopyYear + ' By James Coyle'; DateTypeStr : Array[1..4] of String[8] = ('MM/DD/YY', 'DD/MM/YY', 'YY/DD/MM', 'Ask '); Var @@ -36,7 +35,6 @@ Var ConfigFile : File of RecConfig; ChatFile : File of ChatRec; RoomFile : File of RoomRec; - Chat : ChatRec; Room : RoomRec; LastOnFile : File of RecLastOn; LastOn : RecLastOn; @@ -60,6 +58,7 @@ Implementation Uses DOS, bbs_Core, + BBS_DataBase, {$IFNDEF UNIX} bbs_SysOpChat, {$ENDIF} diff --git a/mystic/bbs_core.pas b/mystic/bbs_core.pas index 65a56b1..9f6b3fb 100644 --- a/mystic/bbs_core.pas +++ b/mystic/bbs_core.pas @@ -13,8 +13,7 @@ Uses m_Strings, m_Pipe, m_DateTime, - bbs_dataBase, -// BBS_Common, + BBS_Records, BBS_IO, BBS_MsgBase, BBS_User, @@ -40,6 +39,7 @@ Type ThemeFile : File of RecTheme; VoteFile : File of VoteRec; Vote : VoteRec; + Chat : ChatRec; CommHandle : LongInt; ShutDown : Boolean; TempPath : String; @@ -103,6 +103,9 @@ Var Implementation +Uses + BBS_DataBase; + Constructor TBBSCore.Create; Begin Inherited Create; diff --git a/mystic/bbs_database.pas b/mystic/bbs_database.pas index 091e8f3..fdb66a7 100644 --- a/mystic/bbs_database.pas +++ b/mystic/bbs_database.pas @@ -1,20 +1,14 @@ -Unit bbs_dataBase; - -// This unit us a work in progress designed to move lower level functions -// away from session-tied objects and into a unit usable for external -// utilities. Keeping them procedural instead of object-based also has some -// additional smartlinking benefits in the long run. - -// The drawback of a non-abstract object is that we cannot easily define -// alternate data sources such as a INI or SQL backend. Because of that, -// this MAY change in the future -- particularly if we can smartlink at the -// method level of classes in future FP releases. +Unit BBS_DataBase; {$I M_OPS.PAS} Interface -{$I RECORDS.PAS} +Uses + BBS_Records, + BBS_MsgBase_ABS, + BBS_MsgBase_JAM, + BBS_MsgBase_Squish; Var bbsCfg : RecConfig; @@ -33,6 +27,7 @@ Function PutBaseConfiguration (Var TempCfg: RecConfig) : Boolean; // MESSAGE BASE +Function MBaseOpenCreate (Var Msg: PMsgBaseABS; Var Area: RecMessageBase; TP: String) : Boolean; Function GetMBaseByIndex (Num: LongInt; Var TempBase: RecMessageBase) : Boolean; Procedure GetMessageScan (UN: Cardinal; TempBase: RecMessageBase; Var TempScan: MScanRec); Procedure PutMessageScan (UN: Cardinal; TempBase: RecMessageBase; TempScan: MScanRec); @@ -41,11 +36,16 @@ Procedure PutMessageScan (UN: Cardinal; TempBase: RecMessageBase; TempSca Function GetTotalFiles (Var TempBase: RecFileBase) : LongInt; +// USER + +Function IsThisUser (U: RecUser; Str: String) : Boolean; + Implementation Uses DOS, - m_FileIO; + m_FileIO, + m_Strings; Function GetBaseConfiguration (UseEnv: Boolean; Var TempCfg: RecConfig) : Byte; Var @@ -168,6 +168,33 @@ Begin Close (ScanFile); End; +Function MBaseOpenCreate (Var Msg: PMsgBaseABS; Var Area: RecMessageBase; TP: String) : Boolean; +Begin + Result := False; + + Case Area.BaseType of + 0 : Msg := New(PMsgBaseJAM, Init); + 1 : Msg := New(PMsgBaseSquish, Init); + End; + + Msg^.SetMsgPath (Area.Path + Area.FileName); + Msg^.SetTempFile (TP + 'msgbuf.'); + + If Not Msg^.OpenMsgBase Then + If Not Msg^.CreateMsgBase (Area.MaxMsgs, Area.MaxAge) Then Begin + Dispose (Msg, Done); + + Exit; + End Else + If Not Msg^.OpenMsgBase Then Begin + Dispose (Msg, Done); + + Exit; + End; + + Result := True; +End; + Function GetTotalFiles (Var TempBase: RecFileBase) : LongInt; Begin Result := 0; @@ -180,6 +207,12 @@ Begin Result := Result DIV SizeOf(RecFileList); End; +Function IsThisUser (U: RecUser; Str: String) : Boolean; +Begin + Str := strUpper(Str); + Result := (strUpper(U.RealName) = Str) or (strUpper(U.Handle) = Str); +End; + Initialization bbsCfgStatus := GetBaseConfiguration(True, bbsCfg); diff --git a/mystic/bbs_doors.pas b/mystic/bbs_doors.pas index 68c6b10..41f2d2b 100644 --- a/mystic/bbs_doors.pas +++ b/mystic/bbs_doors.pas @@ -18,10 +18,11 @@ Uses m_Strings, m_DateTime, m_FileIO, - bbs_Common, - bbs_dataBase, - bbs_Core, - bbs_User; + BBS_Records, + BBS_Common, + BBS_DataBase, + BBS_Core, + BBS_User; Const Ending : String[2] = #13#10; diff --git a/mystic/bbs_edit_ansi.pas b/mystic/bbs_edit_ansi.pas index 3ebc967..646e343 100644 --- a/mystic/bbs_edit_ansi.pas +++ b/mystic/bbs_edit_ansi.pas @@ -6,7 +6,7 @@ Interface Uses m_FileIO, - bbs_MsgBase_ANSI; + BBS_MsgBase_Ansi; Const fseMaxCutText = 60; @@ -89,10 +89,9 @@ Implementation Uses m_Strings, - bbs_Core, - bbs_DataBase, - bbs_Common, - bbs_Ansi_MenuBox; + BBS_Records, + BBS_Core, + BBS_Ansi_MenuBox; Constructor TEditorANSI.Create (Var O: Pointer; TemplateFile: String); Begin diff --git a/mystic/bbs_edit_line.pas b/mystic/bbs_edit_line.pas index 43cfa1c..e0a4537 100644 --- a/mystic/bbs_edit_line.pas +++ b/mystic/bbs_edit_line.pas @@ -12,11 +12,12 @@ Implementation Uses m_Strings, m_FileIO, - bbs_Common, - bbs_DataBase, - bbs_Core, - bbs_FileBase, - bbs_User; + BBS_Common, + BBS_Records, + BBS_DataBase, + BBS_Core, + BBS_FileBase, + BBS_User; Var CurLine : Integer; diff --git a/mystic/bbs_filebase.pas b/mystic/bbs_filebase.pas index 0b84da6..7885bd9 100644 --- a/mystic/bbs_filebase.pas +++ b/mystic/bbs_filebase.pas @@ -19,11 +19,12 @@ Uses m_Strings, m_FileIO, m_DateTime, - bbs_Common, - bbs_dataBase, - bbs_General, - bbs_NodeInfo, - bbs_Ansi_MenuBox, + BBS_Records, + BBS_Common, + BBS_DataBase, + BBS_General, + BBS_NodeInfo, + BBS_Ansi_MenuBox, AView, {$IFDEF USEALTPROT} m_Prot_Base, diff --git a/mystic/bbs_general.pas b/mystic/bbs_general.pas index b2bf0f6..411d6d9 100644 --- a/mystic/bbs_general.pas +++ b/mystic/bbs_general.pas @@ -11,8 +11,8 @@ Uses Windows, bbs_SysopChat, {$ENDIF} - bbs_Common, - bbs_database, + BBS_Records, + BBS_Common, bbs_Edit_ANSI, bbs_Edit_Line; @@ -51,6 +51,7 @@ Uses m_FileIO, m_QuickSort, bbs_Core, + BBS_DataBase, bbs_MsgBase_Ansi, bbs_NodeInfo; diff --git a/mystic/bbs_io.pas b/mystic/bbs_io.pas index f007cc4..38aaac5 100644 --- a/mystic/bbs_io.pas +++ b/mystic/bbs_io.pas @@ -18,8 +18,7 @@ Uses m_FileIO, m_Strings, m_Term_Ansi, - bbs_Common, - bbs_dataBase; + BBS_Records; Const TBBSIOBufferSize = 4 * 1024 - 1; @@ -119,7 +118,9 @@ Implementation Uses DOS, - bbs_Core, + BBS_Core, + BBS_DataBase, + BBS_Common, bbs_General, bbs_NodeInfo; @@ -602,7 +603,7 @@ Begin 'G' : LastMCIValue := strI2S(DaysAgo(TBBSCore(Core).User.ThisUser.Birthday, 1) DIV 365); 'O' : AllowAbort := False; 'S' : LastMCIValue := OutON(TBBSCore(Core).User.ThisUser.SigUse); - 'V' : LastMCIValue := OutYN(Chat.Available); + 'V' : LastMCIValue := OutYN(Session.Chat.Available); End; 'B' : Case Code[2] of 'D' : If TBBSCore(Core).LocalMode Then @@ -656,7 +657,7 @@ Begin FmtString := True; FmtType := 12; End; - 'L' : LastMCIValue := OutON(Chat.Invisible); + 'L' : LastMCIValue := OutON(Session.Chat.Invisible); 'S' : Begin FmtString := True; FmtType := 14; diff --git a/mystic/bbs_menudata.pas b/mystic/bbs_menudata.pas index b69c2ac..bfa2b70 100644 --- a/mystic/bbs_menudata.pas +++ b/mystic/bbs_menudata.pas @@ -6,7 +6,7 @@ Interface Uses m_Strings, - bbs_dataBase; + BBS_Records; Type TMenuData = Class diff --git a/mystic/bbs_menus.pas b/mystic/bbs_menus.pas index f00a945..0e01654 100644 --- a/mystic/bbs_menus.pas +++ b/mystic/bbs_menus.pas @@ -5,8 +5,9 @@ Unit BBS_Menus; Interface Uses + BBS_Records, BBS_Common, - bbs_dataBase, + BBS_DataBase, BBS_MenuData, MPL_Execute; diff --git a/mystic/bbs_msgbase.pas b/mystic/bbs_msgbase.pas index 53eb384..b6ea54c 100644 --- a/mystic/bbs_msgbase.pas +++ b/mystic/bbs_msgbase.pas @@ -7,8 +7,8 @@ Interface Uses m_FileIO, m_DateTime, - bbs_Common, - bbs_dataBase, + BBS_Records, + BBS_Common, bbs_General, bbs_MsgBase_ABS, bbs_MsgBase_JAM, @@ -35,12 +35,12 @@ Type Destructor Destroy; Override; Function IsQuotedText (Str: String) : Boolean; - Function OpenCreateBase (Var Msg: PMsgBaseABS; Var Area: RecMessageBase) : Boolean; +// Function OpenCreateBase (Var Msg: PMsgBaseABS; Var Area: RecMessageBase) : Boolean; Procedure AppendMessageText (Var Msg: PMsgBaseABS; Lines: Integer; ReplyID: String); Procedure AssignMessageData (Var Msg: PMsgBaseABS; Var TempBase: RecMessageBase); Function GetBaseByNum (Num: LongInt; Var TempBase: RecMessageBase) : Boolean; Function GetBaseCompressed (Num: LongInt; Var TempBase: RecMessageBase) : Boolean; - Function GetBaseByIndex (Num: LongInt; Var TempBase: RecMessageBase) : Boolean; +// Function GetBaseByIndex (Num: LongInt; Var TempBase: RecMessageBase) : Boolean; Function GetMessageStats (List, ShowPrompt, ShowYou: Boolean; Var ListPtr: LongInt; Var TempBase: RecMessageBase; NoFrom, NoRead: Boolean; Var Total, New, Yours: LongInt) : Boolean; Procedure GetMailStats (Var Total, UnRead: LongInt); Function GetMatchedAddress (Orig, Dest: RecEchoMailAddr) : RecEchoMailAddr; @@ -80,6 +80,9 @@ Implementation Uses m_Strings, +// BBS_Records, +// BBS_Common, + BBS_DataBase, bbs_Core, bbs_User, bbs_NodeInfo, @@ -303,6 +306,7 @@ Begin Result := (Temp > 0) and (Temp < 5); End; +(* Function TMsgBase.OpenCreateBase (Var Msg: PMsgBaseABS; Var Area: RecMessageBase) : Boolean; Begin Result := False; @@ -327,6 +331,7 @@ Begin Result := True; End; +*) Function TMsgBase.GetBaseByNum (Num: LongInt; Var TempBase: RecMessageBase) : Boolean; Var @@ -374,6 +379,7 @@ Begin Result := Count = Num; End; +(* Function TMsgBase.GetBaseByIndex (Num: LongInt; Var TempBase: RecMessageBase) : Boolean; Var F : File; @@ -395,6 +401,7 @@ Begin Close (F); End; +*) Function TMsgBase.GetTotalBases (Compressed: Boolean) : LongInt; Var @@ -429,7 +436,7 @@ Begin If TempBase.Name = 'None' Then Exit; - If OpenCreateBase(TempMsg, TempBase) Then Begin + If MBaseOpenCreate(TempMsg, TempBase, Session.TempPath) Then Begin Result := TempMsg^.NumberOfMsgs; TempMsg^.CloseMsgBase; @@ -449,7 +456,7 @@ Begin If TempBase.Name = 'None' Then Exit; - If OpenCreateBase(TempMsg, TempBase) Then Begin + If MBaseOpenCreate(TempMsg, TempBase, Session.TempPath) Then Begin Total := TempMsg^.NumberOfMsgs; TempMsg^.SeekFirst(TempMsg^.GetLastRead(Session.User.UserNum) + 1); @@ -550,7 +557,7 @@ Begin Read (MBaseFile, TempBase); Close (MBaseFile); - If OpenCreateBase (MsgBase, TempBase) Then Begin + If MBaseOpenCreate (MsgBase, TempBase, Session.TempPath) Then Begin MsgBase^.SeekFirst (1); While MsgBase^.SeekFound Do Begin @@ -1404,7 +1411,7 @@ Begin If Editor(Lines, ColumnValue[Session.Theme.ColumnSize] - 2, mysMaxMsgLines, False, fn_tplMsgEdit, Subj) Then Begin Session.io.OutFull (Session.GetPrompt(107)); - If Not OpenCreateBase(MsgNew, ReplyBase) Then Exit; + If Not MBaseOpenCreate(MsgNew, ReplyBase, Session.TempPath) Then Exit; AssignMessageData(MsgNew, ReplyBase); @@ -1666,7 +1673,7 @@ Var Session.io.OutFullLn (Session.GetPrompt(318)); - If Not OpenCreateBase(MsgNew, TempBase) Then Break; + If Not MBaseOpenCreate(MsgNew, TempBase, Session.TempPath) Then Break; MsgNew^.StartNewMsg; @@ -3151,7 +3158,7 @@ Begin { notifications out to the sysop for various things (configurable) } { also could be used in mass email rewrite and qwk .REP rewrite } - If Not OpenCreateBase(MsgBase, MBase) Then Begin + If Not MBaseOpenCreate(MsgBase, MBase, Session.TempPath) Then Begin MBase := Old; Session.User.IgnoreGroup := SaveGroup; @@ -3238,7 +3245,7 @@ Begin Exit; End; - If OpenCreateBase (MsgBase, MBase) Then Begin + If MBaseOpenCreate (MsgBase, MBase, Session.TempPath) Then Begin MsgBase^.SeekFirst (1); While MsgBase^.SeekFound Do Begin @@ -3288,7 +3295,8 @@ End; Procedure TMsgBase.SetMessagePointers (ForceGlobal: Boolean); Var - NewDate : LongInt; + NewDate : LongInt; + TempBase : RecMessageBase; Procedure UpdateBase; Var @@ -3296,12 +3304,12 @@ Var Begin Found := False; - Case MBase.BaseType of + Case TempBase.BaseType of 0 : MsgBase := New(PMsgBaseJAM, Init); 1 : MsgBase := New(PMsgBaseSquish, Init); End; - MsgBase^.SetMsgPath (MBase.Path + MBase.FileName); + MsgBase^.SetMsgPath (TempBase.Path + TempBase.FileName); If MsgBase^.OpenMsgBase Then Begin MsgBase^.SeekFirst(1); @@ -3344,14 +3352,18 @@ Begin If ForceGlobal Then Begin ioReset (MBaseFile, SizeOf(RecMessageBase), fmRWDN); - ioRead (MBaseFile, MBase); + ioRead (MBaseFile, TempBase); While Not Eof(MBaseFile) Do Begin - ioRead (MBaseFile, MBase); + ioRead (MBaseFile, TempBase); + UpdateBase; End; - End Else + End Else Begin + TempBase := MBase; + UpdateBase; + End; End; Procedure TMsgBase.MessageNewScan (Data: String); @@ -3844,7 +3856,7 @@ Begin // 3) add autosig? if we cannot use the assignmsgdata things Result := False; - If Not OpenCreateBase(Msg, mArea) Then Exit; + If Not MBaseOpenCreate(Msg, mArea, Session.TempPath) Then Exit; Msg^.StartNewMsg; Msg^.SetLocal (True); @@ -4238,7 +4250,7 @@ Var Begin MsgAdded := 0; - If Not OpenCreateBase(MsgBase, MBase) Then Exit; + If Not MBaseOpenCreate(MsgBase, MBase, Session.TempPath) Then Exit; Session.io.OutFull (Session.GetPrompt(231)); @@ -4389,7 +4401,7 @@ Begin FileMode := 66; Old := MBase; - Temp := strPadR('Produced By ' + mysSoftwareID + ' v' + mysVersion + '. ' + CopyID, 128, ' '); + Temp := strPadR('Produced By ' + mysSoftwareID + ' v' + mysVersion + '. ' + mysCopyNotice, 128, ' '); Assign (DataFile, Session.TempPath + 'messages.dat'); ReWrite (DataFile, 1); @@ -4484,13 +4496,14 @@ Begin Dispose(MsgBase, Done); End; Close (QwkLRFile); + Close (MBaseFile); End; End Else Session.io.OutFullLn (Session.GetPrompt(228)); Session.User.IgnoreGroup := False; - Close (MBaseFile); +// Close (MBaseFile); MBase := Old; @@ -4521,7 +4534,7 @@ Var Begin OldBase := MBase; - If GetBaseByIndex(Idx, MBase) Then Begin + If GetMBaseByIndex(Idx, MBase) Then Begin GetMessageScan; MScan.QwkScan := Mode; @@ -4580,9 +4593,9 @@ Begin QwkBlock[0] := #7; - If GetBaseByIndex(strS2I(QwkBlock), TempBase) Then Begin + If GetMBaseByIndex(strS2I(QwkBlock), TempBase) Then Begin - If OpenCreateBase(MsgBase, TempBase) Then Begin + If MBaseOpenCreate(MsgBase, TempBase, Session.TempPath) Then Begin AssignMessageData(MsgBase, TempBase); diff --git a/mystic/bbs_msgbase_abs.pas b/mystic/bbs_msgbase_abs.pas index 712a89e..6118eb6 100644 --- a/mystic/bbs_msgbase_abs.pas +++ b/mystic/bbs_msgbase_abs.pas @@ -7,7 +7,7 @@ Unit BBS_MsgBase_ABS; Interface Uses - bbs_dataBase; + BBS_Records; Type MsgMailType = (mmtNormal, mmtEchoMail, mmtNetMail); diff --git a/mystic/bbs_msgbase_ansi.pas b/mystic/bbs_msgbase_ansi.pas index d68ec72..0d7d144 100644 --- a/mystic/bbs_msgbase_ansi.pas +++ b/mystic/bbs_msgbase_ansi.pas @@ -6,8 +6,7 @@ Interface Uses m_Strings, - BBS_Common, - bbs_dataBase; + BBS_Records; Type RecAnsiBufferChar = Record diff --git a/mystic/bbs_msgbase_jam.pas b/mystic/bbs_msgbase_jam.pas index b60a044..c34fdfc 100644 --- a/mystic/bbs_msgbase_jam.pas +++ b/mystic/bbs_msgbase_jam.pas @@ -11,9 +11,9 @@ Interface Uses m_Strings, - bbs_Common, - bbs_dataBase, - bbs_MsgBase_ABS; + BBS_Records, + BBS_Common, + BBS_MsgBase_ABS; Const JamIdxBufSize = 200; diff --git a/mystic/bbs_msgbase_qwk.pas b/mystic/bbs_msgbase_qwk.pas index 01fa978..b32d177 100644 --- a/mystic/bbs_msgbase_qwk.pas +++ b/mystic/bbs_msgbase_qwk.pas @@ -1,19 +1,13 @@ Unit bbs_MsgBase_QWK; -// networking notes: -// no control files -// no file list -// no index files -// extended = selectable by user's setting -// archive = selectable by user's setting - {$I M_OPS.PAS} Interface Uses m_FileIO, - bbs_DataBase; + BBS_Records, + BBS_DataBase; Const QWK_EOL = #13#10; @@ -48,26 +42,29 @@ Type Pos : LongInt; End; - TQWKEngine_HasAccess = Function (AcsStr: String) : Boolean; + TQWKEngine_HasAccess = Function (AcsStr: String) : Boolean; + TQWKEngine_Status = Procedure (Sender: Pointer; State: Byte); TQWKEngine = Class + StatusUpdate : TQWKEngine_Status; + HasAccess : TQWKEngine_HasAccess; IsExtended : Boolean; IsNetworked : Boolean; WorkPath : String; PacketID : String; UserRecord : RecUser; UserNumber : Cardinal; - HasAccess : TQWKEngine_HasAccess; - TotalMessages : Cardinal; - TotalBases : Cardinal; + TotalMessages : LongInt; + TotalBases : LongInt; RepOK : LongInt; RepFailed : LongInt; RepBaseAdd : LongInt; RepBaseDel : LongInt; DataFile : TFileBuffer; + MBase : RecMessageBase; Constructor Create (QwkPath, QwkID: String; UN: Cardinal; UR: RecUser); - Procedure LONG2MSB (Index : LongInt; Var MS : BSingle); + Procedure LONG2MSB (Index: LongInt; Var MS: BSingle); Procedure WriteDOORID; Procedure WriteTOREADEREXT; Procedure WriteCONTROLDAT; @@ -80,7 +77,10 @@ Implementation Uses m_Strings, - m_DateTime; + m_DateTime, + BBS_MsgBase_ABS, + BBS_MsgBase_JAM, + BBS_MsgBase_Squish; Constructor TQWKEngine.Create (QwkPath, QwkID: String; UN: Cardinal; UR: RecUser); Begin @@ -208,7 +208,7 @@ Begin Write (TempFile, QWK_EOL); Write (TempFile, QWK_EOL); Write (TempFile, bbsCfg.SysopName + QWK_EOL); - Write (TempFile, '0,' + bbsCfg.qwkBBSID + 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, QWK_EOL); @@ -254,6 +254,7 @@ Var LastRead : LongInt; QwkIndex : LongInt; TooBig : Boolean; + MsgBase : PMsgBaseABS; Procedure DoString (Str: String); Var @@ -275,7 +276,7 @@ Var Begin MsgAdded := 0; - If Not OpenCreateBase(MsgBase, MBase) Then Exit; + If Not MBaseOpenCreate(MsgBase, MBase, WorkPath) Then Exit; LastRead := MsgBase^.GetLastRead(UserNumber) + 1; @@ -285,24 +286,24 @@ Begin If Not IsNetworked Then If ((bbsCfg.QwkMaxBase > 0) and (MsgAdded = bbsCfg.QwkMaxBase)) or - ((bbsCfg.QwkMaxPacket > 0) and (TotalMsgs = bbsCfg.QwkMaxPacket)) Then Break; + ((bbsCfg.QwkMaxPacket > 0) and (TotalMessages = bbsCfg.QwkMaxPacket)) Then Break; MsgBase^.MsgStartUp; - If MsgBase^.IsPriv And Not Session.User.IsThisUser(MsgBase^.GetTo) Then Begin + If MsgBase^.IsPriv And Not IsThisUser(UserRecord, MsgBase^.GetTo) Then Begin MsgBase^.SeekNext; Continue; End; Inc (MsgAdded); - Inc (TotalMsgs); + Inc (TotalMessages); LastRead := MsgBase^.GetMsgNum; Chunks := 0; BufStr := ''; TooBig := False; - QwkIndex := FileSize(DataFile) DIV 128 + 1; + QwkIndex := DataFile.FileSizeRaw DIV 128 + 1; MsgBase^.MsgTxtStartUp; @@ -335,13 +336,15 @@ Begin ' ' + ' '; - If MsgAdded = 1 Then Begin - Assign (NdxFile, WorkPath + strPadL(strI2S(MBase.Index), 3, '0') + '.ndx'); - ReWrite (NdxFile); - End; + If Not IsNetworked Then Begin + If MsgAdded = 1 Then Begin + Assign (NdxFile, WorkPath + strPadL(strI2S(MBase.Index), 3, '0') + '.ndx'); + ReWrite (NdxFile); + End; - LONG2MSB (QwkIndex, NdxHdr.MsgPos); - Write (NdxFile, NdxHdr); + LONG2MSB (QwkIndex, NdxHdr.MsgPos); + Write (NdxFile, NdxHdr); + End; DataFile.WriteBlock (Header[1], 128); @@ -386,9 +389,11 @@ Begin MsgBase^.SeekNext; End; - If MsgAdded > 0 Then Close (NdxFile); + If Not IsNetworked And (MsgAdded > 0) Then + Close (NdxFile); MsgBase^.CloseMsgBase; + Dispose (MsgBase, Done); Result := LastRead; @@ -400,7 +405,6 @@ Var QwkLR : QwkLRRec; QwkLRFile : File of QwkLRRec; MBaseFile : File; - MBase : RecMessageBase; MScan : MScanRec; Begin DataFile := TFileBuffer.Create(4 * 1024); @@ -432,6 +436,8 @@ Begin GetMessageScan (UserNumber, MBase, MScan); If MScan.QwkScan > 0 Then Begin + Inc (TotalBases); + QwkLR.Base := FilePos(MBaseFile); QwkLR.Pos := WriteMSGDAT; @@ -460,520 +466,3 @@ Begin End; End. - - - - - - - -Function TMsgBase.WriteMSGDAT (Extended: Boolean) : LongInt; -Var - DataFile : File; - NdxFile : File of QwkNdxHdr; - NdxHdr : QwkNdxHdr; - Header : String[128]; - Chunks : Word; - BufStr : String[128]; - MsgAdded : Integer; - LastRead : LongInt; - QwkIndex : LongInt; - TooBig : Boolean; - - Procedure DoString (Str: String); - Var - Count : SmallInt; - Begin - For Count := 1 to Length(Str) Do Begin - BufStr := BufStr + Str[Count]; - - If BufStr[0] = #128 Then Begin - BlockWrite (DataFile, BufStr[1], 128); - - BufStr := ''; - End; - End; - End; - -Var - TempStr : String; -Begin - MsgAdded := 0; - - If Not OpenCreateBase(MsgBase, MBase) Then Exit; - - Session.io.OutFull (Session.GetPrompt(231)); - - Assign (DataFile, Session.TempPath + 'messages.dat'); - Reset (DataFile, 1); - Seek (DataFile, FileSize(DataFile)); - - LastRead := MsgBase^.GetLastRead(Session.User.UserNum) + 1; - - MsgBase^.SeekFirst (LastRead); - - While MsgBase^.SeekFound Do Begin - If ((bbsCfg.QwkMaxBase > 0) and (MsgAdded = bbsCfg.QwkMaxBase)) or - ((bbsCfg.QwkMaxPacket > 0) and (TotalMsgs = bbsCfg.QwkMaxPacket)) Then Break; - - MsgBase^.MsgStartUp; - - If MsgBase^.IsPriv And Not Session.User.IsThisUser(MsgBase^.GetTo) Then Begin - MsgBase^.SeekNext; - - Continue; - End; - - Inc (MsgAdded); - Inc (TotalMsgs); - - LastRead := MsgBase^.GetMsgNum; - Chunks := 0; - BufStr := ''; - TooBig := False; - QwkIndex := FileSize(DataFile) DIV 128 + 1; - - MsgBase^.MsgTxtStartUp; - - While Not MsgBase^.EOM Do Begin - TempStr := MsgBase^.GetString(79); - - If TempStr[1] = #1 Then Continue; - - Inc (Chunks, Length(TempStr)); - End; - - If Chunks MOD 128 = 0 Then - Chunks := Chunks DIV 128 + 1 - Else - Chunks := Chunks DIV 128 + 2; - - Header := - ' ' + - 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('', 12, ' ') + - strPadR(strI2S(MsgBase^.GetRefer), 8, ' ') + - strPadR(strI2S(Chunks), 6, ' ') + - #255 + - ' ' + - ' ' + - ' '; - - If MsgAdded = 1 Then Begin - Assign (NdxFile, Session.TempPath + strPadL(strI2S(MBase.Index), 3, '0') + '.ndx'); - ReWrite (NdxFile); - End; - - LONG2MSB (QwkIndex, NdxHdr.MsgPos); - Write (NdxFile, NdxHdr); - BlockWrite (DataFile, Header[1], 128); - - If Extended Then Begin - If Length(MsgBase^.GetFrom) > 25 Then Begin - DoString('From: ' + MsgBase^.GetFrom + #227); - - TooBig := True; - End; - - If Length(MsgBase^.GetTo) > 25 Then Begin - DoString('To: ' + MsgBase^.GetTo + #227); - - TooBig := True; - End; - - If Length(MsgBase^.GetSubj) > 25 Then Begin - DoString('Subject: ' + MsgBase^.GetSubj + #227); - - TooBig := True; - End; - - If TooBig Then DoString(#227); - End; - - MsgBase^.MsgTxtStartUp; - - While Not MsgBase^.EOM Do Begin - TempStr := MsgBase^.GetString(79) + #227; - - If TempStr[1] = #1 Then Continue; - - DoString (TempStr); - End; - - If BufStr <> '' Then Begin - BufStr := strPadR (BufStr, 128, ' '); - - BlockWrite (DataFile, BufStr[1], 128); - End; - - MsgBase^.SeekNext; - End; - - Close (DataFile); - - If MsgAdded > 0 Then Close (NdxFile); - - Session.io.PromptInfo[1] := strI2S(MBase.Index); - Session.io.PromptInfo[2] := MBase.Name; - Session.io.PromptInfo[3] := MBase.QwkName; - Session.io.PromptInfo[4] := strI2S(MsgBase^.NumberOfMsgs); - Session.io.PromptInfo[5] := strI2S(MsgAdded); - - MsgBase^.CloseMsgBase; - Dispose (MsgBase, Done); - - Session.io.OutBS (Screen.CursorX, True); - Session.io.OutFullLn (Session.GetPrompt(232)); - - Result := LastRead; -End; - -Procedure TMsgBase.DownloadQWK (Extended: Boolean; Data: String); -Type - QwkLRRec = Record - Base : Word; - Pos : LongInt; - End; -Var - Old : RecMessageBase; - DataFile : File; - Temp : String; - QwkLR : QwkLRRec; - QwkLRFile : File of QwkLRRec; -Begin - If Session.User.ThisUser.QwkFiles Then - Session.FileBase.ExportFileList(True, True); - - FileMode := 66; - Old := MBase; - Temp := strPadR('Produced By ' + mysSoftwareID + ' v' + mysVersion + '. ' + CopyID, 128, ' '); - - Assign (DataFile, Session.TempPath + 'messages.dat'); - ReWrite (DataFile, 1); - BlockWrite (DataFile, Temp[1], 128); - Close (DataFile); - - Assign (QwkLRFile, Session.TempPath + 'qlr.dat'); - ReWrite (QwkLRFile); - Reset (MBaseFile); - - Session.io.OutFullLn (Session.GetPrompt(230)); - - TotalMsgs := 0; - TotalConf := 0; - - Session.User.IgnoreGroup := Pos('/ALLGROUP', strUpper(Data)) > 0; - - While Not Eof(MBaseFile) Do Begin - Read (MBaseFile, MBase); - - If Session.User.Access(MBase.ReadACS) Then Begin - Inc (TotalConf); - - GetMessageScan; - - If MScan.QwkScan > 0 Then Begin - QwkLR.Base := FilePos(MBaseFile); - QwkLR.Pos := WriteMsgDAT(Extended); - - Write (QwkLRFile, QwkLR); - End; - End; - End; - - Close (QwkLRFile); - - WriteControlDAT (Extended); - WriteDOORID (Extended); - - If Extended Then WriteTOREADEREXT; - - If TotalMsgs > 0 Then Begin - Session.io.PromptInfo[1] := strI2S(TotalMsgs); - Session.io.PromptInfo[2] := strI2S(TotalConf); - - Session.io.OutFullLn (Session.GetPrompt(233)); - - Temp := bbsCfg.qwkBBSID + '.qwk'; - - Session.io.OutFullLn (Session.GetPrompt(234)); - - Session.io.PromptInfo[1] := Temp; - - If FileExist(bbsCfg.QwkWelcome) Then FileCopy(bbsCfg.qwkWelcome, Session.TempPath + JustFile(bbsCfg.qwkWelcome)); - If FileExist(bbsCfg.QwkNews) Then FileCopy(bbsCfg.qwkNews, Session.TempPath + JustFile(bbsCfg.qwkNews)); - If FileExist(bbsCfg.QwkGoodbye) Then FileCopy(bbsCfg.qwkGoodbye, Session.TempPath + JustFile(bbsCfg.qwkGoodbye)); - -// Session.SystemLog('DEBUG: Archiving QWK packet'); - - If Session.LocalMode Then Begin - FileErase (bbsCfg.QWKPath + Temp); - - Session.FileBase.ExecuteArchive (bbsCfg.QWKPath + Temp, Session.User.ThisUser.Archive, Session.TempPath + '*', 1); - - Session.io.OutFullLn (Session.GetPrompt(235)); - End Else Begin - Session.FileBase.ExecuteArchive (Session.TempPath + Temp, Session.User.ThisUser.Archive, Session.TempPath + '*', 1); - Session.FileBase.SendFile (Session.TempPath + Temp); - End; - - If Session.io.GetYN (Session.GetPrompt(236), True) Then Begin - Reset (MBaseFile); - Reset (QwkLRFile); - - While Not Eof(QwkLRFile) Do Begin - Read (QwkLRFile, QwkLR); - Seek (MBaseFile, QwkLR.Base - 1); - Read (MBaseFile, MBase); - - Case MBase.BaseType of - 0 : MsgBase := New(PMsgBaseJAM, Init); - 1 : MsgBase := New(PMsgBaseSquish, Init); - End; - - MsgBase^.SetMsgPath (MBase.Path + MBase.FileName); - - If MsgBase^.OpenMsgBase Then Begin - MsgBase^.SetLastRead (Session.User.UserNum, QwkLR.Pos); - MsgBase^.CloseMsgBase; - End; - - Dispose(MsgBase, Done); - End; - Close (QwkLRFile); - End; - End Else - Session.io.OutFullLn (Session.GetPrompt(228)); - - Session.User.IgnoreGroup := False; - - Close (MBaseFile); - - MBase := Old; - - DirClean (Session.TempPath, ''); -End; - -Procedure TMsgBase.UploadREP; -Var - DataFile : File; - TempBase : RecMessageBase; - OldBase : RecMessageBase; - QwkHeader : QwkDATHdr; - QwkBlock : String[128]; - Line : String; - A : SmallInt; - B : SmallInt; - Chunks : SmallInt; - LineCount : SmallInt; - IsControl : Boolean; - GotControl : Boolean; - ExtFile : Text; - StatOK : LongInt = 0; - StatFailed : LongInt = 0; - StatBaseAdd : LongInt = 0; - StatBaseDel : LongInt = 0; - - Procedure QwkControl (Idx: LongInt; Mode: Byte); - Begin - OldBase := MBase; - - If GetBaseByIndex(Idx, MBase) Then Begin - GetMessageScan; - - MScan.QwkScan := Mode; - - If Mode = 0 Then Inc (StatBaseDel); - If Mode = 1 Then Inc (StatBaseAdd); - - SetMessageScan; - End; - - MBase := OldBase; - End; - -Begin - If Session.LocalMode Then - Session.FileBase.ExecuteArchive (bbsCfg.QWKPath + bbsCfg.qwkBBSID + '.rep', Session.User.ThisUser.Archive, '*', 2) - Else Begin - If Session.FileBase.SelectProtocol(True, False) = 'Q' Then Exit; - - Session.FileBase.ExecuteProtocol(1, Session.TempPath + bbsCfg.qwkBBSID + '.rep'); - - If Not Session.FileBase.DszSearch(bbsCfg.qwkBBSID + '.rep') Then Begin - Session.io.PromptInfo[1] := bbsCfg.qwkBBSID + '.rep'; - - Session.io.OutFullLn (Session.GetPrompt(84)); - - Exit; - End; - - Session.FileBase.ExecuteArchive (Session.TempPath + bbsCfg.qwkBBSID + '.rep', Session.User.ThisUser.Archive, '*', 2) - End; - - Assign (DataFile, FileFind(Session.TempPath + bbsCfg.qwkBBSID + '.msg')); - - If Not ioReset(DataFile, 1, fmRWDN) Then Begin - Session.io.OutFull (Session.GetPrompt(238)); - DirClean (Session.TempPath, ''); - Exit; - End; - - BlockRead (DataFile, QwkBlock[1], 128); - QwkBlock[0] := #128; - - If Pos(strUpper(bbsCfg.qwkBBSID), strUpper(QwkBlock)) = 0 Then Begin - Session.io.OutFullLn (Session.GetPrompt(239)); - Close (DataFile); - DirClean(Session.TempPath, ''); - Exit; - End; - - Session.io.OutFull (Session.GetPrompt(240)); - - While Not Eof(DataFile) Do Begin - BlockRead (DataFile, QwkHeader, SizeOf(QwkHeader)); - Move (QwkHeader.MsgNum, QwkBlock[1], 7); - - QwkBlock[0] := #7; - - If GetBaseByIndex(strS2I(QwkBlock), TempBase) Then Begin - - If OpenCreateBase(MsgBase, TempBase) Then Begin - - AssignMessageData(MsgBase, TempBase); - - QwkBlock[0] := #25; - Move (QwkHeader.UpTo, QwkBlock[1], 25); - MsgBase^.SetTo(strStripR(QwkBlock, ' ')); - - Move (QwkHeader.Subject, QwkBlock[1], 25); - MsgBase^.SetSubj(strStripR(QwkBlock, ' ')); - - Move (QwkHeader.ReferNum, QwkBlock[1], 6); - QwkBlock[0] := #6; - MsgBase^.SetRefer(strS2I(strStripR(QwkBlock, ' '))); - - Move(QwkHeader.NumChunk, QwkBlock[1], 6); - - Chunks := strS2I(QwkBlock) - 1; - Line := ''; - LineCount := 0; - IsControl := MsgBase^.GetTo = qwkControlName; - GotControl := False; - - If IsControl And ((MsgBase^.GetSubj = 'ADD') or (MsgBase^.GetSubj = 'DROP')) Then - QwkControl (TempBase.Index, Ord(MsgBase^.GetSubj = 'ADD')); - - For A := 1 to Chunks Do Begin - BlockRead (DataFile, QwkBlock[1], 128); - - QwkBlock[0] := #128; - QwkBlock := strStripR(QwkBlock, ' '); - - For B := 1 to Length(QwkBlock) Do Begin - If QwkBlock[B] = #227 Then Begin - Inc (LineCount); - - If (LineCount < 4) and (Copy(Line, 1, 5) = 'From:') Then - GotControl := True - // Mystic uses the username of the person who uploaded the - // reply package, based on the alias/realname setting of the - // base itself. This prevents people from spoofing "From" - // fields. - // If QWK networking will need to allow this of course - Else - If (LineCount < 4) and (Copy(Line, 1, 3) = 'To:') Then Begin - MsgBase^.SetTo(strStripB(Copy(Line, 4, Length(Line)), ' ')); - GotControl := True; - End Else - If (LineCount < 4) and (Copy(Line, 1, 8) = 'Subject:') Then Begin - MsgBase^.SetSubj(strStripB(Copy(Line, 9, Length(Line)), ' ')); - GotControl := True; - End Else - If GotControl And (Line = '') Then - GotControl := False - Else - MsgBase^.DoStringLn(Line); - - Line := ''; - End Else - Line := Line + QwkBlock[B]; - End; - End; - - If Line <> '' Then MsgBase^.DoStringLn(Line); - - If TempBase.NetType > 0 Then Begin - MsgBase^.DoStringLn (#13 + '--- ' + mysSoftwareID + '/QWK v' + mysVersion + ' (' + OSID + ')'); - MsgBase^.DoStringLn (' * Origin: ' + ResolveOrigin(TempBase) + ' (' + strAddr2Str(MsgBase^.GetOrigAddr) + ')'); - End; - - If Not IsControl Then Begin - MsgBase^.WriteMsg; - - Inc (StatOK); - Inc (Session.User.ThisUser.Posts); - Inc (Session.HistoryPosts); - End; - - MsgBase^.CloseMsgBase; - - Dispose (MsgBase, Done); - End Else - Inc (StatFailed); - End Else - Inc (StatFailed); - End; - - Close (DataFile); - - Assign (ExtFile, FileFind(Session.TempPath + 'todoor.ext')); - {$I-} Reset (ExtFile); {$I+} - - If IoResult = 0 Then Begin - While Not Eof(ExtFile) Do Begin - ReadLn (ExtFile, Line); - - If strWordGet(1, Line, ' ') = 'AREA' Then Begin - QwkBlock := strWordGet(3, Line, ' '); - - If Pos('a', QwkBlock) > 0 Then QwkControl(strS2I(strWordGet(2, Line, ' ')), 1); - If Pos('D', QwkBlock) > 0 Then QwkControl(strS2I(strWordGet(2, Line, ' ')), 0); - End; - End; - - Close (ExtFile); - End; - - DirClean (Session.TempPath, ''); - - Session.io.PromptInfo[1] := strI2S(StatOK); - Session.io.PromptInfo[2] := strI2S(StatFailed); - Session.io.PromptInfo[3] := strI2S(StatBaseAdd); - Session.io.PromptInfo[4] := strI2S(StatBaseDel); - - Session.io.OutFullLn(Session.GetPrompt(503)); -End; - -End. - -// need one of these for the file list compiler now too which MAYBE can be -// used in MUTIL also. lets template and build that out first.. then... -// create and upload QWK/REP packets without relying on BBS specific stuff - -Type - TMsgBaseQWK = Class - User : RecUser; - Extended : Boolean; - - Constructor Create (UD: RecUser; Ext: Boolean); - Function CreatePacket : Boolean; - Function ProcessReply (bbsid, temppath, usernum, var user, forcefrom ): Boolean; - Destructor Destroy; Override; - End; diff --git a/mystic/bbs_msgbase_squish.pas b/mystic/bbs_msgbase_squish.pas index 3e76955..b6f70ad 100644 --- a/mystic/bbs_msgbase_squish.pas +++ b/mystic/bbs_msgbase_squish.pas @@ -5,9 +5,8 @@ Unit BBS_MsgBase_Squish; Interface Uses - BBS_MsgBase_Abs, - BBS_Common, - bbs_dataBase, + BBS_Records, + BBS_MsgBase_ABS, DOS; Const diff --git a/mystic/bbs_nodechat.pas b/mystic/bbs_nodechat.pas index 513574d..1adb845 100644 --- a/mystic/bbs_nodechat.pas +++ b/mystic/bbs_nodechat.pas @@ -12,11 +12,12 @@ Uses m_Strings, m_DateTime, m_FileIO, - bbs_NodeInfo, - bbs_Common, - bbs_dataBase, - bbs_User, - bbs_Core; + BBS_Records, + BBS_DataBase, + BBS_Common, + BBS_NodeInfo, + BBS_User, + BBS_Core; Var ChatSize : Integer; @@ -59,12 +60,12 @@ Begin Read (RoomFile, Room); Close (RoomFile); - Chat.Room := R; + Session.Chat.Room := R; CurRoom := R; Assign (CF, bbsCfg.DataPath + 'chat' + strI2S(Session.NodeNum) + '.dat'); Reset (CF); - Write (CF, Chat); + Write (CF, Session.Chat); Close (CF); Send_Node_Message (5, strI2S(Session.NodeNum) + ';' + 'Now chatting in channel ' + strI2S(CurRoom), 0); //++lang @@ -367,13 +368,13 @@ Begin Set_Node_Action (Session.GetPrompt(347)); - Avail := Chat.Available; - Chat.InChat := True; - Chat.Available := False; + Avail := Session.Chat.Available; + Session.Chat.InChat := True; + Session.Chat.Available := False; Assign (ChatFile, bbsCfg.DataPath + 'chat' + strI2S(Session.NodeNum) + '.dat'); Reset (ChatFile); - Write (ChatFile, Chat); + Write (ChatFile, Session.Chat); Close (ChatFile); FileErase(Session.TempPath + 'chat.tmp'); @@ -478,14 +479,14 @@ Begin Session.io.GetKeyCallBack := NIL; - Chat.InChat := False; - Chat.Available := Avail; + Session.Chat.InChat := False; + Session.Chat.Available := Avail; Session.AllowMessages := True; Assign (ChatFile, bbsCfg.DataPath + 'chat' + strI2S(Session.NodeNum) + '.dat'); Reset (ChatFile); - Write (ChatFile, Chat); + Write (ChatFile, Session.Chat); Close (ChatFile); FileErase(Session.TempPath + 'chat.tmp'); diff --git a/mystic/bbs_nodeinfo.pas b/mystic/bbs_nodeinfo.pas index dad2006..914361f 100644 --- a/mystic/bbs_nodeinfo.pas +++ b/mystic/bbs_nodeinfo.pas @@ -5,8 +5,7 @@ Unit bbs_NodeInfo; Interface Uses - bbs_Common, - bbs_dataBase; + BBS_Records; Function GetChatRecord (Node: Byte; Var Chat: ChatRec) : Boolean; Function IsUserOnline (UserName: String) : Word; @@ -22,9 +21,11 @@ Uses m_DateTime, m_Strings, m_FileIO, - bbs_Core, - bbs_User, - bbs_UserChat; + BBS_DataBase, + BBS_Common, + BBS_Core, + BBS_User, + BBS_UserChat; Function GetChatRecord (Node: Byte; Var Chat: ChatRec) : Boolean; Begin @@ -62,25 +63,26 @@ Begin ReWrite (ChatFile); If Action <> '' Then Begin - Chat.Active := True; - Chat.Name := Session.User.ThisUser.Handle; - Chat.Location := Session.User.ThisUser.City; - Chat.Action := Action; - Chat.Gender := Session.User.ThisUser.Gender; - Chat.Age := DaysAgo(Session.User.ThisUser.Birthday, 1) DIV 365; + Session.Chat.Active := True; + Session.Chat.Name := Session.User.ThisUser.Handle; + Session.Chat.Location := Session.User.ThisUser.City; + Session.Chat.Action := Action; + Session.Chat.Gender := Session.User.ThisUser.Gender; + Session.Chat.Age := DaysAgo(Session.User.ThisUser.Birthday, 1) DIV 365; + If Session.LocalMode Then - Chat.Baud := 'LOCAL' {++lang} + Session.Chat.Baud := 'LOCAL' {++lang} Else - Chat.Baud := 'TELNET'; {++lang} + Session.Chat.Baud := 'TELNET'; {++lang} End Else Begin - Chat.Active := False; - Chat.Invisible := False; - Chat.Available := False; - Chat.Age := 0; - Chat.Gender := '?'; + Session.Chat.Active := False; + Session.Chat.Invisible := False; + Session.Chat.Available := False; + Session.Chat.Age := 0; + Session.Chat.Gender := '?'; End; - Write (ChatFile, Chat); + Write (ChatFile, Session.Chat); Close (ChatFile); {$IFDEF WINDOWS} diff --git a/mystic/bbs_nodelist.pas b/mystic/bbs_nodelist.pas index 3f37a16..73ea2e2 100644 --- a/mystic/bbs_nodelist.pas +++ b/mystic/bbs_nodelist.pas @@ -6,7 +6,8 @@ Interface Uses BBS_Common, - bbs_DataBase; + BBS_Records, + BBS_DataBase; Type RecNodeSearch = Record diff --git a/mystic/bbs_user.pas b/mystic/bbs_user.pas index c8b373d..de1ef3f 100644 --- a/mystic/bbs_user.pas +++ b/mystic/bbs_user.pas @@ -8,14 +8,15 @@ Uses m_FileIO, m_Strings, m_DateTime, - bbs_Common, - bbs_dataBase, - bbs_General, - bbs_MsgBase, - bbs_FileBase, - bbs_Menus, - bbs_NodeInfo, - mpl_Execute; + BBS_Records, + BBS_DataBase, + BBS_Common, + BBS_General, + BBS_MsgBase, + BBS_FileBase, + BBS_Menus, + BBS_NodeInfo, + MPL_Execute; Type TBBSUser = Class @@ -74,7 +75,7 @@ Type Implementation Uses - bbs_Core; + BBS_Core; Constructor TBBSUser.Create (Var Owner: Pointer); Begin @@ -166,8 +167,8 @@ Var 'M' : Res := strS2I(Data) < strS2I(Copy(TimeDos2Str(CurDateDos, 0), 4, 2)); 'N' : Res := strS2I(Data) = Session.NodeNum; 'O' : Case Data[1] of - 'A' : Res := Chat.Available; - 'I' : Res := Chat.Invisible; + 'A' : Res := Session.Chat.Available; + 'I' : Res := Session.Chat.Invisible; 'K' : Res := AcsOkFlag; 'M' : Begin Res := Access(Session.Msgs.MBase.SysopACS); @@ -1026,9 +1027,11 @@ Begin Write (UserFile, ThisUser); Close (UserFile); - Reset (ConfigFile); - Write (ConfigFile, bbsCfg); - Close (ConfigFile); + PutBaseConfiguration(bbsCfg); + +// Reset (ConfigFile); +// Write (ConfigFile, bbsCfg); +// Close (ConfigFile); Session.SystemLog ('Created Account: ' + ThisUser.Handle); @@ -1056,14 +1059,14 @@ Begin {$IFDEF LOGGING} Session.SystemLog('Logon3'); {$ENDIF} - Chat.Available := True; + Session.Chat.Available := True; If Access(bbsCfg.AcsInvisLogin) Then - Chat.Invisible := Session.io.GetYN(Session.GetPrompt(308), False); + Session.Chat.Invisible := Session.io.GetYN(Session.GetPrompt(308), False); { update last caller information } - If Not Session.LocalMode And Not Chat.Invisible And (ThisUser.Flags AND UserNoLastCall = 0) Then Begin + If Not Session.LocalMode And Not Session.Chat.Invisible And (ThisUser.Flags AND UserNoLastCall = 0) Then Begin Reset (LastOnFile); If FileSize(LastOnFile) >= 10 Then @@ -1262,7 +1265,7 @@ Begin End; Session.io.OutFullLn ('|CL' + mysSoftwareID + ' v' + mysVersion + ' for ' + OSID + ' Node |ND'); - Session.io.OutFullLn (CopyID); + Session.io.OutFullLn (mysCopyNotice); If bbsCfg.DefTermMode = 0 Then GetGraphics @@ -1426,11 +1429,11 @@ Begin Session.LoadThemeData(Data); 15 : GetEditor(True); 16 : If Access(bbsCfg.AcsInvisLogin) Then Begin - Chat.Invisible := Not Chat.Invisible; - Set_Node_Action (Chat.Action); + Session.Chat.Invisible := Not Session.Chat.Invisible; + Set_Node_Action (Session.Chat.Action); End; 17 : GetFileList(True); - 18 : Chat.Available := Not Chat.Available; + 18 : Session.Chat.Available := Not Session.Chat.Available; 19 : GetHotKeys(True); 20 : GetMsgList(True); 21 : ThisUser.UseLBIndex := Not ThisUser.UseLBIndex; diff --git a/mystic/bbs_userchat.pas b/mystic/bbs_userchat.pas index 6cef276..3cdfa02 100644 --- a/mystic/bbs_userchat.pas +++ b/mystic/bbs_userchat.pas @@ -13,10 +13,10 @@ Uses m_Strings, m_FileIO, m_DateTime, - bbs_Core, - bbs_Common, - bbs_dataBase, - bbs_NodeInfo; + BBS_Records, + BBS_DataBase, + BBS_Core, + BBS_NodeInfo; Procedure PageUserForChat; Var diff --git a/mystic/mis.pas b/mystic/mis.pas index c18e379..d8c09da 100644 --- a/mystic/mis.pas +++ b/mystic/mis.pas @@ -542,6 +542,8 @@ Begin Console.SetWindowTitle(WinTitle); + // process command lines here and exit + If Not ServerStartup Then Begin Console.ClearScreen; Console.WriteLine('ERROR: No servers are configured as active.'); diff --git a/mystic/mis_client_ftp.pas b/mystic/mis_client_ftp.pas index 778539a..2beead1 100644 --- a/mystic/mis_client_ftp.pas +++ b/mystic/mis_client_ftp.pas @@ -691,6 +691,9 @@ Var Res : LongInt; Begin If LoggedIn Then Begin + // if name = bbsid.qwk or if user is network and name is userid.qwk then + // send file here + // else do the normal stuff TempPos := FindDirectory(TempBase); If TempPos = -1 Then Begin diff --git a/mystic/mpl_execute.pas b/mystic/mpl_execute.pas index eaa883f..f13c777 100644 --- a/mystic/mpl_execute.pas +++ b/mystic/mpl_execute.pas @@ -7,7 +7,8 @@ Interface Uses DOS, m_FileIO, - bbs_dataBase, + BBS_Records, + BBS_DataBase, BBS_Common; {$I MPL_TYPES.PAS} diff --git a/mystic/mutil.pas b/mystic/mutil.pas index ed3074d..ba7c0c7 100644 --- a/mystic/mutil.pas +++ b/mystic/mutil.pas @@ -33,6 +33,7 @@ Uses m_Strings, m_FileIO, m_IniReader, + BBS_Records, mUtil_Common, mUtil_Status, mUtil_ImportNA, diff --git a/mystic/mutil_allfiles.pas b/mystic/mutil_allfiles.pas index 1dccf29..09d7d12 100644 --- a/mystic/mutil_allfiles.pas +++ b/mystic/mutil_allfiles.pas @@ -14,7 +14,7 @@ Uses m_FileIO, mUtil_Common, mUtil_Status, - bbs_DataBase; + BBS_Records; Const TotalFiles : Cardinal = 0; diff --git a/mystic/mutil_common.pas b/mystic/mutil_common.pas index fd30886..f4f4146 100644 --- a/mystic/mutil_common.pas +++ b/mystic/mutil_common.pas @@ -8,7 +8,7 @@ Uses m_Output, m_IniReader, mutil_Status, - bbs_DataBase, + bbs_Records, bbs_MsgBase_Abs, bbs_MsgBase_Squish, bbs_MsgBase_JAM; diff --git a/mystic/mutil_echocore.pas b/mystic/mutil_echocore.pas index 97c06f9..3d48250 100644 --- a/mystic/mutil_echocore.pas +++ b/mystic/mutil_echocore.pas @@ -9,7 +9,7 @@ Uses m_FileIO, m_Strings, m_DateTime, - bbs_DataBase, + BBS_Records, mUtil_Common; Const diff --git a/mystic/mutil_echoexport.pas b/mystic/mutil_echoexport.pas index e3bc0ae..2454fca 100644 --- a/mystic/mutil_echoexport.pas +++ b/mystic/mutil_echoexport.pas @@ -17,10 +17,10 @@ Uses mUtil_Common, mUtil_Status, mUtil_EchoCore, - bbs_DataBase, - bbs_MsgBase_ABS, - bbs_MsgBase_JAM, - bbs_MsgBase_Squish; + BBS_Records, + BBS_MsgBase_ABS, + BBS_MsgBase_JAM, + BBS_MsgBase_Squish; Procedure AddToFLOQueue (FloName, PacketFN: String); Var diff --git a/mystic/mutil_echofix.pas b/mystic/mutil_echofix.pas index 1f66dbd..869fb60 100644 --- a/mystic/mutil_echofix.pas +++ b/mystic/mutil_echofix.pas @@ -13,7 +13,7 @@ Implementation Uses m_Strings, - bbs_DataBase; + BBS_Records; Function ProcessedByAreaFix (Var PKT: TPKTReader) : Boolean; Var diff --git a/mystic/mutil_echoimport.pas b/mystic/mutil_echoimport.pas index e6bfaa3..780c20d 100644 --- a/mystic/mutil_echoimport.pas +++ b/mystic/mutil_echoimport.pas @@ -13,7 +13,7 @@ Uses m_FileIO, m_Strings, AView, - bbs_DataBase, + BBS_Records, BBS_MsgBase_ABS, BBS_MsgBase_JAM, BBS_MsgBase_Squish, diff --git a/mystic/mutil_filebone.pas b/mystic/mutil_filebone.pas index 678a091..fc28ffe 100644 --- a/mystic/mutil_filebone.pas +++ b/mystic/mutil_filebone.pas @@ -14,7 +14,7 @@ Uses m_FileIO, mUtil_Common, mUtil_Status, - bbs_DataBase; + BBS_Records; Procedure uImportFileBone; Var diff --git a/mystic/mutil_filesbbs.pas b/mystic/mutil_filesbbs.pas index 4e5c55b..0cc62cb 100644 --- a/mystic/mutil_filesbbs.pas +++ b/mystic/mutil_filesbbs.pas @@ -14,7 +14,7 @@ Uses m_DateTime, mUtil_Common, mUtil_Status, - bbs_DataBase; + BBS_Records; Procedure uImportFilesBBS; Var diff --git a/mystic/mutil_importmsgbase.pas b/mystic/mutil_importmsgbase.pas index 4ee7065..9e106de 100644 --- a/mystic/mutil_importmsgbase.pas +++ b/mystic/mutil_importmsgbase.pas @@ -14,7 +14,7 @@ Uses m_Strings, mUtil_Common, mUtil_Status, - bbs_DataBase; + BBS_Records; Procedure uImportMessageBases; Var diff --git a/mystic/mutil_importna.pas b/mystic/mutil_importna.pas index 44435ac..6c4bdb1 100644 --- a/mystic/mutil_importna.pas +++ b/mystic/mutil_importna.pas @@ -12,7 +12,7 @@ Uses m_Strings, mUtil_Common, mUtil_Status, - bbs_DataBase; + BBS_Records; Procedure uImportNA; Var diff --git a/mystic/mutil_msgpost.pas b/mystic/mutil_msgpost.pas index ec4a103..1750383 100644 --- a/mystic/mutil_msgpost.pas +++ b/mystic/mutil_msgpost.pas @@ -11,10 +11,10 @@ Implementation Uses m_FileIO, m_Strings, + BBS_Records, + BBS_Common, mUtil_Common, - mUtil_Status, - bbs_Common, - bbs_DataBase; + mUtil_Status; Procedure uPostMessages; Const diff --git a/mystic/mutil_msgpurge.pas b/mystic/mutil_msgpurge.pas index a3ee39a..0f363c5 100644 --- a/mystic/mutil_msgpurge.pas +++ b/mystic/mutil_msgpurge.pas @@ -13,7 +13,7 @@ Uses m_DateTime, mUtil_Common, mUtil_Status, - bbs_DataBase, + bbs_Records, bbs_MsgBase_ABS, bbs_MsgBase_JAM, bbs_MsgBase_Squish; diff --git a/mystic/mutil_toplists.pas b/mystic/mutil_toplists.pas index ec708a4..faad854 100644 --- a/mystic/mutil_toplists.pas +++ b/mystic/mutil_toplists.pas @@ -14,7 +14,7 @@ Uses m_FileIO, mUtil_Common, mUtil_Status, - bbs_DataBase; + BBS_Records; Type TopListType = (TopCall, TopPost, TopDL, TopUL, TopPCR); diff --git a/mystic/mutil_upload.pas b/mystic/mutil_upload.pas index 8c1cfed..49accfd 100644 --- a/mystic/mutil_upload.pas +++ b/mystic/mutil_upload.pas @@ -13,7 +13,7 @@ Uses m_DateTime, mUtil_Common, mUtil_Status, - bbs_DataBase; + BBS_Records; Procedure uMassUpload; Var diff --git a/mystic/mystic.pas b/mystic/mystic.pas index 8483d2e..16a304b 100644 --- a/mystic/mystic.pas +++ b/mystic/mystic.pas @@ -41,6 +41,7 @@ Uses m_Output, m_Input, m_Pipe, + BBS_Records, bbs_Common, bbs_DataBase, bbs_Core, diff --git a/mystic/records.pas b/mystic/records.pas index e5642f2..093f3b0 100644 --- a/mystic/records.pas +++ b/mystic/records.pas @@ -22,9 +22,10 @@ Const mysSoftwareID = 'Mystic BBS'; - mysCopyYear = '1997-2013'; // its been a long time! - mysVersion = '1.10 A37'; // current version - mysDataChanged = '1.10 A11'; // version of last records change + mysCopyYear = '1997-2013'; + mysVersion = '1.10 A37'; + mysDataChanged = '1.10 A11'; + mysCopyNotice = 'Copyright (C) ' + mysCopyYear + ' By James Coyle'; {$IFDEF WIN32} PathChar = '\'; diff --git a/mystic/todo.pas b/mystic/todo.pas index c9a4d7f..57bab45 100644 --- a/mystic/todo.pas +++ b/mystic/todo.pas @@ -37,6 +37,11 @@ BUGS AND POSSIBLE ISSUES FUTURE / IDEAS / WORK IN PROGRESS / NOTES ========================================= +- externalize qwk and file list compiler class. qwk for mystic/mis filelist + for mystic/mutil. add compiler templates, file include, and new vs all + generation for all. +- abstract ansi browser to be used for ansi archive viewer and sysop file + manager (as well as the ANSI gallery). - when mutil is tossing a packet and auto creates an area figure out if there can be a way to automatically create the uplink back to the originating node. @@ -49,7 +54,6 @@ FUTURE / IDEAS / WORK IN PROGRESS / NOTES way which i think is the best approach actually. - ESC moves back in ANSI gallery only exits if dir = root? - Color, boxtype, and input configuration for configuration -- Toggle base scan settings Select [A]ll, [D]eselect All - global file editor like msg base - redo voting booth externalize user storage and allow unlimited questions plus maybe categories. or at least up it to like 50 questions or @@ -64,7 +68,6 @@ FUTURE / IDEAS / WORK IN PROGRESS / NOTES - Echomail export saves last scanned pointers - Echomail export support for netmail routing - FileFix / TIC -- Add "Add Export To" to global msgbase editor. Also Del Export? ! Use NetReply in RecMB also Reply to another base? - QWK put/get per individual users via FTP - EXCLUDE from all files list. important. @@ -78,10 +81,6 @@ FUTURE / IDEAS / WORK IN PROGRESS / NOTES - MUTILs new DIR import of msg bases could have optional config to reference a series of .NA files to get the name/description of bases. - QWK via email -- Either add Public/Private fusion type message base or allow reply via - email or netmail option. -- mUTIL scans MSGS directory and auto-creates anything that has data files - not related to a BBS message base.. uses a template - Blind upload for single file upload (also message upload) - Email validation - Recode FCHECK into MUTIL, but also add the option to phsyically delete the @@ -91,8 +90,8 @@ FUTURE / IDEAS / WORK IN PROGRESS / NOTES - Outbound telnet feature - Add "PREVIEW" option to message editors - Finish Threaded message reader +- Gallows Pole MPL - Add "high roller/smack talk" into BlackJack -- Add better MIS logging per server (connect, refuse, blocked, etc) - BBS email autoforwarded to Internet email - Ability to send internet email to people from within the BBS. - ANSI post-processor for message uploads via FSE @@ -131,7 +130,6 @@ FUTURE / IDEAS / WORK IN PROGRESS / NOTES - ANSI message upload post processor option: Auto/Disabled/Ask - Finish optional user prompts - MCI code for FS ansi viewer? -- MCI code for # of files in current file area - Redo random ANSI system to use A-Z instead of 1-9 can have upgrade util rename them automatically. - LastOn revamp make sure its not global and new stuff is populated @@ -279,8 +277,6 @@ ReplaceLine - Needs additional research ! POSSIBLE removal of local console in Windows and STDIO usage in Linux ^ Massive performance increase possible here as well as: -! POSSIBLE FTN tosser. -! POSSIBLE FTN mailer (transx, FTP, binkP) ! MIS event system (possible 1.10) ! Password reset via email (possible 1.10) ! Email verification system (for access upgrades) (possible 1.10) @@ -290,4 +286,59 @@ ReplaceLine - Rewrite of MBBSWEB or integrated HTML server? still need a good designer that actually will put a lot of time into it - Rewrite of ANSI template system (.ini files or mystic2 format?) -! Revamp logging system and add additional logging to MIS + +================================================= + +CODE RESTRUCTURE naming (possibly remove mystic_ prefix): + +mystic +mystic_records +mystic_common (called db now) +mystic_server_binkp +mystic_server_telnet +mystic_server_ftp +mystic_server_pop3 +mystic_server +mystic_client +mystic_client_smtp +mystic_server_events +mystic_cmd_server +mystic_cmd_fidopoll +mystic_cmd_terminal +mystic_class_binkp +mystic_class_qwk +mystic_class_menudata +mystic_class_msgbase +mystic_class_msgbase_jam +mystic_class_msgbase_squish +mystic_class_arcview +mystic_class_arcview_zip +mystic_class_arcview_rar +mystic_class_nodelist +mystic_class_logging (on-the-fly log rolling, trimming, etc) +mystic_config_filearea +mystic_ansi_intro +mystic_ansi_monitor +mystic_ansi_terminal +mystic_bbs_core +mystic_bbs_msgbase +mystic_bbs_filebase +mystic_bbs_general +mystic_bbs_doors +mystic_bbs_user +mystic_bbs_nodechat +mystic_bbs_userchat +mystic_bbs_sysopchat +mystic_bbs_ansibox +mystic_bbs_ansimenu +mystic_bbs_ansihelp +mystic_bbs_ansiinput +mystic_bbs_ansidir +mystic_bbs_lineedit +mystic_bbs_fulledit +mystic_bbs_menus +mystic_bbs_io +mystic_bbs_mplexecute +mystic_bbs_mpltypes +mystic_bbs_mplcommon +mystic_bbs_mplcompile diff --git a/mystic/whatsnew.txt b/mystic/whatsnew.txt index cd170f7..1cedc2c 100644 --- a/mystic/whatsnew.txt +++ b/mystic/whatsnew.txt @@ -3588,4 +3588,7 @@ wants to update their current base, and will instead force the update for all message bases. + ! Mystic was changing the user's message base to the last base processed + when globally resetting the new message scan date. +