diff options
| author | Michael VanOverbeek <[email protected]> | 2017-04-07 16:57:05 +0000 |
|---|---|---|
| committer | Michael VanOverbeek <[email protected]> | 2017-04-07 16:57:05 +0000 |
| commit | 9aa1becb306f5acf139bf0dc864304ebff8ffabf (patch) | |
| tree | 2409cb15f3b7181895d5b16183af758d22735ca0 /ShiftOS.Server | |
| parent | b9c46d801c428b76777d0159f50a4e2bcba60ee4 (diff) | |
| download | shiftos_thereturn-9aa1becb306f5acf139bf0dc864304ebff8ffabf.tar.gz shiftos_thereturn-9aa1becb306f5acf139bf0dc864304ebff8ffabf.tar.bz2 shiftos_thereturn-9aa1becb306f5acf139bf0dc864304ebff8ffabf.zip | |
MUD updates long-over-due.
Diffstat (limited to 'ShiftOS.Server')
| -rw-r--r-- | ShiftOS.Server/Core.cs | 7 | ||||
| -rw-r--r-- | ShiftOS.Server/Program.cs | 14 |
2 files changed, 19 insertions, 2 deletions
diff --git a/ShiftOS.Server/Core.cs b/ShiftOS.Server/Core.cs index e14ca27..7fe600f 100644 --- a/ShiftOS.Server/Core.cs +++ b/ShiftOS.Server/Core.cs @@ -127,6 +127,13 @@ namespace ShiftOS.Server } + [MudRequest("delete_dead_save", typeof(Save))] + public static void DeleteSave(string guid, Save save) + { + if (File.Exists("deadsaves/" + save.Username + ".save")) + File.Delete("deadsaves/" + save.Username + ".save"); + } + [MudRequest("diag_log", typeof(string))] public static void Diagnostic(string guid, string line) { diff --git a/ShiftOS.Server/Program.cs b/ShiftOS.Server/Program.cs index 9093c35..3f64054 100644 --- a/ShiftOS.Server/Program.cs +++ b/ShiftOS.Server/Program.cs @@ -121,8 +121,15 @@ namespace ShiftOS.Server server.OnClientAccepted += (o, a) => { Console.WriteLine("Client connected."); - server.DispatchTo(a.Guid, new NetObject("welcome", new ServerMessage { Name = "Welcome", Contents = a.Guid.ToString(), GUID = "Server" })); - }; + try + { + server.DispatchTo(a.Guid, new NetObject("welcome", new ServerMessage { Name = "Welcome", Contents = a.Guid.ToString(), GUID = "Server" })); + } + catch + { + Console.WriteLine("Oh, you don't have time to finish the handshake? Fine. Get off."); + } + }; server.OnClientDisconnected += (o, a) => { @@ -185,8 +192,11 @@ namespace ShiftOS.Server Console.WriteLine("Server stopping."); }; + + /* var task = ChatBackend.StartDiscordBots(); task.Wait(); + */ RandomUserGenerator.StartThread(); |
