diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index 2ebd5f02..05e03e96 100644 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -95,9 +95,9 @@ namespace TShockAPI Tools.SendMessage(ply, lineTwo, new float[] { 255f, 255f, 0f }); string lineThree = ""; lineThree += "InvMultiplier : " + ConfigurationManager.invasionMultiplier + ", "; - lineThree += "SpawnProtect : " + ConfigurationManager.spawnProtect + ", "; - lineThree += "SpawnProtectR : " + ConfigurationManager.spawnProtectRadius + ", "; - lineThree += "DefaultMaxSpawns : " + ConfigurationManager.defaultMaxSpawns + ", "; + lineThree += "ProtectS : " + ConfigurationManager.spawnProtect + ", "; + lineThree += "ProtectR : " + ConfigurationManager.spawnProtectRadius + ", "; + lineThree += "DMS : " + ConfigurationManager.defaultMaxSpawns + ", "; lineThree += "SpawnRate: " + ConfigurationManager.defaultSpawnRate + ", "; Tools.SendMessage(ply, lineThree, new float[] { 255f, 255f, 0f}); } diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 74a6c450..a10ab88b 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -459,6 +459,11 @@ namespace TShockAPI { if (Main.netMode != 2) { return; } string ip = Tools.GetRealIP((Convert.ToString(Netplay.serverSock[ply].tcpClient.Client.RemoteEndPoint))); + 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.CheckBanned(ip)) { Tools.Kick(ply, "You are banned."); @@ -733,7 +738,7 @@ namespace TShockAPI { for (int i = 0; i < 44; i++) { - if (Main.player[plr].inventory[i].stack > Main.player[plr].inventory[i].maxStack) + if (Main.player[plr].inventory[i].stack > 255) return true; } return false;