parent
3589886eab
commit
b7a87866fe
1 changed files with 9 additions and 5 deletions
|
|
@ -201,6 +201,15 @@ namespace TShockAPI
|
|||
{
|
||||
if (e.MsgID == 4)
|
||||
{
|
||||
var ban = Bans.GetBanByName(Main.player[e.Msg.whoAmI].name);
|
||||
if (ban != null)
|
||||
{
|
||||
Tools.Kick(e.Msg.whoAmI, "You are banned: " + ban.Reason);
|
||||
}
|
||||
if (Main.player[e.Msg.whoAmI].name.Length > 32)
|
||||
{
|
||||
Tools.Kick(e.Msg.whoAmI, "Name exceeded 32 characters.");
|
||||
}
|
||||
if (players[e.Msg.whoAmI] == null)
|
||||
{
|
||||
Tools.Kick(e.Msg.whoAmI, "Player doesn't exist");
|
||||
|
|
@ -612,11 +621,6 @@ namespace TShockAPI
|
|||
{
|
||||
Tools.Kick(ply, "You are banned: " + ban.Reason);
|
||||
}
|
||||
else if (Tools.FindPlayer(ply).Length > 32)
|
||||
{
|
||||
Tools.Kick(ply, "Your name was too long.");
|
||||
Tools.Broadcast(ip + " was kicked because their name exceeded 32 characters.");
|
||||
}
|
||||
if (!FileTools.OnWhitelist(ip))
|
||||
{
|
||||
Tools.Kick(ply, "Not on whitelist.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue