Move HasBanExpired to Bans.RemoveBanIfExpired().

The ban system needs a full rewrite anyway, but this move removes
something from Utils, puts it closer to its operating point, simplifies
the method, and clarifies what it actually does.
This commit is contained in:
Lucas Nicodemus 2017-12-29 08:32:45 -07:00
parent f06d1fd238
commit 17d151b8f8
4 changed files with 16 additions and 24 deletions

View file

@ -1310,7 +1310,7 @@ namespace TShockAPI
if (ban != null)
{
if (!Utils.HasBanExpired(ban))
if (!Bans.RemoveBanIfExpired(ban))
{
DateTime exp;
if (!DateTime.TryParse(ban.Expiration, out exp))