mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-03-19 21:10:19 +02:00
Update jail.lua
Fixed so plebs who aren't admin does not trigger an embed message.
This commit is contained in:
parent
cfd737dace
commit
83e74b654e
@ -135,20 +135,21 @@ local function on_console_command(event)
|
||||
local player = game.players[event.player_index]
|
||||
local reason = event.parameters
|
||||
if not reason then return end
|
||||
if not player.admin then return end
|
||||
if cmd == 'ban' then
|
||||
if player then
|
||||
Server.to_banned_embed(table.concat{'[BANNED] ' .. player.name .. ' banned ' .. reason})
|
||||
Server.to_banned_embed(table.concat{player.name .. ' banned ' .. reason})
|
||||
return
|
||||
else
|
||||
Server.to_banned_embed(table.concat{'[BANNED] Server banned ' .. reason})
|
||||
Server.to_banned_embed(table.concat{'Server banned ' .. reason})
|
||||
return
|
||||
end
|
||||
elseif cmd == 'unban' then
|
||||
if player then
|
||||
Server.to_banned_embed(table.concat{'[UNBANNED] ' .. player.name .. ' unbanned ' .. reason})
|
||||
Server.to_banned_embed(table.concat{player.name .. ' unbanned ' .. reason})
|
||||
return
|
||||
else
|
||||
Server.to_banned_embed(table.concat{'[UNBANNED] Server unbanned ' .. reason})
|
||||
Server.to_banned_embed(table.concat{'Server unbanned ' .. reason})
|
||||
return
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user