mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2024-11-22 12:21:43 +00:00
Fixed util.getTimeFromString returning unnecessary floating point
This commit is contained in:
parent
a14f5f1b32
commit
f0af3cfe03
1 changed files with 3 additions and 1 deletions
|
@ -129,7 +129,9 @@ end
|
|||
function util.getTimeFromString(str)
|
||||
local amount, unit = string.match(str, "^([0-9]+)([smhdwy])$")
|
||||
|
||||
if not (amount and unit) then return false end
|
||||
if not (amount and unit) then return nil end
|
||||
|
||||
amount = math.floor(amount)
|
||||
|
||||
local multiplier = {
|
||||
["s"] = function(a) return a end,
|
||||
|
|
Loading…
Reference in a new issue