From c92dc2c5bac04c7530259d519c5851a95f64e66b Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Thu, 27 Jun 2019 19:31:40 +1000 Subject: [PATCH] Make default server visibility private and fix disconnected players still showing in tab list for TNT wars --- MCGalaxy/Games/TntWars/TWGame.cs | 3 ++- MCGalaxy/Server/ServerConfig.cs | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/MCGalaxy/Games/TntWars/TWGame.cs b/MCGalaxy/Games/TntWars/TWGame.cs index 2519a764d..e748db7cd 100644 --- a/MCGalaxy/Games/TntWars/TWGame.cs +++ b/MCGalaxy/Games/TntWars/TWGame.cs @@ -177,7 +177,8 @@ namespace MCGalaxy.Games { void RestoreColor(Player p) { TWData data = TryGet(p); - if (data == null) return; + // TODO: p.Socket.Disconnected check should be elsewhere + if (data == null || p.Socket.Disconnected) return; p.color = data.OrigCol; p.SetPrefix(); diff --git a/MCGalaxy/Server/ServerConfig.cs b/MCGalaxy/Server/ServerConfig.cs index 998bcc62c..8d07bda90 100644 --- a/MCGalaxy/Server/ServerConfig.cs +++ b/MCGalaxy/Server/ServerConfig.cs @@ -37,8 +37,8 @@ namespace MCGalaxy { public string ListenIP = "0.0.0.0"; [ConfigInt("port", "Server", 25565, 0, 65535)] public int Port = 25565; - [ConfigBool("public", "Server", true)] - public bool Public = true; + [ConfigBool("public", "Server", false)] + public bool Public = false; [ConfigBool("verify-names", "Server", true)] public bool VerifyNames = true; [ConfigBool("support-web-client", "Server", true)]