From 4bc09e9b1dfe97fcf08ff3d59fdae1c0d9a758e1 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Fri, 5 Aug 2016 19:47:08 +1000 Subject: [PATCH] Fix afk kick not saving changes when changed via properties gui. (Thanks goodlyay) --- GUI/PropertyWindow.cs | 10 ++++++---- Player/Group/Group.cs | 2 +- Player/Player.Timers.cs | 1 + 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/GUI/PropertyWindow.cs b/GUI/PropertyWindow.cs index 9e1ca0a05..7968d8ec5 100644 --- a/GUI/PropertyWindow.cs +++ b/GUI/PropertyWindow.cs @@ -604,10 +604,12 @@ namespace MCGalaxy.Gui { Server.dollarNames = chk17Dollar.Checked; //Server.useWhitelist = ; //We don't have a setting for this? Server.moneys = txtMoneys.Text; - Server.osPerbuildDefault = Group.GroupList.Find(grp => grp.name == cmbOsMap.SelectedItem.ToString()).Permission; - - Server.opchatperm = Group.GroupList.Find(grp => grp.name == cmbOpChat.SelectedItem.ToString()).Permission; - Server.adminchatperm = Group.GroupList.Find(grp => grp.name == cmbAdminChat.SelectedItem.ToString()).Permission; + + Server.osPerbuildDefault = Group.Find(cmbOsMap.SelectedItem.ToString()).Permission; + Server.opchatperm = Group.Find(cmbOpChat.SelectedItem.ToString()).Permission; + Server.adminchatperm = Group.Find(cmbAdminChat.SelectedItem.ToString()).Permission; + Server.afkkickperm = Group.Find(cmbAFKKickPerm.SelectedItem.ToString()).Permission; + Server.logbeat = chkLogBeat.Checked; Server.forceCuboid = chkForceCuboid.Checked; Server.profanityFilter = chkProfanityFilter.Checked; diff --git a/Player/Group/Group.cs b/Player/Group/Group.cs index ebc450b7b..6f3267d16 100644 --- a/Player/Group/Group.cs +++ b/Player/Group/Group.cs @@ -186,7 +186,7 @@ namespace MCGalaxy { static void MapName(ref string name) { if (name == "adv") name = "advbuilder"; if (name == "op") name = "operator"; - if (name == "super" || (name == "admin" && !Group.Exists("admin"))) name = "superop"; + if (name == "super" || (name == "admin" && !Exists("admin"))) name = "superop"; if (name == "noone") name = "nobody"; } diff --git a/Player/Player.Timers.cs b/Player/Player.Timers.cs index 84a7ccf4d..be68f1fe5 100644 --- a/Player/Player.Timers.cs +++ b/Player/Player.Timers.cs @@ -95,6 +95,7 @@ namespace MCGalaxy { void CheckTimerElapsed(object sender, ElapsedEventArgs e) { if (name == "") return; SendRaw(Opcode.Ping); + Server.s.Log("CALLBACK"); if (Server.afkminutes <= 0) return; if (IsAfk) {