Whitelist kick message.
This commit is contained in:
parent
7bfd9d244e
commit
7c7a9a90ee
2 changed files with 3 additions and 1 deletions
|
|
@ -118,6 +118,8 @@ namespace TShockAPI
|
|||
[Description("String that is used when kicking people when the server is full.")] public string ServerFullReason =
|
||||
"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
|
||||
ServerFullNoReservedReason = "Server is full. No reserved slots open.";
|
||||
|
||||
|
|
|
|||
|
|
@ -656,7 +656,7 @@ namespace TShockAPI
|
|||
|
||||
if (!FileTools.OnWhitelist(player.IP))
|
||||
{
|
||||
Utils.ForceKick(player, "Not on whitelist.");
|
||||
Utils.ForceKick(player, Config.WhitelistKickReason);
|
||||
handler.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue