1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-01-26 03:52:00 +02:00

Please-dont-crash-the-server-tempban-fix

This commit is contained in:
Maik Wild 2017-10-21 23:55:07 +02:00
parent 8bced79fdf
commit 8014be1735

View File

@ -422,10 +422,12 @@ local function get_group()
if not group then
game.permissions.create_group("Banned")
group = game.permissions.get_group("Banned")
if group then
for i=2,174 do
group.set_allows_action(i, false)
end
end
end
return group
end
@ -450,6 +452,7 @@ local function tempban(cmd)
end
local group = get_group()
game.print(get_actor() .. " put " .. params[1] .. " in timeout for " .. params[2] .. " minutes.")
if group then
group.add_player(params[1])
if not tonumber(cmd.parameter) then
Thread.set_timeout(
@ -461,6 +464,7 @@ local function tempban(cmd)
{name = params[1]}
)
end
end
end
commands.add_command("kill", "Will kill you.", kill)