mirror of
https://git.alee14.me/shiftos-archive/ShiftOS_TheReturn.git
synced 2025-02-02 06:17:34 +00:00
Chatlogging (client)
MUD Chat now requests last 50 lines of the chat log when the user joins.
This commit is contained in:
parent
69ef3ba644
commit
4dbe7bd2c6
1 changed files with 13 additions and 0 deletions
|
@ -65,6 +65,17 @@ namespace ShiftOS.WinForms.Applications
|
|||
}
|
||||
catch { }
|
||||
}
|
||||
else if(msg.Name == "chatlog")
|
||||
{
|
||||
try
|
||||
{
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
rtbchat.AppendText(msg.Contents);
|
||||
}));
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -87,6 +98,8 @@ namespace ShiftOS.WinForms.Applications
|
|||
|
||||
public void OnLoad()
|
||||
{
|
||||
ServerManager.SendMessage("chat_getlog", JsonConvert.SerializeObject(new ShiftOS.Objects.ChatLogRequest(id, 50)));
|
||||
|
||||
SendMessage("User has joined the chat.");
|
||||
RefreshUserInput();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue