diff options
| author | Michael <[email protected]> | 2017-02-27 16:31:55 -0500 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-02-27 16:31:55 -0500 |
| commit | 4dbe7bd2c66394128fd9336cccf9438492fd461b (patch) | |
| tree | d9183726de776b5ca2026c632c37448132d85375 /ShiftOS.WinForms/Applications | |
| parent | 69ef3ba644cf3e15dbee32994a6f640294bc54b0 (diff) | |
| download | shiftos_thereturn-4dbe7bd2c66394128fd9336cccf9438492fd461b.tar.gz shiftos_thereturn-4dbe7bd2c66394128fd9336cccf9438492fd461b.tar.bz2 shiftos_thereturn-4dbe7bd2c66394128fd9336cccf9438492fd461b.zip | |
Chatlogging (client)
MUD Chat now requests last 50 lines of the chat log when the user joins.
Diffstat (limited to 'ShiftOS.WinForms/Applications')
| -rw-r--r-- | ShiftOS.WinForms/Applications/Chat.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ShiftOS.WinForms/Applications/Chat.cs b/ShiftOS.WinForms/Applications/Chat.cs index 6c7528c..7f3fc04 100644 --- a/ShiftOS.WinForms/Applications/Chat.cs +++ b/ShiftOS.WinForms/Applications/Chat.cs @@ -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(); } |
