aboutsummaryrefslogtreecommitdiff
path: root/source/WindowsFormsApplication1/Program.cs
diff options
context:
space:
mode:
authorMichaelTheShifter <[email protected]>2016-05-01 20:23:48 -0400
committerMichaelTheShifter <[email protected]>2016-05-01 20:23:48 -0400
commit0085241d2366f266b5416488dbead174184420b0 (patch)
treebb496c70c8235998ac343e8a63ced5a96d318a03 /source/WindowsFormsApplication1/Program.cs
parentca5438be3956ee012a1bbcdab59512029a47fff2 (diff)
downloadshiftos-c--0085241d2366f266b5416488dbead174184420b0.tar.gz
shiftos-c--0085241d2366f266b5416488dbead174184420b0.tar.bz2
shiftos-c--0085241d2366f266b5416488dbead174184420b0.zip
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
Diffstat (limited to 'source/WindowsFormsApplication1/Program.cs')
-rw-r--r--source/WindowsFormsApplication1/Program.cs26
1 files changed, 21 insertions, 5 deletions
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();