diff options
| author | william341 <[email protected]> | 2017-06-18 16:43:30 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-06-18 16:43:30 -0700 |
| commit | ba80dcf3f80018cbb041b62ad8a40268427d1311 (patch) | |
| tree | f0bd18b2355d34c07c744c3cd82a4725a799eecd /ShiftOS.Server/Program.cs | |
| parent | 771c20cfb3a703e0f1550fdcf9eb07b78298c944 (diff) | |
| parent | 12acff8742f4c64976bfabee1b70dc515190fc7c (diff) | |
| download | shiftos_thereturn-ba80dcf3f80018cbb041b62ad8a40268427d1311.tar.gz shiftos_thereturn-ba80dcf3f80018cbb041b62ad8a40268427d1311.tar.bz2 shiftos_thereturn-ba80dcf3f80018cbb041b62ad8a40268427d1311.zip | |
Merge pull request #2 from shiftos-game/master
wew
Diffstat (limited to 'ShiftOS.Server/Program.cs')
| -rw-r--r-- | ShiftOS.Server/Program.cs | 33 |
1 files changed, 10 insertions, 23 deletions
diff --git a/ShiftOS.Server/Program.cs b/ShiftOS.Server/Program.cs index c880321..5170ccd 100644 --- a/ShiftOS.Server/Program.cs +++ b/ShiftOS.Server/Program.cs @@ -55,17 +55,6 @@ namespace ShiftOS.Server public class Program { /// <summary> - /// The admin username. - /// </summary> - public static string AdminUsername = "admin"; - - /// <summary> - /// The admin password. - /// </summary> - public static string AdminPassword = "admin"; - - - /// <summary> /// The server. /// </summary> public static NetObjectServer server; @@ -98,11 +87,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")) @@ -161,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; @@ -214,7 +202,6 @@ namespace ShiftOS.Server task.Wait(); */ - RandomUserGenerator.StartThread(); while (server.IsOnline) { |
