From c0ee86e12630674dd4b772cb751a40d5ce91e530 Mon Sep 17 00:00:00 2001 From: VenkSociety Date: Mon, 5 Aug 2019 16:52:08 +1000 Subject: [PATCH] Allow custom whitelist messages --- MCGalaxy/CorePlugin/ConnectingHandler.cs | 2 +- MCGalaxy/Server/ServerConfig.cs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/MCGalaxy/CorePlugin/ConnectingHandler.cs b/MCGalaxy/CorePlugin/ConnectingHandler.cs index 58cf1bfdd..a760b1b08 100644 --- a/MCGalaxy/CorePlugin/ConnectingHandler.cs +++ b/MCGalaxy/CorePlugin/ConnectingHandler.cs @@ -39,7 +39,7 @@ namespace MCGalaxy.Core { if (!CheckTempban(p)) return false; if (Server.Config.WhitelistedOnly && !Server.whiteList.Contains(p.name)) { - p.Leave(null, "This is a private server!", true); + p.Leave(null, Server.Config.DefaultWhitelistMessage, true); return false; } diff --git a/MCGalaxy/Server/ServerConfig.cs b/MCGalaxy/Server/ServerConfig.cs index 8d07bda90..372f7f735 100644 --- a/MCGalaxy/Server/ServerConfig.cs +++ b/MCGalaxy/Server/ServerConfig.cs @@ -237,6 +237,8 @@ namespace MCGalaxy { public string DefaultDemoteMessage = "&4DEMOTED! &6We're sorry for your loss. Good luck on your future endeavors! &1:'("; [ConfigString("custom-restart-message", "Messages", "Server restarted. Sign in again and rejoin.")] public string DefaultRestartMessage = "Server restarted. Sign in again and rejoin."; + [ConfigString("custom-whitelist-message", "Messages", "This is a private server!")] + public string DefaultWhitelistMessage = "This is a private server!"; static readonly bool[] defLogLevels = new bool[] { true,true,true,true,true,true, true,true,true,