diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/chatcommands.lua | 6 | ||||
-rw-r--r-- | builtin/misc_register.lua | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/builtin/chatcommands.lua b/builtin/chatcommands.lua index 9f55f1afc..f41f9afe4 100644 --- a/builtin/chatcommands.lua +++ b/builtin/chatcommands.lua @@ -138,6 +138,7 @@ minetest.register_chatcommand("grant", { return end minetest.set_player_privs(grantname, privs) + minetest.log(name..' granted ('..minetest.privs_to_string(grantprivs, ', ')..') privileges to '..grantname) minetest.chat_send_player(name, "Privileges of "..grantname..": "..minetest.privs_to_string(minetest.get_player_privs(grantname), ' ')) if grantname ~= name then minetest.chat_send_player(grantname, name.." granted you privileges: "..minetest.privs_to_string(grantprivs, ' ')) @@ -175,6 +176,7 @@ minetest.register_chatcommand("revoke", { end end minetest.set_player_privs(revokename, privs) + minetest.log(name..' revoked ('..minetest.privs_to_string(revokeprivs, ', ')..') privileges from '..revokename) minetest.chat_send_player(name, "Privileges of "..revokename..": "..minetest.privs_to_string(minetest.get_player_privs(revokename), ' ')) if revokename ~= name then minetest.chat_send_player(revokename, name.." revoked privileges from you: "..minetest.privs_to_string(revokeprivs, ' ')) @@ -215,8 +217,8 @@ minetest.register_chatcommand("clearpassword", { privs = {password=true}, func = function(name, param) toname = param - if not toname then - minetest.chat_send_player(toname, "Name field required") + if toname == "" then + minetest.chat_send_player(name, "Name field required") return end minetest.set_player_password(toname, '') diff --git a/builtin/misc_register.lua b/builtin/misc_register.lua index 77c594de2..f9c06a02a 100644 --- a/builtin/misc_register.lua +++ b/builtin/misc_register.lua @@ -303,6 +303,7 @@ end minetest.registered_on_chat_messages, minetest.register_on_chat_message = make_registration() minetest.registered_globalsteps, minetest.register_globalstep = make_registration() +minetest.registered_on_shutdown, minetest.register_on_shutdown = make_registration() minetest.registered_on_punchnodes, minetest.register_on_punchnode = make_registration() minetest.registered_on_placenodes, minetest.register_on_placenode = make_registration() minetest.registered_on_dignodes, minetest.register_on_dignode = make_registration() |