projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b79741c
)
Allow grep-ing for on_grant and on_revoke (#8958)
author
DS
<vorunbekannt75@web.de>
Sun, 29 Sep 2019 11:40:15 +0000
(13:40 +0200)
committer
SmallJoker
<SmallJoker@users.noreply.github.com>
Sun, 29 Sep 2019 11:40:15 +0000
(13:40 +0200)
Just two code comments are added.
builtin/game/chat.lua
patch
|
blob
|
history
diff --git
a/builtin/game/chat.lua
b/builtin/game/chat.lua
index f5b687732c25139252de0ea9c0a50c4eaf31f2e9..ad703b94cebf275ca0697719382c5afba7eb80fe 100644
(file)
--- a/
builtin/game/chat.lua
+++ b/
builtin/game/chat.lua
@@
-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)
@@
-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