From b548011bebd51ddf5ad70b41a80da99d1fac6db7 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sat, 15 Jul 2017 14:53:46 +1000 Subject: [PATCH] Remove auto updating, because this is not compatible with most environments. --- GUI/PropertyWindow/PropertyWindow.Designer.cs | 13 ------------- GUI/PropertyWindow/PropertyWindow.General.cs | 4 +--- MCGalaxy/Server/ServerConfig.cs | 2 -- MCGalaxy/Server/Updater.cs | 4 ++-- 4 files changed, 3 insertions(+), 20 deletions(-) diff --git a/GUI/PropertyWindow/PropertyWindow.Designer.cs b/GUI/PropertyWindow/PropertyWindow.Designer.cs index ed146c4f7..6575acfc2 100644 --- a/GUI/PropertyWindow/PropertyWindow.Designer.cs +++ b/GUI/PropertyWindow/PropertyWindow.Designer.cs @@ -242,7 +242,6 @@ namespace MCGalaxy.Gui this.updateTimeNumeric = new System.Windows.Forms.NumericUpDown(); this.lblUpdateSeconds = new System.Windows.Forms.Label(); this.notifyInGameUpdate = new System.Windows.Forms.CheckBox(); - this.autoUpdate = new System.Windows.Forms.CheckBox(); this.chkUpdates = new System.Windows.Forms.CheckBox(); this.grpPlayers = new System.Windows.Forms.GroupBox(); this.srv_lblPlayers = new System.Windows.Forms.Label(); @@ -2515,7 +2514,6 @@ namespace MCGalaxy.Gui this.srv_grpUpdate.Controls.Add(this.updateTimeNumeric); this.srv_grpUpdate.Controls.Add(this.lblUpdateSeconds); this.srv_grpUpdate.Controls.Add(this.notifyInGameUpdate); - this.srv_grpUpdate.Controls.Add(this.autoUpdate); this.srv_grpUpdate.Controls.Add(this.chkUpdates); this.srv_grpUpdate.Location = new System.Drawing.Point(220, 271); this.srv_grpUpdate.Name = "srv_grpUpdate"; @@ -2572,16 +2570,6 @@ namespace MCGalaxy.Gui this.notifyInGameUpdate.Text = "Notify In-Game"; this.notifyInGameUpdate.UseVisualStyleBackColor = true; // - // autoUpdate - // - this.autoUpdate.AutoSize = true; - this.autoUpdate.Location = new System.Drawing.Point(6, 68); - this.autoUpdate.Name = "autoUpdate"; - this.autoUpdate.Size = new System.Drawing.Size(85, 17); - this.autoUpdate.TabIndex = 6; - this.autoUpdate.Text = "Auto Update"; - this.autoUpdate.UseVisualStyleBackColor = true; - // // chkUpdates // this.chkUpdates.AutoSize = true; @@ -4643,7 +4631,6 @@ namespace MCGalaxy.Gui private System.Windows.Forms.TextBox sql_txtPort; private System.Windows.Forms.Label sql_lblPort; private System.Windows.Forms.GroupBox srv_grpUpdate; - private System.Windows.Forms.CheckBox autoUpdate; private System.Windows.Forms.NumericUpDown updateTimeNumeric; private System.Windows.Forms.Label lblUpdateSeconds; private System.Windows.Forms.CheckBox notifyInGameUpdate; diff --git a/GUI/PropertyWindow/PropertyWindow.General.cs b/GUI/PropertyWindow/PropertyWindow.General.cs index d69faccd5..18f66534e 100644 --- a/GUI/PropertyWindow/PropertyWindow.General.cs +++ b/GUI/PropertyWindow/PropertyWindow.General.cs @@ -42,7 +42,6 @@ namespace MCGalaxy.Gui { adv_chkRestart.Checked = ServerConfig.restartOnError; chkUpdates.Checked = ServerConfig.CheckForUpdates; - autoUpdate.Checked = ServerConfig.AutoUpdate; notifyInGameUpdate.Checked = ServerConfig.NotifyUpdating; updateTimeNumeric.Value = ServerConfig.UpdateRestartDelay; } @@ -66,8 +65,7 @@ namespace MCGalaxy.Gui { ServerConfig.VerifyNames = adv_chkVerify.Checked; ServerConfig.restartOnError = adv_chkRestart.Checked; - ServerConfig.CheckForUpdates = chkUpdates.Checked; - ServerConfig.AutoUpdate = autoUpdate.Checked; + ServerConfig.CheckForUpdates = chkUpdates.Checked; ServerConfig.NotifyUpdating = notifyInGameUpdate.Checked; ServerConfig.UpdateRestartDelay = (int)updateTimeNumeric.Value; //ServerConfig.reportBack = ; //No setting for this? diff --git a/MCGalaxy/Server/ServerConfig.cs b/MCGalaxy/Server/ServerConfig.cs index 46071fb19..f18bce3dd 100644 --- a/MCGalaxy/Server/ServerConfig.cs +++ b/MCGalaxy/Server/ServerConfig.cs @@ -75,8 +75,6 @@ namespace MCGalaxy { [ConfigBool("check-updates", "Update", false)] public static bool CheckForUpdates = true; - [ConfigBool("auto-update", "Update", false)] - public static bool AutoUpdate; [ConfigBool("in-game-update-notify", "Server", false)] public static bool NotifyUpdating; [ConfigInt("update-countdown", "Update", 10)] diff --git a/MCGalaxy/Server/Updater.cs b/MCGalaxy/Server/Updater.cs index ad8b140df..5b1d6f92e 100644 --- a/MCGalaxy/Server/Updater.cs +++ b/MCGalaxy/Server/Updater.cs @@ -56,7 +56,7 @@ namespace MCGalaxy { return; } - if (ServerConfig.AutoUpdate || p != null) { + if (p != null) { if (ServerConfig.NotifyUpdating || p != null) { NotifyPlayersOfUpdate(p); } else { @@ -101,7 +101,7 @@ namespace MCGalaxy { countDown.Start(); countDown.Elapsed += delegate { - if (ServerConfig.AutoUpdate || p != null) { + if (p != null) { Chat.MessageAll("Updating in &f" + timeLeft + " %Sseconds."); Logger.Log(LogType.SystemActivity, "Updating in {0} seconds.", timeLeft);