mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-01-28 03:56:53 +02:00
fix command logging
This commit is contained in:
parent
cc0f98ee8b
commit
bbf820e103
11
control.lua
11
control.lua
@ -168,13 +168,14 @@ Event.add(
|
||||
function(event)
|
||||
local command = event.command
|
||||
if command == 'c' or command == 'command' or command == 'silent-command' or command == 'hax' then
|
||||
local player = game.players[event.player_index]
|
||||
if player then
|
||||
player = player.name
|
||||
local p_index = event.player_index
|
||||
local name
|
||||
if p_index then
|
||||
name = game.players[event.player_index].name
|
||||
else
|
||||
player = '<server>'
|
||||
name = '<server>'
|
||||
end
|
||||
local s = table.concat {'[Command] ', player, ' /', command, ' ', event.parameters}
|
||||
local s = table.concat {'[Command] ', name, ' /', command, ' ', event.parameters}
|
||||
log(s)
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user