From 72c09f524b1616dd75bb6e35008196b5ca6351a2 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Tue, 29 Aug 2017 06:57:56 +0100 Subject: Fix mistake when calling on_priv_grant/revoke, and document them (#6341) --- builtin/game/register.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'builtin') 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 -- cgit v1.2.3