Merge pull request #1624 from Pryaxis/fix-time
Allow time parser to take spaces
This commit is contained in:
commit
1995161b5e
2 changed files with 2 additions and 1 deletions
|
|
@ -84,6 +84,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
|
||||||
* Fixed erroneous kicks and bans when using `KickOnMediumcoreDeath` and `BanOnMediumcoreDeath` options. (@DankRank)
|
* Fixed erroneous kicks and bans when using `KickOnMediumcoreDeath` and `BanOnMediumcoreDeath` options. (@DankRank)
|
||||||
* Removed `TSPlayer.InitSpawn` field. (@DankRank)
|
* Removed `TSPlayer.InitSpawn` field. (@DankRank)
|
||||||
* `OnPlayerSpawn`'s player ID field is now `PlayerId`. (@DankRank)
|
* `OnPlayerSpawn`'s player ID field is now `PlayerId`. (@DankRank)
|
||||||
|
* `Utils.TryParseTime` can now take spaces (e.g., `3d 5h 2m 3s`) (@QuiCM)
|
||||||
* Enabled banning unregistered users (@QuiCM)
|
* Enabled banning unregistered users (@QuiCM)
|
||||||
* Added filtering and validation on packet 96 (Teleport player through portal) (@QuiCM)
|
* Added filtering and validation on packet 96 (Teleport player through portal) (@QuiCM)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -534,7 +534,7 @@ namespace TShockAPI
|
||||||
var sb = new StringBuilder(3);
|
var sb = new StringBuilder(3);
|
||||||
for (int i = 0; i < str.Length; i++)
|
for (int i = 0; i < str.Length; i++)
|
||||||
{
|
{
|
||||||
if (Char.IsDigit(str[i]) || (str[i] == '-' || str[i] == '+'))
|
if (Char.IsDigit(str[i]) || (str[i] == '-' || str[i] == '+' || str[i] == ' '))
|
||||||
sb.Append(str[i]);
|
sb.Append(str[i]);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue