Fix afk kick not saving changes when changed via properties gui. (Thanks goodlyay)

This commit is contained in:
UnknownShadow200 2016-08-05 19:47:08 +10:00
parent d96947991b
commit 4bc09e9b1d
3 changed files with 8 additions and 5 deletions

View File

@ -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;

View File

@ -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";
}

View File

@ -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) {