diff options
author | rubenwardy <rubenwardy@gmail.com> | 2017-08-29 06:57:56 +0100 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-08-29 07:57:56 +0200 |
commit | 72c09f524b1616dd75bb6e35008196b5ca6351a2 (patch) | |
tree | 1f79a46acdd79d1a1885556f0ca86fd04649e09b /builtin/game/register.lua | |
parent | 2bd1a312394a49d1005026e5ec3f930eb659d2f0 (diff) | |
download | minetest-72c09f524b1616dd75bb6e35008196b5ca6351a2.tar.gz minetest-72c09f524b1616dd75bb6e35008196b5ca6351a2.tar.bz2 minetest-72c09f524b1616dd75bb6e35008196b5ca6351a2.zip |
Fix mistake when calling on_priv_grant/revoke, and document them (#6341)
Diffstat (limited to 'builtin/game/register.lua')
-rw-r--r-- | builtin/game/register.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/game/register.lua b/builtin/game/register.lua index ad16651f8..1f355c7e5 100644 --- a/builtin/game/register.lua +++ b/builtin/game/register.lua @@ -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 |