From b0d9407f52a1d20fb6b5d7bad70755b0862fdd6b Mon Sep 17 00:00:00 2001 From: White Date: Tue, 21 Feb 2017 21:43:19 +1030 Subject: [PATCH] Fixed tabbing in Utils.HasBanExpired --- TShockAPI/Utils.cs | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/TShockAPI/Utils.cs b/TShockAPI/Utils.cs index e2b791d9..381ea202 100644 --- a/TShockAPI/Utils.cs +++ b/TShockAPI/Utils.cs @@ -672,25 +672,24 @@ namespace TShockAPI /// bool - True if the ban has expired. public bool HasBanExpired(Ban ban, bool byName = false) { - DateTime exp; - bool expirationExists = DateTime.TryParse(ban.Expiration, out exp); + DateTime exp; + bool expirationExists = DateTime.TryParse(ban.Expiration, out exp); - if (!string.IsNullOrWhiteSpace(ban.Expiration) && (expirationExists) && - (DateTime.UtcNow >= exp)) - { - if (byName) - { - TShock.Bans.RemoveBan(ban.Name, true, true, false); - } - else - { - TShock.Bans.RemoveBan(ban.IP, false, false, false); - } + if (!string.IsNullOrWhiteSpace(ban.Expiration) && (expirationExists) && (DateTime.UtcNow >= exp)) + { + if (byName) + { + TShock.Bans.RemoveBan(ban.Name, true, true, false); + } + else + { + TShock.Bans.RemoveBan(ban.IP, false, false, false); + } - return true; - } + return true; + } - return false; + return false; } ///