Bans a player forever. If they are online, they get kicked right away.
| Name | Type | Description |
|---|---|---|
name | string | Player name. |
reason | string, optional | Shown to the player on the disconnect screen. |
source | string, optional | Who issued the ban. Defaults to the plugin name. |
ban() returns nothing. unban() returns whether a ban was removed. isBanned() returns false, or true, secondsRemaining; a permanent ban returns true, 0.
command('permban', {
op = true,
usage = '/permban <name> [reason]',
description = 'Permanently ban a player'
}, function(sender, args)
if not args[1] then return false end
local reason = args[2] or 'Banned by admin'
server.ban(args[1], reason, sender.name)
sender:send(color.red .. args[1] .. ' permanently banned.')
return true
end)