Code cleaning
This commit is contained in:
parent
a98b0c08af
commit
612039cc26
10
init.lua
10
init.lua
|
@ -2769,12 +2769,12 @@ if rawget(_G, "awards") then
|
||||||
core.register_on_dieplayer(set_fs)
|
core.register_on_dieplayer(set_fs)
|
||||||
end
|
end
|
||||||
|
|
||||||
core.register_on_chatcommand(function(name, command, params)
|
local _privs = {"creative", "teleport", "all"}
|
||||||
if sub(command, 1, 5) == "grant" then
|
|
||||||
params = split(params, " ")
|
|
||||||
|
|
||||||
for _, v in ipairs(params) do
|
core.register_on_chatcommand(function(name, command, params)
|
||||||
if find(v, "creative") or find(v, "all") then
|
if sub(command, 1, 5) == "grant" or sub(command, 1, 6) == "revoke" then
|
||||||
|
for _, priv in ipairs(_privs) do
|
||||||
|
if sub(params, -#priv) == priv then
|
||||||
local data = pdata[name]
|
local data = pdata[name]
|
||||||
reset_data(data)
|
reset_data(data)
|
||||||
data.favs = {}
|
data.favs = {}
|
||||||
|
|
Ŝarĝante…
Reference in New Issue