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:
parent
f06d1fd238
commit
17d151b8f8
4 changed files with 16 additions and 24 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue