From 505073b6938fc8be8b91807a69bd67e45ed4382f Mon Sep 17 00:00:00 2001 From: Michael VanOverbeek Date: Mon, 29 May 2017 16:41:49 +0000 Subject: Fix server-side crash when kiading revoked api keys --- ShiftOS.Server/Program.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'ShiftOS.Server/Program.cs') diff --git a/ShiftOS.Server/Program.cs b/ShiftOS.Server/Program.cs index c880321..e1dcdf2 100644 --- a/ShiftOS.Server/Program.cs +++ b/ShiftOS.Server/Program.cs @@ -98,11 +98,16 @@ namespace ShiftOS.Server { if (server.IsOnline) { - server.DispatchAll(new NetObject("heartbeat", new ServerMessage + + try { - Name = "heartbeat", - GUID = "server" - })); + server.DispatchAll(new NetObject("heartbeat", new ServerMessage + { + Name = "heartbeat", + GUID = "server" + })); + } + catch { } } }; if (!Directory.Exists("saves")) -- cgit v1.2.3 From 5e40ae4e295b17f8acd4b8c3d98dd27d84b9fa37 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 4 Jun 2017 15:53:24 -0400 Subject: Fix major server reboot. --- ShiftOS.Server/Program.cs | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'ShiftOS.Server/Program.cs') diff --git a/ShiftOS.Server/Program.cs b/ShiftOS.Server/Program.cs index e1dcdf2..fa9ebee 100644 --- a/ShiftOS.Server/Program.cs +++ b/ShiftOS.Server/Program.cs @@ -54,17 +54,6 @@ namespace ShiftOS.Server /// public class Program { - /// - /// The admin username. - /// - public static string AdminUsername = "admin"; - - /// - /// The admin password. - /// - public static string AdminPassword = "admin"; - - /// /// The server. /// -- cgit v1.2.3 From 3e11eca70481841b6e2f2253d667944779cfd5fb Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 4 Jun 2017 21:07:43 -0400 Subject: Fix story autosave --- ShiftOS.Server/Program.cs | 9 +-------- ShiftOS.WinForms/Stories/LegionStory.cs | 2 +- ShiftOS_TheReturn/Story.cs | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) (limited to 'ShiftOS.Server/Program.cs') diff --git a/ShiftOS.Server/Program.cs b/ShiftOS.Server/Program.cs index fa9ebee..5170ccd 100644 --- a/ShiftOS.Server/Program.cs +++ b/ShiftOS.Server/Program.cs @@ -155,13 +155,7 @@ namespace ShiftOS.Server Console.WriteLine("FUCK. Something HORRIBLE JUST HAPPENED."); }; - AppDomain.CurrentDomain.UnhandledException += (o, a) => - { - if(server.IsOnline == true) - server.Stop(); - System.Diagnostics.Process.Start("ShiftOS.Server.exe"); - }; - + server.OnReceived += (o, a) => { var obj = a.Data.Object; @@ -208,7 +202,6 @@ namespace ShiftOS.Server task.Wait(); */ - RandomUserGenerator.StartThread(); while (server.IsOnline) { diff --git a/ShiftOS.WinForms/Stories/LegionStory.cs b/ShiftOS.WinForms/Stories/LegionStory.cs index 8c79f0e..056fe85 100644 --- a/ShiftOS.WinForms/Stories/LegionStory.cs +++ b/ShiftOS.WinForms/Stories/LegionStory.cs @@ -368,7 +368,7 @@ namespace ShiftOS.WinForms.Stories SetProgress(i); Thread.Sleep(100); } - Story.Start("downloader"); + SaveSystem.CurrentSave.StoriesExperienced.Add("downloader"); SetProgress(0); SetStatus("Dependencies installed."); Thread.Sleep(2000); diff --git a/ShiftOS_TheReturn/Story.cs b/ShiftOS_TheReturn/Story.cs index 4d1d5cc..f473f89 100644 --- a/ShiftOS_TheReturn/Story.cs +++ b/ShiftOS_TheReturn/Story.cs @@ -154,7 +154,7 @@ namespace ShiftOS.Engine Method = mth, AutoComplete = true, }; - SaveSystem.CurrentSave.Password = Context.Id; + SaveSystem.CurrentSave.PickupPoint = Context.Id; Context.OnComplete += () => { StoryComplete?.Invoke(stid); -- cgit v1.2.3