From 0085241d2366f266b5416488dbead174184420b0 Mon Sep 17 00:00:00 2001 From: MichaelTheShifter Date: Sun, 1 May 2016 20:23:48 -0400 Subject: Beta 2.2 Patch 1 Commit for Beta 2.2 Patch 1 - Removed unused "Linux Mint 7" and "NetSockets" files from Resources.resx - Added a better server startup pool, no longer hardcoded. - Added a server blacklist for disabling servers that break the rules of the playshiftos.ml/forum server showcase --- source/WindowsFormsApplication1/Program.cs | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'source/WindowsFormsApplication1/Program.cs') diff --git a/source/WindowsFormsApplication1/Program.cs b/source/WindowsFormsApplication1/Program.cs index 7f086cb..e7fb173 100644 --- a/source/WindowsFormsApplication1/Program.cs +++ b/source/WindowsFormsApplication1/Program.cs @@ -7,6 +7,7 @@ using System.Windows.Forms; using System.Net; using System.IO.Compression; using System.ComponentModel; +using System.Threading; namespace ShiftOS { @@ -22,7 +23,26 @@ namespace ShiftOS Application.SetCompatibleTextRenderingDefault(false); //Extract all dependencies before starting the engine. ExtractDependencies(); - Package_Grabber.ConnectToServer("shiftos.cloudapp.net", 4433); + var poolThread = new Thread(new ThreadStart(new Action(() => { + //Download ShiftOS server startup-pool + string pool = new WebClient().DownloadString("http://playshiftos.ml/server/startup_pool"); + string[] splitter = pool.Split(';'); + foreach(string address in splitter) + { + try + { + string[] addSplitter = address.Split(':'); + string host = addSplitter[0]; + int port = Convert.ToInt32(addSplitter[1]); + Package_Grabber.ConnectToServer(host, port); + } + catch + { + + } + } + }))); + poolThread.Start(); //Start the Windows Forms backend Paths.RegisterPaths(); //Sets ShiftOS path variables based on the current OS. SaveSystem.Utilities.CheckForOlderSaves(); //Backs up C:\ShiftOS on Windows systems if it exists and doesn't contain a _engineInfo.txt file telling ShiftOS what engine created it. @@ -87,10 +107,6 @@ namespace ShiftOS { //Wow. This'll make it easy for people... string path = Directory.GetParent(Application.ExecutablePath).FullName; - if(!File.Exists(path + OSInfo.DirectorySeparator + "NetSockets.dll")) - { - File.WriteAllBytes(path + OSInfo.DirectorySeparator + "NetSockets.dll", Properties.Resources.NetSockets); - } string temppath = path + OSInfo.DirectorySeparator + "temp"; string zippath = path + OSInfo.DirectorySeparator + "depend.zip"; var wc = new WebClient(); -- cgit v1.2.3