From 791d404b3833dd655e19073dfc660514e4ef543c Mon Sep 17 00:00:00 2001 From: mysticbbs Date: Mon, 5 Aug 2013 12:56:31 -0400 Subject: [PATCH] A36 --- mystic/bbs_cfg_syscfg.pas | 2 +- mystic/bbs_edit_ansi.pas | 2 +- mystic/bbs_filebase.pas | 4 +++- mystic/bbs_msgbase.pas | 33 +++++++++++++++++++++++++++++---- mystic/bbs_user.pas | 8 ++++---- mystic/mis_client_ftp.pas | 9 +++++++-- mystic/mis_server.pas | 6 +++--- mystic/mpl_common.pas | 16 +++++++++++++++- mystic/mpl_compile.pas | 3 +++ mystic/mpl_execute.pas | 25 ++++++++++++++++++++++--- mystic/todo.pas | 5 +++++ mystic/whatsnew.txt | 8 ++++++++ 12 files changed, 101 insertions(+), 20 deletions(-) diff --git a/mystic/bbs_cfg_syscfg.pas b/mystic/bbs_cfg_syscfg.pas index 3cfec1e..bf568c0 100644 --- a/mystic/bbs_cfg_syscfg.pas +++ b/mystic/bbs_cfg_syscfg.pas @@ -513,7 +513,7 @@ Begin Form.AddBol ('A', ' Allow New Users', 22, 7, 41, 7, 17, 3, @Config.AllowNewUsers, Topic); Form.AddByte ('S', ' Security', 29, 8, 41, 8, 10, 3, 1, 255, @Config.NewUserSec, Topic); - Form.AddStr ('P', ' Password', 29, 9, 41, 9, 10, 15, 15, @Config.NewUserPW, Topic); + Form.AddPass ('P', ' Password', 29, 9, 41, 9, 10, 15, 15, @Config.NewUserPW, Topic); Form.AddBol ('N', ' New User Feedback', 20, 10, 41, 10, 19, 3, @Config.NewUserEmail, Topic); Form.AddBol ('U', ' Use USA Phone', 24, 11, 41, 11, 15, 3, @Config.UseUSAPhone, Topic); Form.AddTog ('E', ' User Name Format', 21, 12, 41, 12, 18, 8, 0, 3, 'As_Typed Upper Lower Proper', @Config.UserNameFormat, Topic); diff --git a/mystic/bbs_edit_ansi.pas b/mystic/bbs_edit_ansi.pas index 084b20e..b1fd78f 100644 --- a/mystic/bbs_edit_ansi.pas +++ b/mystic/bbs_edit_ansi.pas @@ -387,7 +387,7 @@ Begin Session.io.AnsiColor (Session.io.ScreenInfo[3].A); Session.io.AnsiGotoXY (Session.io.ScreenInfo[3].X, Session.io.ScreenInfo[3].Y); - If InsertMode Then Session.io.BufAddStr('INS') else Session.io.BufAddStr('OVR'); { ++lang } + If InsertMode Then Session.io.BufAddStr('INS') else Session.io.BufAddStr('OVR'); { ++lang++ } End; Procedure TEditorANSI.ReDrawTemplate (Reset: Boolean); diff --git a/mystic/bbs_filebase.pas b/mystic/bbs_filebase.pas index b7090a2..1637bac 100644 --- a/mystic/bbs_filebase.pas +++ b/mystic/bbs_filebase.pas @@ -1395,9 +1395,11 @@ Begin SavedP2 := Session.io.PromptInfo[2]; Result := Session.User.ThisUser.Protocol; + If Result = 'Q' Then Result := #0; + //Session.SystemLog('DEBUG: In SelectProtocol'); - If Not LoadByKey(Result) Then Begin + If Not LoadByKey(Result) Or Not UseDefault Then Begin Keys := 'Q'; Session.io.OutFullLn(Session.GetPrompt(359)); diff --git a/mystic/bbs_msgbase.pas b/mystic/bbs_msgbase.pas index 34f9191..0534979 100644 --- a/mystic/bbs_msgbase.pas +++ b/mystic/bbs_msgbase.pas @@ -1800,6 +1800,7 @@ Var Res := True; 1 : Res := Session.User.IsThisUser(MsgBase^.GetTo); 2 : Res := Session.User.IsThisUser(MsgBase^.GetTo) or Session.User.IsThisUser(MsgBase^.GetFrom); +(* 3 : Begin Res := (Pos(SearchStr, strUpper(MsgBase^.GetTo)) > 0) or (Pos(SearchStr, strUpper(MsgBase^.GetFrom)) > 0) or (Pos(SearchStr, strUpper(MsgBase^.GetSubj)) > 0); @@ -1813,9 +1814,24 @@ Var End; End; End; +*) 4 : Res := Session.User.IsThisUser(MsgBase^.GetFrom); End; + If (SearchStr <> '') And (((ScanMode = 2) And Res) Or (ScanMode = 3)) Then Begin + Res := (Pos(SearchStr, strUpper(MsgBase^.GetTo)) > 0) or (Pos(SearchStr, strUpper(MsgBase^.GetFrom)) > 0) or + (Pos(SearchStr, strUpper(MsgBase^.GetSubj)) > 0); + + If Not Res Then Begin + MsgBase^.MsgTxtStartUp; + + While Not Res And Not MsgBase^.EOM Do Begin + Str := strUpper(MsgBase^.GetString(79)); + Res := Pos(SearchStr, Str) > 0; + End; + End; + End; + If NoFrom And Session.User.IsThisUser(MsgBase^.GetFrom) Then Res := False; @@ -2869,7 +2885,7 @@ Begin Case MBase.BaseType of 0 : MsgBase := New(PMsgBaseJAM, Init); - 1 : MsgBase := New(PMsgbaseSquish, Init); + 1 : MsgBase := New(PMsgBaseSquish, Init); End; MsgBase^.SetMsgPath (MBase.Path + MBase.FileName); @@ -2902,6 +2918,9 @@ Begin Else ScanMode := 0; +// session.io.outfull('read ' + mbase.filename + ' ' + mode + ' ' + searchstr + ' ' + stri2s(scanmode) + '|PN'); +// session.io.bufflush; + LastRead := MsgBase^.GetLastRead(Session.User.UserNum); MsgNum := 1; @@ -2937,9 +2956,11 @@ Begin If (Session.User.ThisUser.MReadType = 1) and (Session.io.Graphics > 0) Then Begin ListMode := 1; + Ansi_Read_Messages; End Else Begin ListMode := 0; + Ascii_Read_Messages; End; @@ -3403,8 +3424,9 @@ Procedure TMsgBase.GlobalMessageSearch (Mode : Char); { G = all areas in group } { A = all areas in all groups } Var - SearchStr : String; - Old : RecMessageBase; + SearchStr : String; + SavedIgnore : Boolean; + Old : RecMessageBase; Begin If Not (Mode in ['A', 'C', 'G']) Then Mode := 'G'; @@ -3416,6 +3438,8 @@ Begin OLD := MBase; WereMsgs := False; + SavedIgnore := Session.User.IgnoreGroup; + Session.User.IgnoreGroup := Mode = 'A'; If Mode = 'C' Then @@ -3435,6 +3459,7 @@ Begin If MScan.NewScan > 0 Then Begin If Not ReadMessages('T', '', SearchStr) Then Begin Session.io.OutRawLn(''); + Break; End; @@ -3448,7 +3473,7 @@ Begin Close (MBaseFile); End; - Session.User.IgnoreGroup := False; + Session.User.IgnoreGroup := SavedIgnore; MBase := OLD; End; diff --git a/mystic/bbs_user.pas b/mystic/bbs_user.pas index b087987..8852663 100644 --- a/mystic/bbs_user.pas +++ b/mystic/bbs_user.pas @@ -107,7 +107,7 @@ Begin ThisUser.LastFGroup := Config.StartFGroup; ThisUser.LastMGroup := Config.StartMGroup; ThisUser.UseLBQuote := True; - ThisUser.UseFulLChat := True; + ThisUser.UseFullChat := True; ThisUser.CodePage := Config.StartCodePage; IgnoreGroup := False; @@ -946,9 +946,9 @@ Begin If AskBirthdate Then GetBirthdate(False); If AskEmail Then GetEmail(False); If AskUserNote Then GetUserNote(False); - If OptionalField[1].Ask Then GetOption1(False); - If OptionalField[2].Ask Then GetOption2(False); - If OptionalField[3].Ask Then GetOption3(False); + If OptionalField[1].Ask Then GetOption1(False); + If OptionalField[2].Ask Then GetOption2(False); + If OptionalField[3].Ask Then GetOption3(False); If UserEditorType = 2 Then GetEditor(False) Else ThisUser.EditType := UserEditorType; If UserQuoteWin = 2 Then diff --git a/mystic/mis_client_ftp.pas b/mystic/mis_client_ftp.pas index fa994fc..8e0e4ab 100644 --- a/mystic/mis_client_ftp.pas +++ b/mystic/mis_client_ftp.pas @@ -49,7 +49,7 @@ Type Destructor Destroy; Override; Function OpenDataSession : Boolean; - Procedure CloseDataSession; + Procedure CloseDataSession; Procedure ResetSession; Procedure UpdateUserStats (TFBase: RecFileBase; FDir: RecFileList; DirPos: LongInt); Function CheckFileLimits (TempFBase: RecFileBase; FDir: RecFileList) : Byte; @@ -411,7 +411,9 @@ End; Procedure TFTPServer.cmdREIN; Begin ResetSession; - Client.WriteLine(re_Greeting); + + If Not Client.WriteFile('220', bbsConfig.DataPath + 'ftpbanner.txt') Then + Client.WriteLine (re_Greeting); End; Procedure TFTPServer.cmdPORT; @@ -866,9 +868,11 @@ Begin If Cmd = 'CDUP' Then cmdCDUP Else If Cmd = 'CWD' Then cmdCWD Else +// If Cmd = 'DELE' Then Client.WriteLine(re_NoAccess) Else If Cmd = 'EPRT' Then cmdEPRT Else If Cmd = 'EPSV' Then cmdEPSV Else If Cmd = 'LIST' Then cmdLIST Else +// If Cmd = 'MKD' Then Client.WriteLine(re_NoAccess) Else If Cmd = 'MODE' Then cmdMODE Else If Cmd = 'NLST' Then cmdNLST Else If Cmd = 'NOOP' Then Client.WriteLine(re_CommandOK) Else @@ -878,6 +882,7 @@ Begin If Cmd = 'PWD' Then cmdPWD Else If Cmd = 'REIN' Then cmdREIN Else If Cmd = 'RETR' Then cmdRETR Else +// If Cmd = 'RMD' Then Client.WriteLine(re_NoAccess) Else If Cmd = 'SIZE' Then cmdSIZE Else If Cmd = 'STOR' Then cmdSTOR Else If Cmd = 'STRU' Then cmdSTRU Else diff --git a/mystic/mis_server.pas b/mystic/mis_server.pas index 6876d46..4661fcc 100644 --- a/mystic/mis_server.pas +++ b/mystic/mis_server.pas @@ -220,7 +220,7 @@ Begin Status ('BUSY: ' + NewClient.PeerIP + ' (' + NewClient.PeerName + ')'); - If Not NewClient.WriteFile(TextPath + 'busy.txt') Then + If Not NewClient.WriteFile('', TextPath + 'busy.txt') Then NewClient.WriteLine('BUSY'); WaitMS(3000); @@ -232,7 +232,7 @@ Begin Status('BLOCK: ' + NewClient.PeerIP + ' (' + NewClient.PeerName + ')'); - If Not NewClient.WriteFile(TextPath + 'blocked.txt') Then + If Not NewClient.WriteFile('', TextPath + 'blocked.txt') Then NewClient.WriteLine('BLOCKED'); WaitMS(3000); @@ -244,7 +244,7 @@ Begin Status('MULTI: ' + NewClient.PeerIP + ' (' + NewClient.PeerName + ')'); - If Not NewClient.WriteFile(TextPath + 'dupeip.txt') Then + If Not NewClient.WriteFile('', TextPath + 'dupeip.txt') Then NewClient.WriteLine('Only ' + strI2S(ClientMaxIPs) + ' connection(s) per user'); WaitMS(3000); diff --git a/mystic/mpl_common.pas b/mystic/mpl_common.pas index 8122a66..7bc2f33 100644 --- a/mystic/mpl_common.pas +++ b/mystic/mpl_common.pas @@ -322,7 +322,9 @@ Begin AddProc ({$IFDEF MPLPARSER} 'inputoptions', {$ENDIF} 'lbbcss', iNone); // 555 AddProc ({$IFDEF MPLPARSER} 'inputexit', {$ENDIF} 'l', iChar); // 556 AddProc ({$IFDEF MPLPARSER} 'inputnumber', {$ENDIF} 'lbbbblll', iLongInt); // 557 - AddProc ({$IFDEF MPLPARSER} 'inputenter', {$ENDIF} 'lbbbs', iBool); + AddProc ({$IFDEF MPLPARSER} 'inputenter', {$ENDIF} 'lbbbs', iBool); // 558 + AddProc ({$IFDEF MPLPARSER} 'imageget', {$ENDIF} 'lbbbb', iNone); // 559 + AddProc ({$IFDEF MPLPARSER} 'imageput', {$ENDIF} 'l', iNone); // 560 { END OF PROCEDURE DEFINITIONS } @@ -370,6 +372,18 @@ Begin AddVar ({$IFDEF MPLPARSER} 'usermbase', {$ENDIF} iLongInt); AddVar ({$IFDEF MPLPARSER} 'usermgroup', {$ENDIF} iLongInt); AddVar ({$IFDEF MPLPARSER} 'userbirthday', {$ENDIF} iLongInt); + AddStr ({$IFDEF MPLPARSER} 'usercity', {$ENDIF} iString, 25); + AddStr ({$IFDEF MPLPARSER} 'useremail', {$ENDIF} iString, 60); + AddStr ({$IFDEF MPLPARSER} 'userinfo', {$ENDIF} iString, 30); + + AddStr ({$IFDEF MPLPARSER} 'useropts', {$ENDIF} iString, 10 * 60 - 1); + CV[X]^.ArrPos := 1; + {$IFNDEF MPLPARSER} + CV[X]^.VarSize := 61; + CV[X]^.ArrDim[1] := 10; + {$ENDIF} + + AddVar ({$IFDEF MPLPARSER} 'userfsreader', {$ENDIF} iBool); End; 2 : Begin AddPointer ({$IFDEF MPLPARSER} 'cfgsyspath', {$ENDIF} iString, mysMaxPathSize, {$IFNDEF MPLPARSER} @Config.SystemPath {$ELSE} NIL {$ENDIF}); diff --git a/mystic/mpl_compile.pas b/mystic/mpl_compile.pas index e3a1416..868014d 100644 --- a/mystic/mpl_compile.pas +++ b/mystic/mpl_compile.pas @@ -1,3 +1,6 @@ +// remove token label +// remove extra parse block? + Unit MPL_Compile; {$I M_OPS.PAS} diff --git a/mystic/mpl_execute.pas b/mystic/mpl_execute.pas index c6e2ba7..043fa66 100644 --- a/mystic/mpl_execute.pas +++ b/mystic/mpl_execute.pas @@ -18,6 +18,7 @@ Const Const mplClass_Box = 1; mplClass_Input = 2; + mplClass_Image = 3; Type TClassStack = Record @@ -190,6 +191,11 @@ Begin Move (U.LastMBase, VarData[IdxVarUser + 14]^.Data^, SizeOf(U.LastMBase)); Move (U.LastMGroup, VarData[IdxVarUser + 15]^.Data^, SizeOf(U.LastMGroup)); Move (U.Birthday, VarData[IdxVarUser + 16]^.Data^, SizeOf(U.Birthday)); + Move (U.City, VarData[IdxVarUser + 17]^.Data^, SizeOf(U.City)); + Move (U.Email, VarData[IdxVarUser + 18]^.Data^, SizeOf(U.Email)); + Move (U.UserInfo, VarData[IdxVarUser + 19]^.Data^, SizeOf(U.UserInfo)); + Move (U.OptionData, VarData[IdxVarUser + 20]^.Data^, SizeOf(U.OptionData)); + Move (U.MReadType, VarData[IdxVarUser + 21]^.Data^, SizeOf(U.MReadType)); End; Procedure TInterpEngine.PutUserVars (Var U: RecUser); @@ -211,6 +217,11 @@ Begin Move (VarData[IdxVarUser + 14]^.Data^, U.LastMBase, SizeOf(U.LastMBase)); Move (VarData[IdxVarUser + 15]^.Data^, U.LastMGroup, SizeOf(U.LastMGroup)); Move (VarData[IdxVarUser + 16]^.Data^, U.Birthday, SizeOf(U.Birthday)); + Move (VarData[IdxVarUser + 17]^.Data^, U.City, SizeOf(U.City)); + Move (VarData[IdxVarUser + 18]^.Data^, U.Email, SizeOf(U.Email)); + Move (VarData[IdxVarUser + 19]^.Data^, U.UserInfo, SizeOf(U.UserInfo)); + Move (VarData[IdxVarUser + 20]^.Data^, U.OptionData, SizeOf(U.OptionData)); + Move (VarData[IdxVarUser + 21]^.Data^, U.MReadType, SizeOf(U.MReadType)); End; Function TInterpEngine.GetUserRecord (Num: LongInt) : Boolean; @@ -393,9 +404,7 @@ Begin For Count := 1 to mplMaxClassStack Do If Assigned(ClassData[Count].ClassPtr) Then - Case ClassData[Count].ClassType of - mplClass_Box : TAnsiMenuBox(ClassData[Count].ClassPtr).Free; - End; + ClassFree(Count); Inherited Destroy; End; @@ -1266,6 +1275,11 @@ Begin If Str = 'INPUT' Then Begin ClassData[Num].ClassPtr := TAnsiMenuInput.Create; ClassData[Num].ClassType := mplClass_Input; + End Else + If Str = 'IMAGE' Then Begin + GetMem (ClassData[Num].ClassPtr, SizeOf(TConsoleImageRec)); + + ClassData[Num].ClassType := mplClass_Image; End Else Error(mpxInvalidClass, Str); End; @@ -1277,6 +1291,7 @@ Begin Case ClassData[Num].ClassType of mplClass_Box : TAnsiMenuBox(ClassData[Num].ClassPtr).Free; mplClass_Input : TAnsiMenuInput(ClassData[Num].ClassPtr).Free; + mplClass_Image : FreeMem(ClassData[Num].ClassPtr); End; ClassData[Num].ClassPtr := NIL; @@ -2076,6 +2091,10 @@ Begin TempBool := TAnsiMenuInput(ClassData[Param[1].L].ClassPtr).GetEnter(Param[2].B, Param[3].B, Param[4].B, Param[5].S); Store (TempBool, 1); End; + 559 : If ClassValid(Param[1].L, mplClass_Image) Then + Screen.GetScreenImage (Param[2].B, Param[3].B, Param[4].B, Param[5].B, TConsoleImageRec(ClassData[Param[1].L].ClassPtr^)); + 560 : If ClassValid(Param[1].L, mplClass_Image) Then + Session.io.RemoteRestore(TConsoleImageRec(ClassData[Param[1].L].ClassPtr^)); End; End; diff --git a/mystic/todo.pas b/mystic/todo.pas index ed41e92..6ed5bfa 100644 --- a/mystic/todo.pas +++ b/mystic/todo.pas @@ -32,6 +32,9 @@ BUGS AND POSSIBLE ISSUES FUTURE / IDEAS / WORK IN PROGRESS / NOTES ========================================= +- global user editor for user flags, def protocol, etc etc +- ability to configure auto signatures (2 of them) one for handle and one + for real names - ability to download ANSIs while actually viewing them in the gallery - optional Menu scroller during input? - Menu type: Lightbar/Form OR just change standard lightbar to work that @@ -254,6 +257,8 @@ ReplaceLine 1.11 ==== +- MUTIL option to create bases to (msgbase path + domainname) directory. +- MUTIL option to scan recursively when creatign bases by data files - Rewrite user login functions and MATRIX - Change temp directories. Add MIS/MUTIL/FTN/NODE - User directories (research disk performance with a zillion dirs) diff --git a/mystic/whatsnew.txt b/mystic/whatsnew.txt index 2c7db52..9fed86f 100644 --- a/mystic/whatsnew.txt +++ b/mystic/whatsnew.txt @@ -3509,4 +3509,12 @@ See TESTINPUT.MPS for an example. + + MIS FTP server now will display 'ftpbanner.txt' from the DATA directory + if it exists when a user connects via FTP. + + ! Once a default protocol was selected, the GE command (option 22) to change + the default was not working. + + + MPL now supports ANSI screen class. NEED TO DOCUMENT AND SHOW EXAMPLE +