Skip to content

Commit

Permalink
Add logging for //lua and //luatransform
Browse files Browse the repository at this point in the history
  • Loading branch information
shivajiva101 authored and sfan5 committed May 21, 2017
1 parent 3240167 commit acc9188
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions worldedit_commands/init.lua
Expand Up @@ -1126,8 +1126,10 @@ minetest.register_chatcommand("/lua", {
local err = worldedit.lua(param)
if err then
worldedit.player_notify(name, "code error: " .. err)
minetest.log("action", name.." tried to execute "..param)
else
worldedit.player_notify(name, "code successfully executed", false)
minetest.log("action", name.." executed "..param)
end
end,
})
Expand All @@ -1140,8 +1142,10 @@ minetest.register_chatcommand("/luatransform", {
local err = worldedit.luatransform(worldedit.pos1[name], worldedit.pos2[name], param)
if err then
worldedit.player_notify(name, "code error: " .. err, false)
minetest.log("action", name.." tried to execute luatransform "..param)
else
worldedit.player_notify(name, "code successfully executed", false)
minetest.log("action", name.." executed luatransform "..param)
end
end),
})
Expand Down

0 comments on commit acc9188

Please sign in to comment.