config.lua 916 B

1234567891011121314151617181920212223242526272829
  1. ------------------------------------------------------------------------------
  2. -- This file is registered as reloadable.
  3. ------------------------------------------------------------------------------
  4. -- This file obtains options for the mod.
  5. reload = reload or {}
  6. reload.impl = reload.impl or {}
  7. reload.impl.setting_get = function(setting)
  8. local str = minetest.setting_get(setting)
  9. if str and string.len(str) >= 2 then
  10. -- Strip quotes.
  11. str = string.gsub(str, "^\"", "")
  12. str = string.gsub(str, "\"$", "")
  13. end
  14. return str
  15. end
  16. -- Prefix for chat messages.
  17. reload.chat_prefix = reload.impl.setting_get("reload_chat_prefix") or "[Reload] "
  18. -- Path to the root directory when executing arbitrary Lua files.
  19. -- Executing files outside this directory (via the chatcommands) is forbidden.
  20. -- Be sure to change this to suit your needs.
  21. reload.root_path = reload.impl.setting_get("reload_root_path") or "/home"