diff --git a/mdl/m_socket_class.pas b/mdl/m_socket_class.pas index d61eb52..7f9233e 100644 --- a/mdl/m_socket_class.pas +++ b/mdl/m_socket_class.pas @@ -53,29 +53,27 @@ Type Constructor Create; Destructor Destroy; Override; Procedure Disconnect; - Function DataWaiting : Boolean; - Function WriteBuf (Var Buf; Len: LongInt) : LongInt; + Function DataWaiting : Boolean; + Function WriteBuf (Var Buf; Len: LongInt) : LongInt; Procedure BufFlush; - Procedure BufWriteChar (Ch: Char); - Procedure BufWriteStr (Str: String); - Function WriteLine (Str: String) : LongInt; - Function WriteStr (Str: String) : LongInt; - Function WriteFile (Str: String) : Boolean; - Procedure ProcessBuf (Var Buf: TSocketBuffer; Var Len: LongInt); - Function ReadBuf (Var Buf; Len: LongInt) : LongInt; - Function ReadLine (Var Str: String) : LongInt; - Function SetBlocking (Block: Boolean): LongInt; - Function WaitForData (TimeOut: LongInt) : LongInt; - Function Connect (Address: String; Port: Word) : Boolean; - Function ResolveAddress (Host: String) : LongInt; - Procedure WaitInit (Port: Word); - Function WaitConnection : TSocketClass; - + Procedure BufWriteChar (Ch: Char); + Procedure BufWriteStr (Str: String); + Function WriteLine (Str: String) : LongInt; + Function WriteStr (Str: String) : LongInt; + Function WriteFile (Str: String) : Boolean; + Procedure ProcessBuf (Var Buf: TSocketBuffer; Var Len: LongInt); + Function ReadBuf (Var Buf; Len: LongInt) : LongInt; + Function ReadLine (Var Str: String) : LongInt; + Function SetBlocking (Block: Boolean): LongInt; + Function WaitForData (TimeOut: LongInt) : LongInt; + Function Connect (Address: String; Port: Word) : Boolean; + Function ResolveAddress (Host: String) : LongInt; + Procedure WaitInit (Port: Word); + Function WaitConnection : TSocketClass; Procedure PurgeInputData; - Function ReadChar : Char; - Function WriteChar (Ch: Char) : LongInt; - - Procedure Status (Str: String); + Function ReadChar : Char; + Function WriteChar (Ch: Char) : LongInt; + Procedure Status (Str: String); Property SocketHandle : LongInt READ FSocketHandle WRITE FSocketHandle; Property PeerPort : LongInt READ FPort WRITE FPort; @@ -170,6 +168,7 @@ Procedure TSocketClass.BufFlush; Begin If FOutBufPos > 0 Then Begin WriteBuf (FOutBuf, FOutBufPos); + FOutBufPos := 0; End; End; @@ -181,6 +180,7 @@ Begin If FOutBufPos > TSocketBufferSize Then Begin WriteBuf (FOutBuf, FOutBufPos - 1); + FOutBufPos := 0; End; End; diff --git a/mystic/109to110.pas b/mystic/109to110.pas index f057550..951545e 100644 --- a/mystic/109to110.pas +++ b/mystic/109to110.pas @@ -13,6 +13,38 @@ Uses {$I RECORDS.PAS} Type + OldPercentRec = Record // percentage bar record + BarLen : Byte; + LoChar : Char; + LoAttr : Byte; + HiChar : Char; + HiAttr : Byte; + End; + + OldLangRec = Record { LANGUAGE.DAT } + FileName : String[8]; { Language file name } + Desc : String[30]; { Language description } + TextPath : String[40]; { Path where text files are stored } + MenuPath : String[40]; { Path where menu files are stored } + okASCII : Boolean; { Allow ASCII } + okANSI : Boolean; { Allow ANSI } + BarYN : Boolean; { Use Lightbar Y/N with this lang } + FieldCol1 : Byte; { Field input color } + FieldCol2 : Byte; + FieldChar : Char; + EchoCh : Char; { Password echo character } + QuoteColor : Byte; { Color for quote lightbar } + TagCh : Char; { File Tagged Char } + FileHi : Byte; { Color of file search highlight } + FileLo : Byte; { Non lightbar description color } + NewMsgChar : Char; { Lightbar Msg Index New Msg Char } + VotingBar : OldPercentRec; { voting booth bar } + FileBar : OldPercentRec; { file list bar } + MsgBar : OldPercentRec; { lightbar msg reader bar } + GalleryBar : OldPercentRec; + Reserved : Array[1..95] of Byte; { RESERVED } + End; + OldMBaseRec = Record { MBASES.DAT } Name : String[40]; { Message base name } QWKName : String[13]; { QWK (short) message base name } @@ -340,6 +372,23 @@ Begin Result := (IoResult = 0); End; +Procedure PurgeDataWildcard (WC: String); +Var + D : SearchRec; +Begin + FindFirst (Config.DataPath + WC, AnyFile, D); + + While DosError = 0 Do Begin + If D.Attr AND Directory <> 0 Then Continue; + + DeleteFile (Config.DataPath + D.Name); + + FindNext(D); + End; + + FindClose(D); +End; + Procedure WarningDisplay; Var Ch : Char; @@ -424,6 +473,8 @@ Begin Config.AcsInvisLogin := AcsInvLogin; Config.AcsSeeInvis := AcsSeeInvis; + FillChar(Config.SysopMacro, SizeOf(Config.SysopMacro), #0); + For A := 1 to 4 Do Config.SysopMacro[A] := SysopMacro[A]; Config.ChatStart := ChatStart; @@ -775,120 +826,27 @@ Begin DeleteFile (Config.DataPath + 'security.old'); End; -(* -Procedure ConvertMessageBases; -Var - MBase : MBaseRec; - MBaseFile : File of MBaseRec; - OldBase : OldMBaseRec; - OldBaseFile : File of OldMBaseRec; -Begin - WriteLn ('[-] Updating message base config...'); +Procedure ConvertThemes; - ReNameFile(Config.DataPath + 'mbases.dat', Config.DataPath + 'mbases.old'); - - Assign (OldBaseFile, Config.DataPath + 'mbases.old'); - Reset (OldBaseFile); - - Assign (MBaseFile, Config.DataPath + 'mbases.dat'); - ReWrite (MBaseFile); - - While Not Eof(OldBaseFile) Do Begin - Read (OldBaseFile, OldBase); - - With OldBase Do Begin - MBase.Name := Name; - MBase.QwkName := QwkName; - MBase.FileName := FileName; - MBase.Path := Path; - MBase.BaseType := BaseType; - MBase.NetType := NetType; - MBase.PostType := PostType; - MBase.ACS := ACS; - MBase.ReadACS := ReadACS; - MBase.PostACS := PostACS; - MBase.SysopACS := SysopACS; - MBase.Password := Password; - MBase.ColQuote := ColQuote; - MBase.ColTear := ColTear; - MBase.ColText := ColText; - MBase.ColOrigin := ColOrigin; - MBase.NetAddr := NetAddr; - MBase.Origin := Origin; - MBase.UseReal := UseReal; - MBase.DefNScan := DefNScan; - MBase.DefQScan := DefQScan; - MBase.MaxMsgs := MaxMsgs; - MBase.MaxAge := MaxAge; - MBase.Header := Header; - MBase.Index := Index; - End; - - Write (MBaseFile, MBase); + Function ConvertBar (P: OldPercentRec) : RecPercent; + Begin + Result.BarLength := P.BarLen; + Result.LoChar := P.LoChar; + Result.LoAttr := P.LoAttr; + Result.HiChar := P.HiChar; + Result.HiAttr := P.HiAttr; + Result.Format := 0; + Result.StartY := 1; + Result.EndY := 20; + Result.StartX := 79; End; - Close (MBaseFile); - Close (OldBaseFile); - - DeleteFile (Config.DataPath + 'mbases.old'); -End; -*) -(* -Procedure ConvertFileBases; Var - FBase : FBaseRec; - FBaseFile : File of FBaseRec; - OldBase : OldFBaseRec; - OldBaseFile : File of OldFBaseRec; -Begin - WriteLn ('[-] Updating file base config...'); - - ReNameFile(Config.DataPath + 'fbases.dat', Config.DataPath + 'fbases.old'); - - Assign (OldBaseFile, Config.DataPath + 'fbases.old'); - Reset (OldBaseFile); - - Assign (FBaseFile, Config.DataPath + 'fbases.dat'); - ReWrite (FBaseFile); - - While Not Eof(OldBaseFile) Do Begin - Read (OldBaseFile, OldBase); - - With OldBase Do Begin - FBase.Name := Name; - FBase.FtpName := strStripMCI(FBase.Name); - FBase.FileName := FileName; - FBase.DispFile := DispFile; - FBase.ListACS := ACS; - FBase.FtpACS := ACS; - FBase.SysopACS := SysopACS; - FBase.ULACS := ULACS; - FBase.DLACS := DLACS; - FBase.Path := Path; - FBase.Password := Password; - FBase.ShowUL := ShowUL; - FBase.DefScan := DefScan; - FBase.IsCDROM := IsCDROM; - FBase.IsFREE := IsFREE; - End; - - Write (FBaseFile, FBase); - End; - - Close (FBaseFile); - Close (OldBaseFile); - - DeleteFile (Config.DataPath + 'fbases.old'); -End; -*) -(* -Procedure ConvertLanguageDefs; -Var - Lang : LangRec; - LangFile : File of LangRec; + Theme : RecTheme; + ThemeFile : File of RecTheme; OldLang : OldLangRec; OldLangFile : File of OldLangRec; - TempBar : PercentRec; + TempBar : RecPercent; Begin WriteLn ('[-] Updating language definitions...'); @@ -897,50 +855,85 @@ Begin Assign (OldLangFile, Config.DataPath + 'language.old'); Reset (OldLangFile); - Assign (LangFile, Config.DataPath + 'language.dat'); - ReWrite (LangFile); + Assign (ThemeFile, Config.DataPath + 'theme.dat'); + ReWrite (ThemeFile); While Not Eof(OldLangFile) Do Begin Read (OldLangFile, OldLang); - TempBar.BarLen := 10; + FillChar(Theme, SizeOf(Theme), 0); + + TempBar.BarLength := 10; TempBar.LoChar := '°'; TempBar.LoAttr := 8; TempBar.HiChar := '²'; TempBar.HiAttr := 25; + TempBar.Format := 0; + TempBar.StartY := 1; + TempBar.EndY := 20; + TempBar.StartX := 79; - With OldLang Do Begin - Lang.FileName := FileName; - Lang.Desc := Desc; - Lang.TextPath := TextPath; - Lang.MenuPath := MenuPath; - Lang.okASCII := okASCII; - Lang.okANSI := okANSI; - Lang.BarYN := BarYN; - Lang.FieldCol1 := FieldColor; - Lang.FieldCol2 := FieldColor; - Lang.FieldChar := InputCh; - Lang.EchoCh := EchoCh; - Lang.QuoteColor := QuoteColor; - Lang.TagCh := TagCh; - Lang.FileHi := FileHi; - Lang.FileLo := FileLo; - Lang.NewMsgChar := NewMsgChar; + Theme.FileName := OldLang.FileName; + Theme.Desc := OldLang.Desc; + Theme.TextPath := OldLang.TextPath; + Theme.MenuPath := OldLang.MenuPath; + Theme.ScriptPath := Config.ScriptPath; + Theme.TemplatePath := OldLang.TextPath; + Theme.FieldColor1 := OldLang.FieldCol1; + Theme.FieldColor2 := OldLang.FieldCol2; + Theme.FieldChar := OldLang.FieldChar; + Theme.EchoChar := OldLang.EchoCh; + Theme.QuoteColor := OldLang.QuoteColor; + Theme.TagChar := OldLang.TagCh; + Theme.FileDescHi := OldLang.FileHi; + Theme.FileDescLo := OldLang.FileLo; + Theme.NewMsgChar := OldLang.NewMsgChar; + Theme.NewVoteChar := '*'; - Lang.VotingBar := TempBar; - Lang.FileBar := TempBar; - Lang.MsgBar := TempBar; - End; + Theme.VotingBar := ConvertBar(OldLang.VotingBar); + Theme.FileBar := ConvertBar(OldLang.FileBar); + Theme.MsgBar := ConvertBar(OldLang.MsgBar); + Theme.GalleryBar := ConvertBar(OldLang.GalleryBar); + Theme.IndexBar := TempBar; + Theme.FAreaBar := TempBar; + Theme.FGroupBar := TempBar; + Theme.MAreaBar := TempBar; + Theme.MGroupBar := TempBar; + Theme.MAreaList := TempBar; + Theme.HelpBar := TempBar; + Theme.ViewerBar := TempBar; - Write (LangFile, Lang); + Theme.UserInputFmt := 0; + Theme.LineChat1 := 9; + Theme.LineChat2 := 11; + + Theme.Colors[0] := 1; + Theme.Colors[1] := 9; + Theme.Colors[2] := 11; + Theme.Colors[3] := 8; + Theme.Colors[4] := 7; + Theme.Colors[5] := 15; + Theme.Colors[6] := 8 + 1 * 16; + Theme.Colors[7] := 7 + 1 * 16; + Theme.Colors[8] := 9 + 1 * 16; + Theme.Colors[9] := 15 + 1 * 16; + + Theme.Flags := 0; + + If OldLang.okASCII Then Theme.Flags := Theme.Flags OR ThmAllowASCII; + If OldLang.okANSI Then Theme.Flags := Theme.Flags OR ThmAllowANSI; + If OldLang.BarYN Then Theme.Flags := Theme.Flags OR ThmLightbarYN; + + Theme.Flags := Theme.Flags OR ThmFallback; + + Write (ThemeFile, Theme); End; - Close (LangFile); + Close (ThemeFile); Close (OldLangFile); DeleteFile (Config.DataPath + 'language.old'); End; -*) Procedure ConvertArchives; Var @@ -1198,21 +1191,24 @@ Begin WarningDisplay; //COMMENT this out if mystic.dat is being converted: -// Assign (ConfigFile, 'mystic.dat'); -// Reset (ConfigFile); -// Read (ConfigFile, Config); -// Close (ConfigFile); + Assign (ConfigFile, 'mystic.dat'); + Reset (ConfigFile); + Read (ConfigFile, Config); + Close (ConfigFile); - ConvertConfig; //1.10a11 +// ConvertConfig; //1.10a11 // ConvertUsers; //1.10a11 //ConvertSecurity; //1.10a11 //ConvertFileLists; //1.10a11 //ConvertFileBases; //1.10a11 //ConvertMessageBases; //1.10a11 +//ConvertThemes; //1.10a11 // ConvertArchives; //1.10a1 // ConvertGroups; //1.10a1 + PurgeDataWildcard('*.lng'); + TextAttr := 12; WriteLn; WriteLn ('COMPLETE!'); diff --git a/mystic/HISTORY.txt b/mystic/HISTORY.txt index e360689..ab79f49 100644 --- a/mystic/HISTORY.txt +++ b/mystic/HISTORY.txt @@ -2809,7 +2809,7 @@ comments are supported... //, /* */ and (* *) comments are used. - Include files have been changed to {$include Myfile.mps} since # is - a part of MPL comment/directive system anymore. + not a part of MPL comment/directive system anymore. + New MIDE replaces old MIDE. This version does not yet have syntax highlighting, but has a nicer pulldown menu interface. Syntax highlighting @@ -3383,7 +3383,7 @@ SetPromptInfo(1, 'Hello!'); WriteLn ('This MCI code would like to say: |&1'); - On a side note, there is NOT a GetPromptInfo because you can simply use + As a side note, there is NOT a GetPromptInfo because you can simply use MCI2STR: WriteLn('This MCI code would like to say: ' + Mci2Str('&1')); @@ -3506,6 +3506,7 @@ Const UserDeleted = $04; // established bit for userdeleted from records.pas + // note: this value has changed check records.pas! Begin GetThisUser @@ -3843,7 +3844,7 @@ + MBBSUTIL has a new function -FUPLOAD. This goes through every file base and looks for new files. If a new file is found it will be added into Mystic's file base listing as a new file. FILE_ID.DIZ will be imported - as well. + as well. This was later moved to MUTIL ! Mystic will no longer shell to the console and get "stuck" when trying to execute an archive that has a blank command line in the configuration @@ -3934,3 +3935,42 @@ + MBBSUTIL now has an -AREASOUT option which will export a list of all bases flagged as Echomail in the AREAS.BBS format. + + + Added a new program called MUTIL. This will eventually become the + replacement for MBBSUTIL and MYSTPACK. In addition, it will have a ton of + new features that MBBSUTIL did not have. MUTIL and MUTIL.CFG contain more + details. + + + MUTIL now has the ability to import FIDONET.NA style files into Mystic's + message bases. + + + MUTIL now has the ability to perform an offline "Mass upload" into file + bases. It will also import File_ID.DIZ (optionally) based on the archive + configuration. + + + "Languages" have been renamed to Themes. LANGUAGE.DAT has been renamed to + THEME.DAT in the data directory. A ton of new features await with this new + system. It of course is still possible to use the Theme system to create + support for different languages as well. + + Additionally, compile prompt files that used to have the .LNG file + extension have been renamed to .THM extension. The upgrade utility should + take care of all this renaming for you. + + - MAKELANG has been removed from Mystic BBS distribution. + + - MakeTHEME has been added to the Mystic BBS distribution. This utility + works much like MAKELANG did but it has a few new options: + + 1) The ability to decompile prompt files. Keep in mind, comments are + not added into compiled prompt files, so when you decompile one you + will lose that information. + + 2) MakeTheme will now check for the existance of a "mysticbbs" + environment variable. If it finds this variable, it will look in that + location for MYSTIC.DAT, allowing MakeTheme to no longer be required to + be in the root Mystic BBS directory. + + 3) Prompts within a prompt file no longer has to be in numerical order. + More to come on why this change is being made, but generally this + allows you to categorize prompts. diff --git a/mystic/bbs_cfg_language.pas b/mystic/bbs_cfg_language.pas index b54af82..20786d0 100644 --- a/mystic/bbs_cfg_language.pas +++ b/mystic/bbs_cfg_language.pas @@ -16,7 +16,7 @@ Uses Procedure Lang_Editor; var a : SmallInt; - Old : LangRec; + Old : RecTheme; Begin Session.SystemLog ('*LANG EDITOR*'); Old := Session.Lang; @@ -38,13 +38,13 @@ Begin if filesize(Session.LangFile) = 1 then Session.io.OutFullLn ('|CR|14You must have at least one language definition.|CR|PA') Else - KillRecord (Session.LangFile, A, SizeOf(LangRec)); + KillRecord (Session.LangFile, A, SizeOf(RecTheme)); end; 'I' : begin Session.io.OutRaw ('Insert before? (1-' + strI2S(filesize(Session.LangFile)+1) + '): '); a := strS2I(Session.io.GetInput(3, 3, 11, '')); if (a > 0) and (a <= filesize(Session.LangFile)+1) then begin - AddRecord (Session.LangFile, A, SizeOf(LangRec)); + AddRecord (Session.LangFile, A, SizeOf(RecTheme)); Session.lang.filename := ''; Session.lang.textpath := ''; Session.lang.menupath := ''; @@ -63,28 +63,28 @@ Begin Session.io.OutRawln ('B. Filename : ' + Session.Lang.FileName); Session.io.OutRawln ('C. Text Path : ' + Session.Lang.TextPath); Session.io.OutRawln ('D. Menu Path : ' + Session.Lang.MenuPath); - Session.io.OutRawln ('M. Allow ASCII: ' + Session.io.OutYN(Session.Lang.okASCII)); - Session.io.OutRawln ('N. Allow ANSI : ' + Session.io.OutYN(Session.Lang.okANSI)); + Session.io.OutRawln ('M. Allow ASCII: ' + Session.io.OutYN(Session.Lang.Flags AND ThmAllowASCII <> 0)); + Session.io.OutRawln ('N. Allow ANSI : ' + Session.io.OutYN(Session.Lang.Flags AND ThmAllowANSI <> 0)); - Session.io.OutFullLn ('|CRE. Use Lightbar Y/N : ' + Session.io.OutYN(Session.Lang.BarYN)); + Session.io.OutFullLn ('|CRE. Use Lightbar Y/N : ' + Session.io.OutYN(Session.Lang.Flags AND ThmLightbarYN <> 0)); Session.io.OutFull ('|03|16H. Input Field Color: '); - Session.io.AnsiColor(Session.Lang.FieldCol1); + Session.io.AnsiColor(Session.Lang.FieldColor1); Session.io.OutFullLn ('Test|03|16'); Session.io.OutRaw ('I. Quote Bar Color : '); Session.io.AnsiColor(Session.Lang.QuoteColor); Session.io.OutFullLn ('Test|03|16'); - Session.io.OutRawLn ('J. Echo Character : ' + Session.Lang.EchoCh); + Session.io.OutRawLn ('J. Echo Character : ' + Session.Lang.EchoChar); Session.io.OutRawLn ('K. Input Character : ' + Session.Lang.FieldChar); - Session.io.OutRawLn ('L. File Tag Char : ' + Session.Lang.TagCh); + Session.io.OutRawLn ('L. File Tag Char : ' + Session.Lang.TagChar); Session.io.OutRaw ('O. File Search Hi : '); - Session.io.AnsiColor(Session.Lang.FileHI); + Session.io.AnsiColor(Session.Lang.FileDescHI); Session.io.OutFullLn ('Test|03|16'); Session.io.OutRaw ('P. File Desc. Lo : '); - Session.io.AnsiColor(Session.Lang.FileLO); + Session.io.AnsiColor(Session.Lang.FileDescLO); Session.io.OutFullLn ('Test|03|16'); Session.io.OutRawLn ('R. LB New Msg Char : ' + Session.Lang.NewMsgChar); @@ -95,21 +95,21 @@ Begin 'B' : Session.Lang.filename := Session.io.InXY(17, 4, 8, 8, 11, Session.Lang.filename); 'C' : Session.Lang.textpath := CheckPath(Session.io.InXY(17, 5, 40, 40, 11, Session.Lang.textpath)); 'D' : Session.Lang.menupath := CheckPath(Session.io.InXY(17, 6, 40, 40, 11, Session.Lang.MenuPath)); - 'E' : Session.Lang.BarYN := Not Session.Lang.BarYN; - 'H' : Session.Lang.FieldCol1 := getColor(Session.Lang.FieldCol1); + 'E' : Session.Lang.Flags := Session.Lang.Flags XOR ThmLightbarYN; + 'H' : Session.Lang.FieldColor1 := getColor(Session.Lang.FieldColor1); 'I' : Session.Lang.QuoteColor := getColor(Session.Lang.QuoteColor); - 'J' : Begin Session.io.OutRaw ('Char: '); Session.Lang.EchoCh := Session.io.GetKey; End; + 'J' : Begin Session.io.OutRaw ('Char: '); Session.Lang.EchoChar := Session.io.GetKey; End; 'K' : Begin Session.io.OutRaw ('Char: '); Session.Lang.FieldChar := Session.io.GetKey; If Not (Session.Lang.FieldChar in [#32..#255]) Then Session.Lang.FieldChar := ' '; End; - 'L' : Begin Session.io.OutRaw ('Char: '); Session.Lang.TagCh := Session.io.GetKey; End; - 'M' : Session.Lang.okASCII := Not Session.Lang.okASCII; - 'N' : Session.Lang.okANSI := Not Session.Lang.okANSI; - 'O' : Session.Lang.FileHI := getColor(Session.Lang.FileHI); - 'P' : Session.Lang.FileLo := GetColor(Session.Lang.FileLO); + 'L' : Begin Session.io.OutRaw ('Char: '); Session.Lang.TagChar := Session.io.GetKey; End; + 'M' : Session.Lang.Flags := Session.Lang.Flags XOR ThmAllowASCII; + 'N' : Session.Lang.Flags := Session.Lang.Flags XOR ThmAllowANSI; + 'O' : Session.Lang.FileDescHI := getColor(Session.Lang.FileDescHI); + 'P' : Session.Lang.FileDescLo := GetColor(Session.Lang.FileDescLO); 'Q' : break; 'R' : Begin Session.io.OutRaw('Char: '); Session.Lang.NewMsgChar := Session.io.GetKey; End; end; diff --git a/mystic/bbs_cfg_main.pas b/mystic/bbs_cfg_main.pas index 76f1efb..24f8b7c 100644 --- a/mystic/bbs_cfg_main.pas +++ b/mystic/bbs_cfg_main.pas @@ -82,7 +82,7 @@ Var Box : TAnsiMenuBox; Image : TConsoleImageRec; MenuPos : Array[0..4] of Byte = (1, 1, 1, 1, 1); - ThemeOld : LangRec; + ThemeOld : RecTheme; Res : Char; Procedure BoxOpen (X1, Y1, X2, Y2: Byte); @@ -179,7 +179,7 @@ Begin End; End; 1 : Begin - BoxOpen (4, 4, 33, 15); + BoxOpen (4, 4, 33, 16); CoolBoxOpen (3, 'Configuration'); Form.AddNone ('S', ' S System Paths', 5, 5, 28, ''); @@ -192,6 +192,7 @@ Begin Form.AddNone ('M', ' M Message Base Settings', 5, 12, 28, ''); Form.AddNone ('E', ' E Echomail Networks', 5, 13, 28, ''); Form.AddNone ('O', ' O Offline Mail Settings', 5, 14, 28, ''); + Form.AddNone ('C', ' C Console Settings', 5, 15, 28, ''); Res := Form.Execute; MenuPos[1] := Form.ItemPos; @@ -206,6 +207,7 @@ Begin End Else Case Res of 'S' : Configuration_SysPaths; + 'G' : Configuration_GeneralSettings; 'L' : Configuration_LoginMatrix; 'E' : Configuration_EchoMailAddress(True); '3' : Configuration_OptionalFields; @@ -214,6 +216,7 @@ Begin 'O' : Configuration_QWKSettings; '1' : Configuration_NewUser1Settings; '2' : Configuration_NewUser2Settings; + 'C' : Configuration_ConsoleSettings; 'X' : Break; Else MenuPtr := 0; @@ -284,10 +287,10 @@ Begin End Else Begin ThemeOld := Session.Lang; - Session.Lang.FieldCol1 := 15 + 1 * 16; - Session.Lang.FieldCol2 := 9 + 1 * 16; + Session.Lang.FieldColor1 := 15 + 1 * 16; + Session.Lang.FieldColor2 := 9 + 1 * 16; Session.Lang.FieldChar := 'm'; - Session.Lang.EchoCh := '*'; + Session.Lang.EchoChar := '*'; Case Res of 'A' : Configuration_ArchiveEditor; diff --git a/mystic/bbs_cfg_menuedit.pas b/mystic/bbs_cfg_menuedit.pas index debef37..2d26057 100644 --- a/mystic/bbs_cfg_menuedit.pas +++ b/mystic/bbs_cfg_menuedit.pas @@ -227,7 +227,7 @@ End; Var Old : String[8]; - OldLang : LangRec; + OldLang : RecTheme; DirInfo: SearchRec; A : Byte; {format dir output} Begin @@ -295,7 +295,7 @@ Begin Session.Menu.MenuName := Old; Session.Lang := OldLang; Close (Session.PromptFile); - Assign (Session.PromptFile, Config.DataPath + Session.Lang.FileName + '.lng'); + Assign (Session.PromptFile, Config.DataPath + Session.Lang.FileName + '.thm'); Reset (Session.PromptFile); End; diff --git a/mystic/bbs_cfg_syscfg.pas b/mystic/bbs_cfg_syscfg.pas index f27f5dc..c654080 100644 --- a/mystic/bbs_cfg_syscfg.pas +++ b/mystic/bbs_cfg_syscfg.pas @@ -5,6 +5,7 @@ Unit bbs_cfg_syscfg; Interface Procedure Configuration_SysPaths; +Procedure Configuration_GeneralSettings; Procedure Configuration_LoginMatrix; Procedure Configuration_OptionalFields; Function Configuration_EchomailAddress (Edit: Boolean) : Byte; @@ -19,6 +20,7 @@ Procedure Configuration_NNTPServer; Procedure Configuration_MessageSettings; Procedure Configuration_NewUser1Settings; Procedure Configuration_NewUser2Settings; +Procedure Configuration_ConsoleSettings; Implementation @@ -41,20 +43,62 @@ Begin Box.Header := ' System Directories '; - Box.Open (5, 7, 75, 17); + Box.Open (5, 6, 75, 18); - VerticalLine (27, 8, 16); + VerticalLine (26, 8, 16); - Form.AddPath ('S', ' System Path', 13, 8, 29, 8, 13, 45, mysMaxPathSize, @Config.SystemPath, Topic + 'Root Mystic BBS directory'); - Form.AddPath ('D', ' Data File Path', 10, 9, 29, 9, 16, 45, mysMaxPathSize, @Config.DataPath, Topic + 'Data file directory'); - Form.AddPath ('L', ' Log File Path', 11, 10, 29, 10, 15, 45, mysMaxPathSize, @Config.LogsPath, Topic + 'Log file directory'); - Form.AddPath ('M', ' Message Base Path', 7, 11, 29, 11, 19, 45, mysMaxPathSize, @Config.MsgsPath, Topic + 'Message base directory'); - Form.AddPath ('A', ' File Attach Path', 8, 12, 29, 12, 18, 45, mysMaxPathSize, @Config.AttachPath, Topic + 'File attachment directory'); - Form.AddPath ('E', ' Semaphore Path', 10, 13, 29, 13, 16, 45, mysMaxPathSize, @Config.SemaPath, Topic + 'Semaphore file directory'); - Form.AddPath ('U', ' Menu File Path', 10, 14, 29, 14, 16, 45, mysMaxPathSize, @Config.MenuPath, Topic + 'Default menu file directory'); - Form.AddPath ('T', ' Text File Path', 10, 15, 29, 15, 16, 45, mysMaxPathSize, @Config.TextPath, Topic + 'Default display file directory'); + Form.AddPath ('S', ' System Path', 13, 8, 28, 8, 13, 45, mysMaxPathSize, @Config.SystemPath, Topic + 'Root Mystic BBS directory'); + Form.AddPath ('D', ' Data File Path', 10, 9, 28, 9, 16, 45, mysMaxPathSize, @Config.DataPath, Topic + 'Data file directory'); + Form.AddPath ('L', ' Log File Path', 11, 10, 28, 10, 15, 45, mysMaxPathSize, @Config.LogsPath, Topic + 'Log file directory'); + Form.AddPath ('M', ' Message Base Path', 7, 11, 28, 11, 19, 45, mysMaxPathSize, @Config.MsgsPath, Topic + 'Message base directory'); + Form.AddPath ('A', ' File Attach Path', 8, 12, 28, 12, 18, 45, mysMaxPathSize, @Config.AttachPath, Topic + 'File attachment directory'); + Form.AddPath ('E', ' Semaphore Path', 10, 13, 28, 13, 16, 45, mysMaxPathSize, @Config.SemaPath, Topic + 'Semaphore file directory'); + Form.AddPath ('U', ' Menu File Path', 10, 14, 28, 14, 16, 45, mysMaxPathSize, @Config.MenuPath, Topic + 'Default menu file directory'); + Form.AddPath ('T', ' Text File Path', 10, 15, 28, 15, 16, 45, mysMaxPathSize, @Config.TextPath, Topic + 'Default display file directory'); // Form.AddPath ('P', ' Template Path', 11, 16, 29, 16, 15, 45, mysMaxPathSize, @Config.TemplatePath, Topic + 'Default template file directory'); - Form.AddPath ('R', ' Script Path', 13, 16, 29, 16, 13, 45, mysMaxPathSize, @Config.ScriptPath, Topic + 'Default script (MPL) directory'); + Form.AddPath ('R', ' Script Path', 13, 16, 28, 16, 13, 45, mysMaxPathSize, @Config.ScriptPath, Topic + 'Default script (MPL) directory'); + + Form.Execute; + + Form.Free; + + Box.Close; + Box.Free; +End; + +Procedure Configuration_GeneralSettings; +Var + Box : TAnsiMenuBox; + Form : TAnsiMenuForm; + Topic : String[80]; +Begin + Topic := '|03(|09General Settings|03) |01-|09> |15'; + + Box := TAnsiMenuBox.Create; + Form := TAnsiMenuForm.Create; + + Box.Open (5, 5, 75, 18); + + VerticalLine (24, 7, 16); + VerticalLine (67, 7, 12); + + Form.AddStr ('B', ' BBS Name', 14, 7, 26, 7, 10, 25, 30, @Config.BBSName, Topic); + Form.AddStr ('S', ' Sysop Name', 12, 8, 26, 8, 12, 25, 30, @Config.SysopName, Topic); + Form.AddPass ('Y', ' Sysop Password', 8, 9, 26, 9, 16, 15, 15, @Config.SysopPW, Topic); + Form.AddPass ('T', ' System Password', 7, 10, 26, 10, 17, 15, 15, @Config.SystemPW, Topic); + Form.AddStr ('O', ' Sysop ACS', 13, 11, 26, 11, 11, 25, 30, @Config.ACSSysop, Topic); + Form.AddStr ('F', ' Feedback To', 11, 12, 26, 12, 13, 25, 30, @Config.FeedbackTo, Topic); + Form.AddStr ('A', ' Start Menu', 12, 13, 26, 13, 12, 20, 20, @Config.DefStartMenu, Topic); + Form.AddStr ('C', ' Fallback Menu', 9, 14, 26, 14, 15, 20, 20, @Config.DefFallMenu, Topic); + Form.AddStr ('H', ' Theme', 17, 15, 26, 15, 7, 20, 20, @Config.DefThemeFile, Topic); + Form.AddTog ('E', ' Terminal', 14, 16, 26, 16, 10, 10, 0, 3, 'Ask Detect Detect/Ask ANSI', @Config.DefTermMode, Topic); + + Form.AddBol ('L', ' Chat Logging', 53, 7, 69, 7, 14, 3, @Config.ChatLogging, Topic); + Form.AddByte ('R', ' Hours Start', 54, 8, 69, 8, 13, 2, 0, 24, @Config.ChatStart, Topic); + Form.AddByte ('N', ' Hours End', 56, 9, 69, 9, 11, 2, 0, 24, @Config.ChatEnd, Topic); + Form.AddBol ('D', ' Chat Feedback', 52, 10, 69, 10, 15, 3, @Config.ChatFeedback, Topic); + Form.AddByte ('Z', ' Screen Size', 54, 11, 69, 11, 13, 2, 1, 25, @Config.DefScreenSize, Topic); + Form.AddWord ('I', ' Inactivity', 55, 12, 69, 12, 12, 5, 0, 65535, @Config.Inactivity, Topic + 'Inactivity timeout (seconds) 0/Disable'); Form.Execute; @@ -306,7 +350,6 @@ Begin Box.Close; Box.Free; - End; Procedure Configuration_Internet; @@ -566,7 +609,6 @@ Begin Box.Free; End; - Procedure Configuration_NewUser2Settings; Var Box : TAnsiMenuBox; @@ -615,5 +657,37 @@ Begin Box.Free; End; +Procedure Configuration_ConsoleSettings; +Var + Box : TAnsiMenuBox; + Form : TAnsiMenuForm; + Topic : String[80]; + Count : Byte; +Begin + Topic := '|03(|09Console Settings|03) |01-|09> |15'; + + Box := TAnsiMenuBox.Create; + Form := TAnsiMenuForm.Create; + + Box.Open (5, 5, 76, 16); + + VerticalLine (17, 7, 14); + VerticalLine (64, 7, 10); + + For Count := 1 to 8 Do + Form.AddStr (strI2S(Count)[1], ' F' + strI2S(Count) + ' Macro', 7, 6 + Count, 19, 6 + Count, 10, 30, 60, @Config.SysopMacro[Count], Topic); + + Form.AddBol ('S', ' Status Bar', 52, 7, 66, 7, 12, 3, @Config.UseStatusBar, Topic); + Form.AddAttr ('1', ' Color 1', 55, 8, 66, 8, 9, @Config.StatusColor1, Topic); + Form.AddAttr ('2', ' Color 2', 55, 9, 66, 9, 9, @Config.StatusColor2, Topic); + Form.AddAttr ('3', ' Color 3', 55, 10, 66, 10, 9, @Config.StatusColor3, Topic); + + Form.Execute; + Form.Free; + + Box.Close; + Box.Free; +End; + End. diff --git a/mystic/bbs_core.pas b/mystic/bbs_core.pas index 4b4f196..1f0eaec 100644 --- a/mystic/bbs_core.pas +++ b/mystic/bbs_core.pas @@ -26,13 +26,13 @@ Type IO : TBBSIO; Client : TSocketClass; EventFile : File of EventRec; - LangFile : File of LangRec; + LangFile : File of RecTheme; CommHandle : LongInt; ShutDown : Boolean; TempPath : String; Event : EventRec; NextEvent : EventRec; - Lang : LangRec; + Lang : RecTheme; LocalMode : Boolean; Baud : LongInt; ExitLevel : Byte; @@ -60,8 +60,8 @@ Type HistoryDLKB : LongInt; HistoryULs : Word; HistoryULKB : LongInt; - PromptFile : File of PromptRec; - Prompt : PromptRec; + PromptFile : File of RecPrompt; + Prompt : RecPrompt; Constructor Create; Destructor Destroy; Override; @@ -324,13 +324,13 @@ Begin {$ELSE} If strUpper(Lang.FileName) = strUpper(Str) Then Begin {$ENDIF} - If Not FileExist(Config.DataPath + Lang.FileName + '.lng') Then Break; + If Not FileExist(Config.DataPath + Lang.FileName + '.thm') Then Break; {$I-} Close (PromptFile); {$I+} If IoResult <> 0 Then; - Assign (PromptFile, Config.DataPath + Lang.FileName + '.lng'); + Assign (PromptFile, Config.DataPath + Lang.FileName + '.thm'); Reset (PromptFile); Result := True; diff --git a/mystic/bbs_filebase.pas b/mystic/bbs_filebase.pas index 3774d43..886cc7a 100644 --- a/mystic/bbs_filebase.pas +++ b/mystic/bbs_filebase.pas @@ -1642,7 +1642,7 @@ Var Screen.TextAttr := 255; Insert ( - Session.io.Attr2Ansi(Session.Lang.FileLo), + Session.io.Attr2Ansi(Session.Lang.FileDescLo), Temp, Pos(Data, strUpper(Temp)) + Length(Data) ); @@ -1650,7 +1650,7 @@ Var Screen.TextAttr := 255; Insert ( - Session.io.Attr2Ansi(Session.Lang.FileHi), + Session.io.Attr2Ansi(Session.Lang.FileDescHi), Temp, Pos(Data, strUpper(Temp))); @@ -1855,7 +1855,7 @@ Var For A := 1 to BatchNum Do If Batch[A].FileName = FDir.FileName Then Begin List[ListSize + 1].Batch := True; - Session.io.PromptInfo[3] := Session.Lang.TagCh; + Session.io.PromptInfo[3] := Session.Lang.TagChar; Break; End; @@ -1944,7 +1944,7 @@ Var Session.io.PromptInfo[2] := List[CurPos].FileName; If List[CurPos].Batch Then - Session.io.PromptInfo[3] := Session.Lang.TagCh + Session.io.PromptInfo[3] := Session.Lang.TagChar Else Session.io.PromptInfo[3] := ' '; @@ -1979,7 +1979,7 @@ Var Session.io.PromptInfo[2] := List[CurPos].FileName; If List[CurPos].Batch Then - Session.io.PromptInfo[3] := Session.Lang.TagCh + Session.io.PromptInfo[3] := Session.Lang.TagChar Else Session.io.PromptInfo[3] := ' '; diff --git a/mystic/bbs_io.pas b/mystic/bbs_io.pas index 05f60b4..8c75bd4 100644 --- a/mystic/bbs_io.pas +++ b/mystic/bbs_io.pas @@ -86,7 +86,7 @@ Type Function OutON (O : Boolean) : String; Procedure PauseScreen; Function MorePrompt : Char; - Function DrawPercent (Bar : PercentRec; Part, Whole : SmallInt; Var Percent : SmallInt) : String; + Function DrawPercent (Bar : RecPercent; Part, Whole : SmallInt; Var Percent : SmallInt) : String; Function GetInput (Field, Max, Mode: Byte; Default : String) : String; Function InXY (X, Y, Field, Max, Mode: Byte; Default: String) : String; Function InKey : Char; @@ -1338,7 +1338,7 @@ End; Function TBBSIO.GetYN (Str: String; Yes: Boolean) : Boolean; Begin - If TBBSCore(Core).Lang.BarYN and (Graphics = 1) Then Begin + If (TBBSCore(Core).Lang.Flags AND ThmLightbarYN <> 0) and (Graphics = 1) Then Begin GetYN := GetYNL(Str, Yes); Exit; End; @@ -1428,7 +1428,7 @@ Var Procedure pWrite (Str : String); Begin If (Mode = 6) and (Str <> '') Then - BufAddStr (strRep(TBBSCore(Core).Lang.EchoCh, Length(Str))) + BufAddStr (strRep(TBBSCore(Core).Lang.EchoChar, Length(Str))) Else BufAddStr (Str); End; @@ -1438,9 +1438,9 @@ Var AnsiMoveX (xPos); pWrite (Copy(Str, Junk, Field)); - If UseInField Then AnsiColor(TBBSCore(Core).Lang.FieldCol2); + If UseInField Then AnsiColor(TBBSCore(Core).Lang.FieldColor2); pWrite (strRep(FieldCh, Field - Length(Copy(Str, Junk, Field)))); - If UseInField Then AnsiColor(TBBSCore(Core).Lang.FieldCol1); + If UseInField Then AnsiColor(TBBSCore(Core).Lang.FieldColor1); AnsiMoveX (xPos + CurPos - 1); End; @@ -1448,9 +1448,9 @@ Var Procedure ReDrawPart; Begin pWrite (Copy(Str, StrPos, Field - CurPos + 1)); - If UseInField Then AnsiColor(TBBSCore(Core).Lang.FieldCol2); + If UseInField Then AnsiColor(TBBSCore(Core).Lang.FieldColor2); pWrite (strRep(FieldCh, (Field - CurPos + 1) - Length(Copy(Str, StrPos, Field - CurPos + 1)))); - If UseInField Then AnsiColor(TBBSCore(Core).Lang.FieldCol1); + If UseInField Then AnsiColor(TBBSCore(Core).Lang.FieldColor1); AnsiMoveX (xPos + CurPos - 1); End; @@ -1509,9 +1509,9 @@ Begin If UseInField and (Graphics = 1) Then Begin FieldCh := TBBSCore(Core).Lang.FieldChar; - AnsiColor (TBBSCore(Core).Lang.FieldCol2); + AnsiColor (TBBSCore(Core).Lang.FieldColor2); BufAddStr (strRep(FieldCh, Field)); - AnsiColor (TBBSCore(Core).Lang.FieldCol1); + AnsiColor (TBBSCore(Core).Lang.FieldColor1); AnsiMoveX (xPos); End Else UseInField := False; @@ -1615,9 +1615,9 @@ Begin ScrollLeft Else If StrPos = Length(Str) + 1 Then Begin - If UseInField Then AnsiColor(TBBSCore(Core).Lang.FieldCol2); + If UseInField Then AnsiColor(TBBSCore(Core).Lang.FieldColor2); BufAddStr (#8 + FieldCh + #8); - If UseInField Then AnsiColor(TBBSCore(Core).Lang.FieldCol1); + If UseInField Then AnsiColor(TBBSCore(Core).Lang.FieldColor1); Dec (CurPos); End Else Begin BufAddChar (#8); @@ -1717,7 +1717,7 @@ Begin InXY := GetInput (Field, Max, Mode, Default); End; -Function TBBSIO.DrawPercent (Bar : PercentRec; Part, Whole : SmallInt; Var Percent : SmallInt) : String; +Function TBBSIO.DrawPercent (Bar: RecPercent; Part, Whole: SmallInt; Var Percent : SmallInt) : String; Var FillSize : Byte; Begin @@ -1730,12 +1730,12 @@ Begin // Percent := 100; // this needs work... End Else Begin - FillSize := Round(Part / Whole * Bar.BarLen); + FillSize := Round(Part / Whole * Bar.BarLength); Percent := Round(Part / Whole * 100); End; DrawPercent := Attr2Ansi(Bar.HiAttr) + strRep(Bar.HiChar, FillSize) + - Attr2Ansi(Bar.LoAttr) + strRep(Bar.LoChar, Bar.BarLen - FillSize); + Attr2Ansi(Bar.LoAttr) + strRep(Bar.LoChar, Bar.BarLength - FillSize); End; {$IFDEF UNIX} diff --git a/mystic/bbs_user.pas b/mystic/bbs_user.pas index 21dad48..c426329 100644 --- a/mystic/bbs_user.pas +++ b/mystic/bbs_user.pas @@ -398,7 +398,7 @@ Procedure TBBSUser.DetectGraphics; Var Loop : Byte; Begin - If Not Session.Lang.okANSI Then Begin + If Session.Lang.Flags AND ThmAllowANSI = 0 Then Begin Session.io.Graphics := 0; Exit; End; @@ -783,7 +783,7 @@ End; Procedure TBBSUser.GetLanguage; Var - Old : LangRec; + Old : RecTheme; T : Byte; A : Byte; Begin @@ -795,8 +795,8 @@ Begin Reset (Session.LangFile); Repeat Read (Session.LangFile, Session.Lang); - If ((Not Session.Lang.okASCII) and (Session.io.Graphics = 0)) or - ((Not Session.Lang.okANSI) and (Session.io.Graphics = 1)) Then Continue; + If ((Session.Lang.Flags AND ThmAllowASCII = 0) and (Session.io.Graphics = 0)) or + ((Session.Lang.Flags AND ThmAllowANSI = 0) and (Session.io.Graphics = 1)) Then Continue; Inc (T); Session.io.PromptInfo[1] := strI2S(T); Session.io.PromptInfo[2] := Session.Lang.Desc; @@ -815,8 +815,8 @@ Begin Reset (Session.LangFile); Repeat Read (Session.LangFile, Session.Lang); - If ((Not Session.Lang.okASCII) and (Session.io.Graphics = 0)) or - ((Not Session.Lang.okANSI) and (Session.io.Graphics = 1)) Then Continue; + If ((Session.Lang.Flags AND ThmAllowASCII = 0) and (Session.io.Graphics = 0)) or + ((Session.Lang.Flags AND ThmAllowANSI = 0) and (Session.io.Graphics = 1)) Then Continue; Inc (T); Until T = A; { Close (Session.LangFile);} @@ -1188,12 +1188,12 @@ Begin If FileExist(Config.ScriptPath + 'startup.mpx') Then ExecuteMPL(NIL, 'startup'); - If Not Session.Lang.okASCII and (Session.io.Graphics = 0) Then Begin + If (Session.Lang.Flags AND ThmAllowASCII = 0) and (Session.io.Graphics = 0) Then Begin Session.io.OutFullLn (Session.GetPrompt(321)); Session.SystemLog ('ASCII login disabled'); Halt(0); End Else - If Not Session.Lang.okANSI and (Session.io.Graphics = 1) Then Begin + If (Session.Lang.Flags AND ThmAllowANSI = 0) and (Session.io.Graphics = 1) Then Begin Session.io.OutFullLn (Session.GetPrompt(322)); Session.SystemLog ('ANSI login disabled'); Halt(0); @@ -1287,7 +1287,7 @@ Begin 8 : GetDateFormat(True); 9 : Repeat GetGraphics; - If (Not Session.Lang.okASCII and (Session.io.Graphics = 0)) or (Not Session.Lang.okANSI and (Session.io.Graphics = 1)) Then + If ((Session.Lang.Flags AND ThmAllowASCII = 0) and (Session.io.Graphics = 0)) or ((Session.Lang.Flags AND ThmAllowANSI = 0) and (Session.io.Graphics = 1)) Then Session.io.OutFullLn (Session.GetPrompt(325)) Else Break; diff --git a/mystic/install.pas b/mystic/install.pas index 1d5b4ab..fc6d612 100644 --- a/mystic/install.pas +++ b/mystic/install.pas @@ -237,7 +237,7 @@ Type Var Txt : Array[1..5000] of ^TxtRec; Config : RecConfig; - Lang : LangRec; + Lang : RecTheme; Procedure ViewTextFile (FN : String); Const @@ -341,7 +341,7 @@ Begin Assign (InFile, Config.SystemPath + 'default.txt'); Reset (InFile); - Assign (PromptFile, Config.DataPath + 'default.lng'); + Assign (PromptFile, Config.DataPath + 'default.thm'); ReWrite (PromptFile); While Not Eof(InFile) Do Begin @@ -399,11 +399,11 @@ Var CfgFile : File of RecConfig; MBaseFile : File of RecMessageBase; FBaseFile : File of RecFileBase; - LangFile : File of LangRec; + LangFile : File of RecTheme; Cfg : RecConfig; MBase : RecMessageBase; FBase : RecFileBase; - TLang : LangRec; + TLang : RecTheme; TF : Text; Begin Screen.WriteXYPipe (23, 19, 7, 45, '|08[|15û|08] |07Updating data files|08...'); diff --git a/mystic/mystic.pas b/mystic/mystic.pas index 1b58f19..e7ad8f9 100644 --- a/mystic/mystic.pas +++ b/mystic/mystic.pas @@ -138,7 +138,9 @@ Procedure CheckDIR (Dir: String); Begin If Not FileDirExists(Dir) Then Begin Screen.WriteLine ('ERROR: ' + Dir + ' does not exist.'); + DisposeClasses; + Halt(1); End; End; @@ -184,14 +186,15 @@ Begin End; If Session.NodeNum = 0 Then Begin - WriteLn ('BUSY'); + WriteLn ('BUSY'); {++lang} + DisposeClasses; + Halt; End; fpSignal (SIGTERM, LinuxEventSignal); fpSignal (SIGHUP, LinuxEventSignal); - // do we need sigusr1 and sigusr2 installed? Write (#27 + '(U'); End; @@ -200,7 +203,6 @@ End; Procedure CheckPathsAndDataFiles; Var Count : Byte; - PR : PercentRec; Begin Randomize; @@ -213,7 +215,7 @@ Begin DirClean(Session.TempPath, ''); - Assign (Session.LangFile, Config.DataPath + 'language.dat'); + Assign (Session.LangFile, Config.DataPath + 'theme.dat'); {$I-} Reset (Session.LangFile); {$I+} If IoResult <> 0 Then Begin Screen.WriteLine ('ERROR: No theme configuration. Use MYSTIC -CFG'); @@ -224,7 +226,7 @@ Begin If Not Session.LoadThemeData(Config.DefThemeFile) Then Begin If Not Session.ConfigMode Then Begin - Screen.WriteLine ('ERROR: Default theme prompts not found [' + Config.DefThemeFile + '.lng]'); + Screen.WriteLine ('ERROR: Default theme prompts not found [' + Config.DefThemeFile + '.thm]'); DisposeClasses; Halt(1); End; @@ -404,9 +406,11 @@ Begin If Session.ConfigMode Then Begin Configuration_MainMenu; + Screen.TextAttr := 7; Screen.ClearScreen; Screen.BufFlush; + Halt(0); End; @@ -443,4 +447,4 @@ Begin Repeat Session.Menu.ExecuteMenu (True, True, False); Until False; -End. \ No newline at end of file +End. diff --git a/mystic/records.pas b/mystic/records.pas index 756339c..7ddfb2a 100644 --- a/mystic/records.pas +++ b/mystic/records.pas @@ -12,10 +12,10 @@ {$PACKRECORDS 1} Const - mysSoftwareID = 'Mystic'; - mysCopyYear = '1997-2012'; - mysVersion = '1.10 A11'; - mysDataChanged = '1.10 A11'; + mysSoftwareID = 'Mystic'; // no idea + mysCopyYear = '1997-2012'; // its been a long time! + mysVersion = '1.10 A11'; // current version + mysDataChanged = '1.10 A11'; // version of last records change {$IFDEF WIN32} PathChar = '\'; @@ -38,23 +38,23 @@ Const OSType = 2; {$ENDIF} - mysMaxAcsSize = 30; // Max ACS string size + mysMaxAcsSize = 30; // Max ACS string size mysMaxPathSize = 80; - mysMaxMsgLines = 1000; // Max message base lines - mysMaxInputHistory = 5; // Input history stack size - mysMaxFileDescLen = 50; - mysMaxBatchQueue = 50; - mysMaxVoteQuestion = 20; { Max number of voting questions } - mysMaxMenuNameLen = 20; - mysMaxMenuCmds = 75; { Maximum menu commands per menu } - mysMaxLanguageStr = 478; { Total # of strings in language file } + mysMaxMsgLines = 1000; // Max message base lines + mysMaxInputHistory = 5; // Input history stack size + mysMaxFileDescLen = 50; // file description length per line + mysMaxBatchQueue = 50; // max files per queue + mysMaxVoteQuestion = 20; // Max number of voting questions + mysMaxMenuNameLen = 20; // menu name size + mysMaxMenuCmds = 75; // Maximum menu commands per menu + mysMaxThemeText = 478; // Total prompts in theme file Type SmallWord = System.Word; - Integer = SmallInt; { force Integer to be a 2-byte signed } + Integer = SmallInt; Word = SmallWord; - RecMessageText = Array[1..mysMaxMsgLines] of String[79]; + RecMessageText = Array[1..mysMaxMsgLines] of String[79]; // large global msg buffer is bad AccessFlagType = Set of 1..25; @@ -101,11 +101,11 @@ Type DefStartMenu : String[20]; // Default start menu DefFallMenu : String[20]; DefThemeFile : String[20]; - DefTermMode : Byte; + DefTermMode : Byte; // 0=ask 1=detect 2=detect/ask 3=ansi DefScreenSize : Byte; DefScreenCols : Byte; - ChatStart : SmallInt; // Chat hour start - ChatEnd : SmallInt; // Chat hour end: mins since midnight + ChatStart : Byte; // Chat hour start + ChatEnd : Byte; // Chat hour end ChatFeedback : Boolean; // E-mail sysop if page isn't answered ChatLogging : Boolean; // Record SysOp chat to CHAT.LOG? AcsSysop : String[mysMaxAcsSize]; @@ -123,7 +123,7 @@ Type AcsSeeInvis : String[mysMaxAcsSize]; AcsMultiLogin : String[mysMaxAcsSize]; // CONSOLE SETTINGS - SysopMacro : Array[1..4] of String[80]; // Sysop Macros f1-f4 + SysopMacro : Array[1..8] of String[60]; // Sysop Macros f1-f8 UseStatusBar : Boolean; StatusColor1 : Byte; StatusColor2 : Byte; @@ -136,7 +136,7 @@ Type StartMGroup : Word; StartFGroup : Word; UseUSAPhone : Boolean; - UserNameFormat : Byte; + UserNameFormat : Byte; // 0=typed 1=upper 2=lower 3=proper // NEW USER SETTINGS 2 UserDateType : Byte; // 1=MM/DD/YY 2=DD/MM/YY 3=YY/DD/MM 4=Ask UserEditorType : Byte; // 0=Line 1=Full 2=Ask @@ -144,9 +144,9 @@ Type UserFullChat : Byte; // 0=no 1=yes 2=ask UserFileList : Byte; // 0=Normal 1=Lightbar 2=Ask UserReadType : Byte; // 0=normal 1=ansi 2=ask - UserMailIndex : Byte; - UserReadIndex : Byte; - UserQuoteWin : Byte; + UserMailIndex : Byte; // 0=normal 1=ansi 2=ask + UserReadIndex : Byte; // 0=normal 1=ansi 2=ask + UserQuoteWin : Byte; // 0=line 1=window 2=ask UserProtocol : Byte; AskTheme : Boolean; AskRealName : Boolean; @@ -264,9 +264,9 @@ Const UserNoPWChange = $00000020; Type - RecUser = Record { USERS.DAT } - PermIdx : LongInt; // permanent user number - Flags : LongInt; { User Flags } + RecUser = Record // USERS.DAT + PermIdx : LongInt; // permanent user number + Flags : LongInt; // User Flags bitmap Handle : String[30]; { Handle } RealName : String[30]; { Real Name } Password : String[15]; { Password } @@ -280,7 +280,7 @@ Type Email : String[60]; { email address } Optional : Array[1..10] of String[60]; UserInfo : String[30]; { user comment field } - Theme : String[20]; { user's language file } + Theme : String[20]; // user's theme file AF1 : AccessFlagType; AF2 : AccessFlagType; { access flags set #2 } Security : SmallInt; { Security Level } @@ -398,16 +398,16 @@ Const MBCrossPost = $00000020; Type - RecMessageBase = Record + RecMessageBase = Record // MBASES.DAT Name : String[40]; - QWKName : String[13]; - NewsName : String[60]; + QWKName : String[13]; // ancient standard.. qwk base name + NewsName : String[60]; // newsgroup name spaces are replaced with . FileName : String[40]; Path : String[mysMaxPathSize]; - BaseType : Byte; // 0=JAM 1=Squish - NetType : Byte; // 0=Local 1=Echo 2=News 3=Net - ReadType : Byte; // 0=User 1=Normal 2=FS - ListType : Byte; // 0=User 1=Normal 2=FS + BaseType : Byte; // 0=JAM 1=Squish + NetType : Byte; // 0=Local 1=Echo 2=News 3=Net + ReadType : Byte; // 0=User 1=Normal 2=FS + ListType : Byte; // 0=User 1=Normal 2=FS ListACS : String[mysMaxAcsSize]; ReadACS : String[mysMaxAcsSize]; PostACS : String[mysMaxAcsSize]; @@ -419,18 +419,18 @@ Type ColTear : Byte; ColOrigin : Byte; ColKludge : Byte; - NetAddr : Byte; // Net AKA to use for this base - Origin : String[50]; // Net origin line for this base - DefNScan : Byte; // 0 = off, 1 = on, 2 = forced - DefQScan : Byte; // 0 = off, 1 = on, 2 = forced - MaxMsgs : Word; - MaxAge : Word; - Header : String[20]; - RTemplate : String[20]; - ITemplate : String[20]; - Index : Word; - Flags : LongInt; - Res : Array[1..80] of Byte; + NetAddr : Byte; // Net AKA to use for this base + Origin : String[50]; // Net origin line for this base + DefNScan : Byte; // 0 = off, 1 = on, 2 = forced + DefQScan : Byte; // 0 = off, 1 = on, 2 = forced + MaxMsgs : Word; // max messages allowed (used for squish) + MaxAge : Word; // max days to keep msg (used for squish) + Header : String[20]; // standard reader msgheader + RTemplate : String[20]; // fullscreen reader template + ITemplate : String[20]; // lightbar index template + Index : Word; // permanent index + Flags : LongInt; // MB flag bits see above + Res : Array[1..80] of Byte; // RESERVED End; FScanRec = Record { *.SCN } @@ -461,6 +461,7 @@ Type DefScan : Byte; Flags : LongInt; Res : Array[1..36] of Byte; + //echomail network adresss? End; (* The file directory listing are stored as .DIR in *) @@ -551,14 +552,10 @@ Type HiChar : Char; HiAttr : Byte; Format : Byte; - End; - - PercentRec = Record // percentage bar record - BarLen : Byte; - LoChar : Char; - LoAttr : Byte; - HiChar : Char; - HiAttr : Byte; + StartY : Byte; + EndY : Byte; + StartX : Byte; + RESERVED : LongInt; End; Const @@ -569,13 +566,16 @@ Const Type RecTheme = Record + Flags : LongInt; FileName : String[20]; Desc : String[40]; TextPath : String[mysMaxPathSize]; MenuPath : String[mysMaxPathSize]; ScriptPath : String[mysMaxPathSize]; TemplatePath : String[mysMaxPathSize]; - Flags : LongInt; + LineChat1 : Byte; + LineChat2 : Byte; + UserInputFmt : Byte; FieldColor1 : Byte; FieldColor2 : Byte; FieldChar : Char; @@ -585,38 +585,21 @@ Type FileDescHi : Byte; FileDescLo : Byte; NewMsgChar : Char; + NewVoteChar : Char; VotingBar : RecPercent; FileBar : RecPercent; MsgBar : RecPercent; GalleryBar : RecPercent; HelpBar : RecPercent; ViewerBar : RecPercent; - ThemeColor : Array['A'..'Z'] of Byte; //or 0..9 is this overkill? - // grep ++lang - End; - - LangRec = Record { LANGUAGE.DAT } - FileName : String[8]; { Language file name } - Desc : String[30]; { Language description } - TextPath : String[40]; { Path where text files are stored } - MenuPath : String[40]; { Path where menu files are stored } - okASCII : Boolean; { Allow ASCII } - okANSI : Boolean; { Allow ANSI } - BarYN : Boolean; { Use Lightbar Y/N with this lang } - FieldCol1 : Byte; { Field input color } - FieldCol2 : Byte; - FieldChar : Char; - EchoCh : Char; { Password echo character } - QuoteColor : Byte; { Color for quote lightbar } - TagCh : Char; { File Tagged Char } - FileHi : Byte; { Color of file search highlight } - FileLo : Byte; { Non lightbar description color } - NewMsgChar : Char; { Lightbar Msg Index New Msg Char } - VotingBar : PercentRec; { voting booth bar } - FileBar : PercentRec; { file list bar } - MsgBar : PercentRec; { lightbar msg reader bar } - GalleryBar : PercentRec; - Reserved : Array[1..95] of Byte; { RESERVED } + IndexBar : RecPercent; + FAreaBar : RecPercent; + FGroupBar : RecPercent; + MAreaBar : RecPercent; + MGroupBar : RecPercent; + MAreaList : RecPercent; + Colors : Array[0..9] of Byte; + Reserved : Array[1..199] of Byte; End; BBSListRec = Record @@ -725,7 +708,7 @@ Type RecvCmd : String[60]; End; - PromptRec = String[255]; + RecPrompt = String[255]; NodeMsgRec = Record FromNode : Byte; diff --git a/mystic/todo.pas b/mystic/todo.pas index 055c4b3..6f65bc7 100644 --- a/mystic/todo.pas +++ b/mystic/todo.pas @@ -14,14 +14,11 @@ BUGS AND POSSIBLE ISSUES ! After data file review, add missing variables to various MPL Get/Put functions. ! MYSTPACK has access denied errors (caphood) -? Reapern66 has expressed that the minimal CPU requirements may be too - agressive. Work with him to sort out his baseline, and potentially reduce - the CPU requirement for new versions. Or just tell people the code is - already available GPL and let them compile it if it is a problem? ! RAR internal viewer does not work with files that have embedded comments ! Investigate strange crashing when Mystic is built in the FPC editor vs the makewin script. Something is out of whack with compiler options? OR FPC BUG? DirAttr is suspect in MPL is it 1 byte or 4 in size? +! MDL screensave/restore in local console is broken in Windows(?) only? FUTURE / IDEAS / WORK IN PROGRESS / NOTES ========================================= @@ -35,7 +32,6 @@ FUTURE / IDEAS / WORK IN PROGRESS / NOTES - MCI code to show how many files are in current filebase - Online ANSI file viewer (integrate with art gallery) - Online ANSI help system -- Finish System Configuration rewrite - Finish Data structure review - NEWAPP.MPS - Online text editor / ansi editor? @@ -44,7 +40,6 @@ FUTURE / IDEAS / WORK IN PROGRESS / NOTES - File comments and rating system - Global node message menu command (0;) = add option to ignore your own node - Integrate eventual online ANSI help system into configuration utilities -- FUPLOAD command that does an automated Mass Upload from MBBSUTIL - LEET "TIMER" event menu commands from Mystic 2 - In fact, replace entire menu engine iwth Mystic 2 engine which is SO far beyond anything built in ever... But converting old menus will be the @@ -65,7 +60,6 @@ FUTURE / IDEAS / WORK IN PROGRESS / NOTES - NNTP server completion - MBBSCGI (or PHP DLL) [Grymmjack might have the only MBBSCGI copy] - If not the above then finish the HTTP server? -- Rework code base to compile with newly released FPC (2.6.0). - SDL versions of m_input and m_output and also use SDL if that becomes reality for the ability to play WAV/MP3/MIDI files etc as SysOp notification of events and pages. Maybe someone else can take on creating @@ -94,12 +88,16 @@ FUTURE / IDEAS / WORK IN PROGRESS / NOTES - Rename Template filenames to allow more than 8 characters (for clarity) - Does anyone use Version 7 compiled nodelists? Worth supporting? - Ignore user inactivity flag per user -- HOME and END keys added to lightbar file listings - Default protocol per user - ANSI message upload post processor option: Auto/Disabled/Ask - Prompt for disconect after UL or DL (and add option to filebase settings) - 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. +- ANSI listbox is terribly inefficient with its output. +- So much cool stuff to do with the new themes RANDOM DRUNKEN BRAINDUMP AKA DESIGN DETAILS ===========================================