Node message changes, and a few other minor things
This commit is contained in:
parent
1d5222ecc8
commit
d2ce4ec45c
|
@ -3953,7 +3953,7 @@
|
||||||
system. It of course is still possible to use the Theme system to create
|
system. It of course is still possible to use the Theme system to create
|
||||||
support for different languages as well.
|
support for different languages as well.
|
||||||
|
|
||||||
Additionally, compile prompt files that used to have the .LNG file
|
Additionally, compiled prompt files that used to have the .LNG file
|
||||||
extension have been renamed to .THM extension. The upgrade utility should
|
extension have been renamed to .THM extension. The upgrade utility should
|
||||||
take care of all this renaming for you.
|
take care of all this renaming for you.
|
||||||
|
|
||||||
|
@ -3999,3 +3999,29 @@
|
||||||
|
|
||||||
+ Mystic now has 10 colors definable per theme, with 10 new MCI codes
|
+ Mystic now has 10 colors definable per theme, with 10 new MCI codes
|
||||||
|T0 to |T9 to display them.
|
|T0 to |T9 to display them.
|
||||||
|
|
||||||
|
+ Mystic's internal Language editor has now been replaced with a theme
|
||||||
|
editor. This editor is full ANSI lightbar-capable like other newer
|
||||||
|
configurations. It can also edit all prompts and compile prompt files
|
||||||
|
all internally. It support at least the features of the old MCFG editor
|
||||||
|
including prompt text search, jumping, copy/paste, undo, etc.
|
||||||
|
|
||||||
|
+ Mystic now checks for messages between nodes every 3 seconds while waiting
|
||||||
|
for input. Previously Mystic would check based on situation (ie, before
|
||||||
|
menu prompt, in between messages, etc) but never while idle waiting on
|
||||||
|
input as it does now.
|
||||||
|
|
||||||
|
! Mystic was not allowing node messages within MPL programs. It is not clear
|
||||||
|
if this was introduced in the 1.10 alphas or if the problem existed in the
|
||||||
|
past.
|
||||||
|
|
||||||
|
+ Mystic now saves and restores the user's screen before and after showing a
|
||||||
|
node message. You can now place a clear screen comfortably in those
|
||||||
|
prompts to make a really clean look when users are interrupted with node
|
||||||
|
messages.
|
||||||
|
|
||||||
|
+ Mystic now has less chance of a "ghost" user situation occuring in Linux.
|
||||||
|
|
||||||
|
+ MIS Linux can now accept telnet connections and properly redirect STDIO
|
||||||
|
while spawning Mystic. This means it can entirely replace a Linux
|
||||||
|
telnet daemon if desired. It has had little testing though at the moment.
|
||||||
|
|
|
@ -231,6 +231,8 @@ Var
|
||||||
DirInfo: SearchRec;
|
DirInfo: SearchRec;
|
||||||
A : Byte; {format dir output}
|
A : Byte; {format dir output}
|
||||||
Begin
|
Begin
|
||||||
|
If session.lang.filename = '' then exit;
|
||||||
|
|
||||||
Old := Session.Menu.MenuName;
|
Old := Session.Menu.MenuName;
|
||||||
OldLang := Session.Lang;
|
OldLang := Session.Lang;
|
||||||
Session.SystemLog ('*MENU EDITOR*');
|
Session.SystemLog ('*MENU EDITOR*');
|
||||||
|
|
|
@ -17,6 +17,9 @@ Uses
|
||||||
BBS_Menus,
|
BBS_Menus,
|
||||||
MPL_Execute;
|
MPL_Execute;
|
||||||
|
|
||||||
|
Const
|
||||||
|
mysMessageThreshold = 3;
|
||||||
|
|
||||||
Type
|
Type
|
||||||
TBBSCore = Class
|
TBBSCore = Class
|
||||||
User : TBBSUser;
|
User : TBBSUser;
|
||||||
|
@ -53,6 +56,9 @@ Type
|
||||||
TimeChecked : Boolean;
|
TimeChecked : Boolean;
|
||||||
ConfigMode : Boolean;
|
ConfigMode : Boolean;
|
||||||
InUserEdit : Boolean;
|
InUserEdit : Boolean;
|
||||||
|
AllowMessages : Boolean;
|
||||||
|
InMessage : Boolean;
|
||||||
|
MessageCheck : Byte;
|
||||||
HistoryFile : File of RecHistory;
|
HistoryFile : File of RecHistory;
|
||||||
HistoryEmails : Word;
|
HistoryEmails : Word;
|
||||||
HistoryPosts : Word;
|
HistoryPosts : Word;
|
||||||
|
@ -110,6 +116,9 @@ Begin
|
||||||
TimeChecked := False;
|
TimeChecked := False;
|
||||||
ConfigMode := False;
|
ConfigMode := False;
|
||||||
InUserEdit := False;
|
InUserEdit := False;
|
||||||
|
AllowMessages := True;
|
||||||
|
InMessage := False;
|
||||||
|
MessageCheck := mysMessageThreshold;
|
||||||
|
|
||||||
{$IFDEF WINDOWS}
|
{$IFDEF WINDOWS}
|
||||||
Client := TSocketClass.Create;
|
Client := TSocketClass.Create;
|
||||||
|
|
|
@ -109,7 +109,8 @@ Implementation
|
||||||
Uses
|
Uses
|
||||||
DOS,
|
DOS,
|
||||||
bbs_Core,
|
bbs_Core,
|
||||||
bbs_General;
|
bbs_General,
|
||||||
|
bbs_NodeInfo;
|
||||||
|
|
||||||
Constructor TBBSIO.Create (Var Owner: Pointer);
|
Constructor TBBSIO.Create (Var Owner: Pointer);
|
||||||
Begin
|
Begin
|
||||||
|
@ -261,8 +262,6 @@ Begin
|
||||||
|
|
||||||
OutFull (TBBSCore(Core).GetPrompt(132));
|
OutFull (TBBSCore(Core).GetPrompt(132));
|
||||||
|
|
||||||
PurgeInputBuffer;
|
|
||||||
|
|
||||||
Ch := OneKey('YNC' + #13, False);
|
Ch := OneKey('YNC' + #13, False);
|
||||||
|
|
||||||
OutBS (Screen.CursorX, True);
|
OutBS (Screen.CursorX, True);
|
||||||
|
@ -1251,6 +1250,16 @@ Begin
|
||||||
Halt(0);
|
Halt(0);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
If Session.AllowMessages And Not Session.InMessage Then Begin
|
||||||
|
Dec (Session.MessageCheck);
|
||||||
|
|
||||||
|
If Session.MessageCheck = 0 Then Begin
|
||||||
|
CheckNodeMessages;
|
||||||
|
|
||||||
|
Session.MessageCheck := mysMessageThreshold;
|
||||||
|
End;
|
||||||
|
End;
|
||||||
|
|
||||||
TimeCount := TBBSCore(Core).TimeLeft;
|
TimeCount := TBBSCore(Core).TimeLeft;
|
||||||
|
|
||||||
If TimeCount <> Session.LastTimeLeft Then Begin
|
If TimeCount <> Session.LastTimeLeft Then Begin
|
||||||
|
@ -1743,8 +1752,9 @@ Begin
|
||||||
Percent := Round(Part / Whole * 100);
|
Percent := Round(Part / Whole * 100);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
DrawPercent := Attr2Ansi(Bar.HiAttr) + strRep(Bar.HiChar, FillSize) +
|
Result := Attr2Ansi(Bar.HiAttr) + strRep(Bar.HiChar, FillSize) +
|
||||||
Attr2Ansi(Bar.LoAttr) + strRep(Bar.LoChar, Bar.BarLength - FillSize);
|
Attr2Ansi(Bar.LoAttr) + strRep(Bar.LoChar, Bar.BarLength - FillSize) +
|
||||||
|
Attr2Ansi(7);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
{$IFDEF UNIX}
|
{$IFDEF UNIX}
|
||||||
|
|
|
@ -41,6 +41,7 @@ Uses
|
||||||
bbs_User,
|
bbs_User,
|
||||||
bbs_NodeChat,
|
bbs_NodeChat,
|
||||||
bbs_NodeInfo,
|
bbs_NodeInfo,
|
||||||
|
bbs_UserChat,
|
||||||
bbs_ansi_Help,
|
bbs_ansi_Help,
|
||||||
MPL_Execute,
|
MPL_Execute,
|
||||||
bbs_cfg_MenuEdit,
|
bbs_cfg_MenuEdit,
|
||||||
|
@ -258,6 +259,7 @@ Begin
|
||||||
'N' : Case Cmd[2] of
|
'N' : Case Cmd[2] of
|
||||||
'A' : Set_Node_Action (Data);
|
'A' : Set_Node_Action (Data);
|
||||||
'C' : Node_Chat;
|
'C' : Node_Chat;
|
||||||
|
'P' : PageUserForChat;
|
||||||
'S' : Send_Node_Message (3, Data, 0);
|
'S' : Send_Node_Message (3, Data, 0);
|
||||||
'W' : Show_Whos_Online;
|
'W' : Show_Whos_Online;
|
||||||
End;
|
End;
|
||||||
|
@ -794,8 +796,6 @@ Begin
|
||||||
|
|
||||||
Set_Node_Action (Session.GetPrompt(346));
|
Set_Node_Action (Session.GetPrompt(346));
|
||||||
|
|
||||||
CheckNodeMessages;
|
|
||||||
|
|
||||||
Keys := #13;
|
Keys := #13;
|
||||||
ExtKeys := '';
|
ExtKeys := '';
|
||||||
|
|
||||||
|
|
|
@ -1429,8 +1429,6 @@ Var
|
||||||
Ansi_View_Message := False;
|
Ansi_View_Message := False;
|
||||||
|
|
||||||
Repeat
|
Repeat
|
||||||
CheckNodeMessages;
|
|
||||||
|
|
||||||
Set_Node_Action (Session.GetPrompt(348));
|
Set_Node_Action (Session.GetPrompt(348));
|
||||||
|
|
||||||
Set_Message_Security;
|
Set_Message_Security;
|
||||||
|
@ -1733,8 +1731,6 @@ Var
|
||||||
|
|
||||||
Procedure FullReDraw;
|
Procedure FullReDraw;
|
||||||
Begin
|
Begin
|
||||||
CheckNodeMessages;
|
|
||||||
|
|
||||||
Session.io.OutFile (MBase.ITemplate, True, 0);
|
Session.io.OutFile (MBase.ITemplate, True, 0);
|
||||||
|
|
||||||
PageSize := Session.io.ScreenInfo[2].Y - Session.io.ScreenInfo[1].Y + 1;
|
PageSize := Session.io.ScreenInfo[2].Y - Session.io.ScreenInfo[1].Y + 1;
|
||||||
|
@ -2064,8 +2060,6 @@ Var
|
||||||
Session.io.AllowPause := False;
|
Session.io.AllowPause := False;
|
||||||
|
|
||||||
Repeat
|
Repeat
|
||||||
CheckNodeMessages;
|
|
||||||
|
|
||||||
Session.io.PromptInfo[1] := strI2S(MsgBase^.GetMsgNum);
|
Session.io.PromptInfo[1] := strI2S(MsgBase^.GetMsgNum);
|
||||||
Session.io.PromptInfo[2] := strI2S(MsgBase^.GetHighMsgNum);
|
Session.io.PromptInfo[2] := strI2S(MsgBase^.GetHighMsgNum);
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ Begin
|
||||||
Session.io.OutRaw (strPadR(Room.Name, 40, ' '));
|
Session.io.OutRaw (strPadR(Room.Name, 40, ' '));
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function GetKeyNodeChatFunc (Forced : Boolean) : Boolean;
|
Function GetKeyNodeChatFunc (Forced: Boolean) : Boolean;
|
||||||
{ 1 = node chat broadcast message (if room = 0)
|
{ 1 = node chat broadcast message (if room = 0)
|
||||||
node chat regular text (if room = room user is in)
|
node chat regular text (if room = room user is in)
|
||||||
4 = node chat private message
|
4 = node chat private message
|
||||||
|
@ -361,6 +361,7 @@ Procedure Node_Chat;
|
||||||
Until False;
|
Until False;
|
||||||
|
|
||||||
TopPage := TopSave;
|
TopPage := TopSave;
|
||||||
|
|
||||||
FullReDraw;
|
FullReDraw;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
|
@ -13,11 +13,14 @@ Procedure Set_Node_Action (Action: String);
|
||||||
Implementation
|
Implementation
|
||||||
|
|
||||||
Uses
|
Uses
|
||||||
|
m_Types,
|
||||||
m_DateTime,
|
m_DateTime,
|
||||||
m_Strings,
|
m_Strings,
|
||||||
|
m_FileIO,
|
||||||
bbs_Common,
|
bbs_Common,
|
||||||
bbs_Core,
|
bbs_Core,
|
||||||
bbs_User;
|
bbs_User,
|
||||||
|
bbs_UserChat;
|
||||||
|
|
||||||
Function Is_User_Online (Name: String) : Word;
|
Function Is_User_Online (Name: String) : Word;
|
||||||
Var
|
Var
|
||||||
|
@ -197,9 +200,8 @@ Begin
|
||||||
|
|
||||||
Assign (NodeMsgFile, Config.SystemPath + 'temp' + strI2S(A) + PathChar + 'chat.tmp');
|
Assign (NodeMsgFile, Config.SystemPath + 'temp' + strI2S(A) + PathChar + 'chat.tmp');
|
||||||
|
|
||||||
{$I-} Reset (NodeMsgFile); {$I+}
|
If Not ioReset (NodeMsgFile, SizeOf(NodeMsg), fmReadWrite + fmDenyAll) Then
|
||||||
|
ioReWrite(NodeMsgFile, SizeOf(NodeMsg), fmReadWrite + fmDenyAll);
|
||||||
If IoResult <> 0 Then ReWrite(NodeMsgFile);
|
|
||||||
|
|
||||||
Seek (NodeMsgFile, FileSize(NodeMsgFile));
|
Seek (NodeMsgFile, FileSize(NodeMsgFile));
|
||||||
Write (NodeMsgFile, NodeMsg);
|
Write (NodeMsgFile, NodeMsg);
|
||||||
|
@ -212,26 +214,33 @@ End;
|
||||||
Function CheckNodeMessages : Boolean;
|
Function CheckNodeMessages : Boolean;
|
||||||
Var
|
Var
|
||||||
Str : String;
|
Str : String;
|
||||||
|
Image : TConsoleImageRec;
|
||||||
Begin
|
Begin
|
||||||
Result := False;
|
Result := False;
|
||||||
FileMode := 66;
|
FileMode := 66;
|
||||||
|
|
||||||
Assign (NodeMsgFile, Session.TempPath + 'chat.tmp');
|
Assign (NodeMsgFile, Session.TempPath + 'chat.tmp');
|
||||||
|
|
||||||
{$I-} Reset (NodeMsgFile); {$I+}
|
If Not ioReset(NodeMsgFile, SizeOf(NodeMsg), fmReadWrite + fmDenyAll) Then
|
||||||
|
Exit;
|
||||||
|
|
||||||
If IoResult <> 0 Then Exit;
|
If FileSize(NodeMsgFile) = 0 Then Begin
|
||||||
|
Close (NodeMsgFile);
|
||||||
|
Exit;
|
||||||
|
End;
|
||||||
|
|
||||||
// 2 = system broadcast message (ie, not from user, from mystic)
|
Session.InMessage := True;
|
||||||
// 3 = user to user node message
|
CheckNodeMessages := True;
|
||||||
|
|
||||||
While Not Eof(NodeMsgFile) Do Begin
|
|
||||||
Result := True;
|
|
||||||
|
|
||||||
Read (NodeMsgFile, NodeMsg);
|
Read (NodeMsgFile, NodeMsg);
|
||||||
|
KillRecord (NodeMsgFile, 1, SizeOf(NodeMsg));
|
||||||
|
Close (NodeMsgFile);
|
||||||
|
|
||||||
|
Screen.GetScreenImage (1, 1, 79, 24, Image);
|
||||||
|
|
||||||
Session.io.PromptInfo[1] := NodeMsg.FromWho;
|
Session.io.PromptInfo[1] := NodeMsg.FromWho;
|
||||||
Session.io.PromptInfo[2] := strI2S(NodeMsg.FromNode);
|
Session.io.PromptInfo[2] := strI2S(NodeMsg.FromNode);
|
||||||
|
Session.io.PromptInfo[3] := NodeMsg.Message;
|
||||||
|
|
||||||
Case NodeMsg.MsgType of
|
Case NodeMsg.MsgType of
|
||||||
2 : Begin
|
2 : Begin
|
||||||
|
@ -242,11 +251,16 @@ Begin
|
||||||
Session.io.OutFullLn (Session.GetPrompt(144) + '|CR' + NodeMsg.Message);
|
Session.io.OutFullLn (Session.GetPrompt(144) + '|CR' + NodeMsg.Message);
|
||||||
Session.io.OutFull (Session.GetPrompt(145));
|
Session.io.OutFull (Session.GetPrompt(145));
|
||||||
End;
|
End;
|
||||||
|
8 : If Session.io.GetYN('|CL|15|&1 is requesting user to user chat. Accept? |11', True) Then Begin
|
||||||
|
Send_Node_Message (10, strI2S(NodeMsg.FromNode) + ';C', 0);
|
||||||
|
OpenUserChat(False, NodeMsg.FromNode);
|
||||||
End;
|
End;
|
||||||
|
9 : Begin
|
||||||
|
Send_Node_Message (10, strI2S(NodeMsg.FromNode) + ';C', 0);
|
||||||
|
OpenUserChat(True, NodeMsg.FromNode);
|
||||||
|
End;
|
||||||
|
10: OpenUserChat(False, NodeMsg.FromNode);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Close (NodeMsgFile);
|
|
||||||
Erase (NodeMsgFile);
|
|
||||||
|
|
||||||
If Result And (NodeMsg.MsgType = 3) Then
|
If Result And (NodeMsg.MsgType = 3) Then
|
||||||
If Session.io.OneKey(#13 + 'R', True) = 'R' Then Begin
|
If Session.io.OneKey(#13 + 'R', True) = 'R' Then Begin
|
||||||
|
@ -256,6 +270,10 @@ Begin
|
||||||
|
|
||||||
If Str <> '' Then Send_Node_Message(3, Session.io.PromptInfo[2] + ';' + Str, 0);
|
If Str <> '' Then Send_Node_Message(3, Session.io.PromptInfo[2] + ';' + Str, 0);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
Session.io.RemoteRestore(Image);
|
||||||
|
|
||||||
|
Session.InMessage := False;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
End.
|
End.
|
||||||
|
|
|
@ -120,6 +120,7 @@ Begin
|
||||||
If Session.EventRunAfter Then ExitCode := Session.NextEvent.ErrLevel;
|
If Session.EventRunAfter Then ExitCode := Session.NextEvent.ErrLevel;
|
||||||
|
|
||||||
DirClean (Session.TempPath, '');
|
DirClean (Session.TempPath, '');
|
||||||
|
FileErase (Config.DataPath + 'chat' + strI2S(Session.NodeNum) + '.dat');
|
||||||
|
|
||||||
{$IFNDEF LOGGING}
|
{$IFNDEF LOGGING}
|
||||||
{$IFNDEF UNIX}
|
{$IFNDEF UNIX}
|
||||||
|
@ -218,23 +219,6 @@ Begin
|
||||||
|
|
||||||
DirClean(Session.TempPath, '');
|
DirClean(Session.TempPath, '');
|
||||||
|
|
||||||
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');
|
|
||||||
DisposeClasses;
|
|
||||||
Halt(1);
|
|
||||||
End;
|
|
||||||
Close (Session.LangFile);
|
|
||||||
|
|
||||||
If Not Session.LoadThemeData(Config.DefThemeFile) Then Begin
|
|
||||||
If Not Session.ConfigMode Then Begin
|
|
||||||
Screen.WriteLine ('ERROR: Default theme prompts not found [' + Config.DefThemeFile + '.thm]');
|
|
||||||
DisposeClasses;
|
|
||||||
Halt(1);
|
|
||||||
End;
|
|
||||||
End;
|
|
||||||
|
|
||||||
Assign (Session.User.UserFile, Config.DataPath + 'users.dat');
|
Assign (Session.User.UserFile, Config.DataPath + 'users.dat');
|
||||||
{$I-} Reset (Session.User.UserFile); {$I+}
|
{$I-} Reset (Session.User.UserFile); {$I+}
|
||||||
If IoResult <> 0 Then Begin
|
If IoResult <> 0 Then Begin
|
||||||
|
@ -253,6 +237,23 @@ Begin
|
||||||
If IoResult <> 0 Then ReWrite (VoteFile);
|
If IoResult <> 0 Then ReWrite (VoteFile);
|
||||||
Close (VoteFile);
|
Close (VoteFile);
|
||||||
|
|
||||||
|
Assign (Session.LangFile, Config.DataPath + 'theme.dat');
|
||||||
|
{$I-} Reset (Session.LangFile); {$I+}
|
||||||
|
If IoResult <> 0 Then Begin
|
||||||
|
Screen.WriteLine ('ERROR: No theme configuration.');
|
||||||
|
DisposeClasses;
|
||||||
|
Halt(1);
|
||||||
|
End;
|
||||||
|
Close (Session.LangFile);
|
||||||
|
|
||||||
|
If Not Session.LoadThemeData(Config.DefThemeFile) Then Begin
|
||||||
|
If Not Session.ConfigMode Then Begin
|
||||||
|
Screen.WriteLine ('ERROR: Default theme prompts not found [' + Config.DefThemeFile + '.thm]');
|
||||||
|
DisposeClasses;
|
||||||
|
Halt(1);
|
||||||
|
End;
|
||||||
|
End;
|
||||||
|
|
||||||
If Session.ConfigMode Then Exit;
|
If Session.ConfigMode Then Exit;
|
||||||
|
|
||||||
CheckDIR (Config.SystemPath);
|
CheckDIR (Config.SystemPath);
|
||||||
|
|
|
@ -732,5 +732,8 @@ Type
|
||||||
{ 5 = chat status note }
|
{ 5 = chat status note }
|
||||||
{ 6 = chat action }
|
{ 6 = chat action }
|
||||||
{ 7 = chat topic update }
|
{ 7 = chat topic update }
|
||||||
|
{ 8 = user 2 user page }
|
||||||
|
{ 9 = user 2 user forced }
|
||||||
|
{ 10 = chat accepted }
|
||||||
Room : Byte; { Chat room number. 0 = chat broadcast }
|
Room : Byte; { Chat room number. 0 = chat broadcast }
|
||||||
End;
|
End;
|
||||||
|
|
|
@ -103,6 +103,10 @@ FUTURE / IDEAS / WORK IN PROGRESS / NOTES
|
||||||
- LastOn revamp make sure its not global and new stuff is populated
|
- LastOn revamp make sure its not global and new stuff is populated
|
||||||
- ANSI online help that can execute menu commands/restore screen
|
- ANSI online help that can execute menu commands/restore screen
|
||||||
- MPL fAppend? Why didnt I add that?
|
- MPL fAppend? Why didnt I add that?
|
||||||
|
- MCI code to save and restore user screen?
|
||||||
|
- BBS email forward to e-mail address
|
||||||
|
- Email pasword resets
|
||||||
|
- Email verification
|
||||||
|
|
||||||
RANDOM DRUNKEN BRAINDUMP AKA DESIGN DETAILS
|
RANDOM DRUNKEN BRAINDUMP AKA DESIGN DETAILS
|
||||||
===========================================
|
===========================================
|
||||||
|
|
Loading…
Reference in New Issue