small comand build in fixesd: no new line checks
This commit is contained in:
parent
d32f4b368c
commit
dd90cad8b5
@ -7,7 +7,10 @@
|
|||||||
core.chatcommands = core.registered_chatcommands -- BACKWARDS COMPATIBILITY
|
core.chatcommands = core.registered_chatcommands -- BACKWARDS COMPATIBILITY
|
||||||
|
|
||||||
core.register_on_chat_message(function(name, message)
|
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
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -402,6 +402,8 @@ function modmgr.preparemodlist(data)
|
|||||||
if modpath ~= nil and
|
if modpath ~= nil and
|
||||||
modpath ~= "" then
|
modpath ~= "" then
|
||||||
get_mods(modpath,global_mods)
|
get_mods(modpath,global_mods)
|
||||||
|
else
|
||||||
|
get_mods("/usr/share/games/minetest/mods",global_mods)
|
||||||
end
|
end
|
||||||
|
|
||||||
for i=1,#global_mods,1 do
|
for i=1,#global_mods,1 do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user