Merge branch 'general-devel' of github.com:TShock/TShock
Conflicts: TShockAPI/Properties/AssemblyInfo.cs TShockAPI/Utils.cs
This commit is contained in:
commit
1247b8760d
30 changed files with 1324 additions and 410 deletions
|
|
@ -468,6 +468,7 @@ namespace TShockAPI
|
|||
{
|
||||
foo = foo.Replace("%map%", Main.worldName);
|
||||
foo = foo.Replace("%players%", GetPlayers());
|
||||
foo = SanitizeString(foo);
|
||||
if (foo.Substring(0, 1) == "%" && foo.Substring(12, 1) == "%") //Look for a beginning color code.
|
||||
{
|
||||
string possibleColor = foo.Substring(0, 13);
|
||||
|
|
@ -508,7 +509,7 @@ namespace TShockAPI
|
|||
return TShock.Groups.groups[i];
|
||||
}
|
||||
}
|
||||
return new Group("default");
|
||||
return new Group(TShock.Config.DefaultGuestGroupName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -611,5 +612,16 @@ namespace TShockAPI
|
|||
}
|
||||
return 1000;
|
||||
}
|
||||
|
||||
public string SanitizeString(string str)
|
||||
{
|
||||
var returnstr = str.ToCharArray();
|
||||
for (int i = 0; i < str.Length; i++)
|
||||
{
|
||||
if (!ValidString(str[i].ToString()))
|
||||
returnstr[i] = ' ';
|
||||
}
|
||||
return new string(returnstr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue