chat commands protection

This commit is contained in:
localhost_frssoft 2023-10-05 02:36:01 +03:00
parent 9bb4c873c9
commit 6f98e88d21
2 changed files with 10 additions and 1 deletions

View File

@ -26,5 +26,11 @@ else
dofile(MP.."/privs.lua")
dofile(MP.."/priv_revoke.lua")
dofile(MP.."/password_save.lua")
local protect_chatcommands = minetest.settings:get_bool("fediauth.protect_chatcommands", true)
if protect_chatcommands then
for name, definition in pairs(minetest.registered_chatcommands) do
definition.privs["interact"] = true
minetest.override_chatcommand(name, definition)
end
end
end

View File

@ -20,3 +20,6 @@ fediauth.position_lock (Lock position player) bool true
# Makes player immortal during fediauth proccess
fediauth.make_immortal_player (Make immortal player) bool true
# Protect chat commands (require interact privelege)
fediauth.protect_chatcommands (Protect chat commands) bool true