]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - builtin/game/chat.lua
Send chat error when attemping to /set a secure setting (#12193)
[dragonfireclient.git] / builtin / game / chat.lua
index 493bb92c05a227d7a797e4922c676ef37c8a2ba7..78d6bef981bb6b13064ecadb0af1dfd65d1af47f 100644 (file)
@@ -621,6 +621,10 @@ core.register_chatcommand("set", {
 
                setname, setvalue = string.match(param, "([^ ]+) (.+)")
                if setname and setvalue then
+                       if setname:sub(1, 7) == "secure." then
+                               return false, S("Failed. Cannot modify secure settings. "
+                                       .. "Edit the settings file manually.")
+                       end
                        if not core.settings:get(setname) then
                                return false, S("Failed. Use '/set -n <name> <value>' "
                                        .. "to create a new setting.")