Skip to content

Commit

Permalink
Allow grep-ing for on_grant and on_revoke (#8958)
Browse files Browse the repository at this point in the history
Just two code comments are added.
  • Loading branch information
Desour authored and SmallJoker committed Sep 29, 2019
1 parent b79741c commit 16865a5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions builtin/game/chat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ local function handle_grant_command(caller, grantname, grantprivstr)
return false, privs_unknown
end
for priv, _ in pairs(grantprivs) do
-- call the on_grant callbacks
core.run_priv_callbacks(grantname, priv, caller, "grant")
end
core.set_player_privs(grantname, privs)
Expand Down Expand Up @@ -258,6 +259,7 @@ core.register_chatcommand("revoke", {
end

for priv, _ in pairs(revoke_privs) do
-- call the on_revoke callbacks
core.run_priv_callbacks(revoke_name, priv, name, "revoke")
end

Expand Down

0 comments on commit 16865a5

Please sign in to comment.