MAJOR CHANGE: Torch can install and update its own DS installation! Full changelog: https://pastebin.com/ybqDM4HP

This commit is contained in:
John Gross
2017-06-16 22:56:41 -07:00
parent 3760c4a9ea
commit 2723973673
37 changed files with 915 additions and 314 deletions

View File

@@ -64,8 +64,25 @@ namespace Torch.Server
{
//Can't use Message.Text directly because of object ownership in WPF.
var text = Message.Text;
_server.Multiplayer.SendMessage(text);
var commands = ((TorchBase)_server).Commands;
string response = null;
if (commands.IsCommand(text))
{
_server.Multiplayer.ChatHistory.Add(new ChatMessage(DateTime.Now, 0, "Server", text));
_server.InvokeBlocking(() =>
{
response = commands.HandleCommandFromServer(text);
});
}
else
{
_server.Multiplayer.SendMessage(text);
}
if (!string.IsNullOrEmpty(response))
_server.Multiplayer.ChatHistory.Add(new ChatMessage(DateTime.Now, 0, "Server", response));
Message.Text = "";
var sto = false;
Refresh(null, ref sto);
}
}
}