Whitelist kick message.

This commit is contained in:
Zack Piispanen 2012-04-15 14:59:10 -04:00
parent 7bfd9d244e
commit 7c7a9a90ee
2 changed files with 3 additions and 1 deletions

View file

@ -118,6 +118,8 @@ namespace TShockAPI
[Description("String that is used when kicking people when the server is full.")] public string ServerFullReason = [Description("String that is used when kicking people when the server is full.")] public string ServerFullReason =
"Server is full"; "Server is full";
[Description("String that is used when a user is kicked due to not being on the whitelist.")] public string WhitelistKickReason = "You are not on the whitelist.";
[Description("String that is used when kicking people when the server is full with no reserved slots.")] public string [Description("String that is used when kicking people when the server is full with no reserved slots.")] public string
ServerFullNoReservedReason = "Server is full. No reserved slots open."; ServerFullNoReservedReason = "Server is full. No reserved slots open.";

View file

@ -656,7 +656,7 @@ namespace TShockAPI
if (!FileTools.OnWhitelist(player.IP)) if (!FileTools.OnWhitelist(player.IP))
{ {
Utils.ForceKick(player, "Not on whitelist."); Utils.ForceKick(player, Config.WhitelistKickReason);
handler.Handled = true; handler.Handled = true;
return; return;
} }