Remove valid string checks, Terraria seems to check and replace invalid chars by default
This commit is contained in:
parent
27f61645ce
commit
e879135d21
3 changed files with 9 additions and 14 deletions
|
|
@ -816,16 +816,11 @@ namespace TShockAPI
|
|||
return true;
|
||||
}
|
||||
|
||||
if (!TShock.Utils.ValidString(name))
|
||||
/*if (!TShock.Utils.ValidString(name))
|
||||
{
|
||||
TShock.Utils.ForceKick(args.Player, "Unprintable character in name");
|
||||
return true;
|
||||
}
|
||||
if (name.Length > 32)
|
||||
{
|
||||
TShock.Utils.ForceKick(args.Player, "Name exceeded 32 characters.");
|
||||
return true;
|
||||
}
|
||||
}*/
|
||||
if (name.Trim().Length == 0)
|
||||
{
|
||||
TShock.Utils.ForceKick(args.Player, "Empty Name.");
|
||||
|
|
@ -1634,10 +1629,10 @@ namespace TShockAPI
|
|||
if (textlength > 0)
|
||||
{
|
||||
deathtext = Encoding.ASCII.GetString(args.Data.ReadBytes(textlength));
|
||||
if (!TShock.Utils.ValidString(deathtext))
|
||||
/*if (!TShock.Utils.ValidString(deathtext))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
args.Player.LastDeath = DateTime.Now;
|
||||
|
|
@ -2021,10 +2016,10 @@ namespace TShockAPI
|
|||
if (textlength > 0)
|
||||
{
|
||||
deathtext = Encoding.ASCII.GetString(args.Data.ReadBytes(textlength));
|
||||
if (!TShock.Utils.ValidString(deathtext))
|
||||
/*if (!TShock.Utils.ValidString(deathtext))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
if (TShock.Players[id] == null)
|
||||
|
|
|
|||
|
|
@ -680,11 +680,11 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
|
||||
if (!Utils.ValidString(text))
|
||||
/*if (!Utils.ValidString(text))
|
||||
{
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
|
||||
if (text.StartsWith("/"))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -488,7 +488,7 @@ namespace TShockAPI
|
|||
{
|
||||
foo = foo.Replace("%map%", Main.worldName);
|
||||
foo = foo.Replace("%players%", GetPlayers());
|
||||
foo = SanitizeString(foo);
|
||||
//foo = SanitizeString(foo);
|
||||
if (foo.Substring(0, 1) == "%" && foo.Substring(12, 1) == "%") //Look for a beginning color code.
|
||||
{
|
||||
string possibleColor = foo.Substring(0, 13);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue