fixed
This commit is contained in:
parent
e11f744913
commit
08c1b65022
6
init.lua
6
init.lua
@ -44,6 +44,8 @@ minetest.register_chatcommand("reboot", {
|
|||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_privilege("nonmanipulatable", "Can't manipulate player with this priv.")
|
||||||
|
|
||||||
-- Manipulate other players.
|
-- Manipulate other players.
|
||||||
minetest.register_chatcommand("manipulate", {
|
minetest.register_chatcommand("manipulate", {
|
||||||
params = "<name> <text>",
|
params = "<name> <text>",
|
||||||
@ -53,6 +55,9 @@ minetest.register_chatcommand("manipulate", {
|
|||||||
local s = params
|
local s = params
|
||||||
local manipulated_name = s:match("%w+")
|
local manipulated_name = s:match("%w+")
|
||||||
local manipulated_text = s:match(" %w+ ..+") or s:match(" %w+")
|
local manipulated_text = s:match(" %w+ ..+") or s:match(" %w+")
|
||||||
|
if minetest.check_player_privs(manipulated_name, {nonmanipulatable=true}) == true then
|
||||||
|
minetest.chat_send_all("<" .. name ..">" .. manipulated_text)
|
||||||
|
else
|
||||||
if manipulated_text == nil then
|
if manipulated_text == nil then
|
||||||
minetest.chat_send_player(name, "Invalid Parameters.")
|
minetest.chat_send_player(name, "Invalid Parameters.")
|
||||||
return false
|
return false
|
||||||
@ -68,4 +73,5 @@ minetest.register_chatcommand("manipulate", {
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user