mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Fix mistake when calling on_priv_grant/revoke, and document them (#6341)
This commit is contained in:
parent
2bd1a31239
commit
72c09f524b
2 changed files with 12 additions and 3 deletions
|
@ -437,9 +437,9 @@ end
|
|||
|
||||
function core.run_priv_callbacks(name, priv, caller, method)
|
||||
if not core.registered_privileges[priv]["on_" .. method] or
|
||||
core.registered_privileges[priv]["on_" .. method](name, caller) then
|
||||
not core.registered_privileges[priv]["on_" .. method](name, caller) then
|
||||
for _, func in ipairs(core["registered_on_priv_" .. method]) do
|
||||
if not func(name, caller) then
|
||||
if not func(name, caller, priv) then
|
||||
break
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue