mirror of
https://github.com/Refactorio/RedMew.git
synced 2024-12-14 10:13:13 +02:00
Merge pull request #96 from Valansch/temp_ban_temp_fix
Temp ban temp fix
This commit is contained in:
commit
e051c09d3e
@ -422,9 +422,13 @@ 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
|
||||
else
|
||||
game.print("This would have nearly crashed the server, please consult the next best scenario dev (valansch or TWLtriston).")
|
||||
end
|
||||
end
|
||||
return group
|
||||
end
|
||||
@ -450,6 +454,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(
|
||||
@ -462,6 +467,7 @@ local function tempban(cmd)
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
commands.add_command("kill", "Will kill you.", kill)
|
||||
commands.add_command("detrain", "<player> - Kicks the player off a train. (Admins and moderators)", detrain)
|
||||
|
Loading…
Reference in New Issue
Block a user