Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mesecons
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
mesecons
Commits
40487a65
Commit
40487a65
authored
8 years ago
by
Carter Kolwey
Committed by
Jeija
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add protection support to Luacontrollers,
protection is ignored with protection_bypass_priv
parent
75308f73
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mesecons_luacontroller/init.lua
+6
-1
6 additions, 1 deletion
mesecons_luacontroller/init.lua
with
6 additions
and
1 deletion
mesecons_luacontroller/init.lua
+
6
−
1
View file @
40487a65
...
...
@@ -508,10 +508,15 @@ local digiline = {
end
}
}
local
function
on_receive_fields
(
pos
,
form_name
,
fields
)
local
function
on_receive_fields
(
pos
,
form_name
,
fields
,
sender
)
if
not
fields
.
program
then
return
end
local
name
=
sender
:
get_player_name
()
if
minetest
.
is_protected
(
pos
,
name
)
and
not
minetest
.
check_player_privs
(
name
,
{
protection_bypass
=
true
})
then
minetest
.
record_protection_violation
(
pos
,
name
)
return
end
reset
(
pos
)
reset_meta
(
pos
,
fields
.
code
)
local
err
=
run
(
pos
,
{
type
=
"program"
})
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment