From 73259c28953657edbcc21829b2de4520180f4c7c Mon Sep 17 00:00:00 2001 From: BuckarooBanzay Date: Mon, 27 Apr 2020 10:36:16 +0200 Subject: [PATCH] don't show formspec if empty fixes https://github.com/pandorabox-io/pandorabox.io/issues/497 --- init.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index bbd6d19..0db1981 100644 --- a/init.lua +++ b/init.lua @@ -22,11 +22,12 @@ minetest.register_on_joinplayer(function (player) end) -- command to display server news at any time ---[[ minetest.register_chatcommand("news", { description = "Shows server news to the player", func = function (name) - minetest.show_formspec(name, "news", get_formspec()) + local fs = get_formspec() + if fs then + minetest.show_formspec(name, "news", fs) + end end }) -]]