Merge pull request #517 from VenkSociety/master

Allow custom whitelist messages
This commit is contained in:
UnknownShadow200 2019-08-05 17:45:36 +10:00 committed by GitHub
commit 04aa2cd41a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

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

View File

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