Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
basic_robot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
basic_robot
Commits
86c1317f
Commit
86c1317f
authored
6 years ago
by
rnd
Browse files
Options
Downloads
Patches
Plain Diff
non admin players can not modify other player robot ( if auth level more than 1)
parent
5250d6f2
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
init.lua
+1
-2
1 addition, 2 deletions
init.lua
with
1 addition
and
2 deletions
init.lua
+
1
−
2
View file @
86c1317f
...
...
@@ -1295,7 +1295,6 @@ local on_receive_robot_form = function(pos, formname, fields, sender)
if
minetest
.
is_protected
(
pos
,
name
)
then
return
end
if
fields
.
OK
then
local
meta
=
minetest
.
get_meta
(
pos
);
if
fields
.
code
then
...
...
@@ -1304,7 +1303,7 @@ local on_receive_robot_form = function(pos, formname, fields, sender)
minetest
.
chat_send_all
(
"#ROBOT: "
..
name
..
" is spamming with long text."
)
return
end
if
meta
:
get_int
(
"a
dmin"
)
==
1
then
if
meta
:
get_int
(
"a
uthlevel"
)
>
1
and
name
~=
meta
:
get_string
(
"owner"
)
then
local
privs
=
minetest
.
get_player_privs
(
name
);
-- only admin can edit admin robot code
if
not
privs
.
privs
then
return
...
...
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