diff options
author | KHobbits <rob@khobbits.co.uk> | 2012-12-20 20:11:45 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2012-12-20 20:11:45 +0000 |
commit | a5798457288cd6a5011f05ff3a1207f5c4b6b114 (patch) | |
tree | 5dc0d869d467351b5999364fa3990196f353749f /Essentials/src/com/earth2me/essentials/commands/Commandtempban.java | |
parent | 6a1fb493694617065dcc0b637c0e42ee9cfab1f4 (diff) | |
download | Essentials-a5798457288cd6a5011f05ff3a1207f5c4b6b114.tar Essentials-a5798457288cd6a5011f05ff3a1207f5c4b6b114.tar.gz Essentials-a5798457288cd6a5011f05ff3a1207f5c4b6b114.tar.lz Essentials-a5798457288cd6a5011f05ff3a1207f5c4b6b114.tar.xz Essentials-a5798457288cd6a5011f05ff3a1207f5c4b6b114.zip |
Fix max tempban length option.
Diffstat (limited to 'Essentials/src/com/earth2me/essentials/commands/Commandtempban.java')
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandtempban.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java b/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java index 4ac2db89c..97aa2ea3b 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java @@ -46,8 +46,8 @@ public class Commandtempban extends EssentialsCommand final String time = getFinalArg(args, 1); final long banTimestamp = Util.parseDateDiff(time, true); - final long max = ess.getSettings().getMaxTempban(); - if(max != 0 && banTimestamp - GregorianCalendar.getInstance().getTimeInMillis() > max * 1000 && ess.getUser(sender).isAuthorized("essentials.tempban.unlimited")) + final long maxBanLength = ess.getSettings().getMaxTempban() * 1000; + if(maxBanLength > 0 && ((banTimestamp - GregorianCalendar.getInstance().getTimeInMillis()) > maxBanLength) && ess.getUser(sender).isAuthorized("essentials.tempban.unlimited")) { sender.sendMessage(_("oversizedTempban")); throw new NoChargeException(); |