- Documentation
- Server functions
- getUnbanTime
Function
getUnbanTime
Returns when the ban expires, in seconds since 1970. A permanent ban returns false.
Syntax
int getUnbanTime(ban ban)Arguments
banban- The ban handle.
Returns
The expiry time, or false for a permanent ban.
Example
for _, ban in ipairs(getBans()) do
local untilTime = getUnbanTime(ban)
if untilTime then
local left = untilTime - getRealTime().timestamp
print(tostring(getBanNick(ban)) .. ": zostało " .. math.ceil(left / 3600) .. " h")
else
print(tostring(getBanNick(ban)) .. ": na zawsze")
end
end