From dd90cad8b5762972fa43a45ce16546ca941f1f1b Mon Sep 17 00:00:00 2001 From: mckaygerhard Date: Sun, 17 Sep 2023 21:18:28 -0400 Subject: [PATCH] small comand build in fixesd: no new line checks --- builtin/game/chatcommands.lua | 5 ++++- builtin/mainmenu/modmgr.lua | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/builtin/game/chatcommands.lua b/builtin/game/chatcommands.lua index 3bd8f2f9c..4b6ceab73 100644 --- a/builtin/game/chatcommands.lua +++ b/builtin/game/chatcommands.lua @@ -7,7 +7,10 @@ core.chatcommands = core.registered_chatcommands -- BACKWARDS COMPATIBILITY core.register_on_chat_message(function(name, message) - if message:sub(1,1) ~= "/" then + if message:find("[\r\n]") then + core.chat_send_player(name, "You cannot use newlines in chat messages.") + return true + elseif message:sub(1,1) ~= "/" then return end diff --git a/builtin/mainmenu/modmgr.lua b/builtin/mainmenu/modmgr.lua index dee048982..aa630ddcb 100644 --- a/builtin/mainmenu/modmgr.lua +++ b/builtin/mainmenu/modmgr.lua @@ -402,6 +402,8 @@ function modmgr.preparemodlist(data) if modpath ~= nil and modpath ~= "" then get_mods(modpath,global_mods) + else + get_mods("/usr/share/games/minetest/mods",global_mods) end for i=1,#global_mods,1 do