Records a temporary ban for the requested duration.
| Name | Type | Description |
|---|---|---|
name | string | Player name. |
seconds | number | Ban duration in seconds. |
reason | string, optional | Shown to the player. |
source | string, optional | Who issued the ban. Defaults to the plugin name. |
Nothing.
command('tban', { op = true }, function(sender, args)
if not args[1] or not args[2] then return false end
local duration = server.parseTime(args[2])
if not duration then return false end
server.tempban(args[1], duration, "Timeout", sender.name)
sender:send("Banned " .. args[1] .. " temporarily.")
return true
end)