Fixed hair exploit

This commit is contained in:
high 2011-06-13 11:28:50 -04:00
parent dbc0ae7aac
commit e802ce4c2f

View file

@ -261,6 +261,13 @@ namespace TShockAPI
Tools.ForceKick(e.Msg.whoAmI, string.Format("You are banned: {0}", ban.Reason));
return true;
}
byte hair = e.Msg.readBuffer[e.Index + 1];
if (hair > 0x10)
{
Tools.ForceKick(e.Msg.whoAmI, "Hair crash exploit.");
return true;
}
string name = Encoding.ASCII.GetString(e.Msg.readBuffer, e.Index + 23, (e.Length - (e.Index + 23)) + e.Index - 1);
if (name.Length > 32)
{