From 7733c2cb6786e8657bcc797712a9e132efdf6d73 Mon Sep 17 00:00:00 2001 From: Toby1710 <69259430+DiamondPlane@users.noreply.github.com> Date: Wed, 21 Apr 2021 18:46:56 +0300 Subject: [PATCH] Prevent empty messages in team chat (#830) * Update init.lua * Update init.lua * Update init.lua * Update mods/ctf/ctf_chat/init.lua Co-authored-by: David Leal * Update init.lua * Update mods/ctf/ctf_chat/init.lua Co-authored-by: David Leal * Update init.lua Co-authored-by: David Leal --- mods/ctf/ctf_chat/init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mods/ctf/ctf_chat/init.lua b/mods/ctf/ctf_chat/init.lua index df69b01..bc66d5e 100644 --- a/mods/ctf/ctf_chat/init.lua +++ b/mods/ctf/ctf_chat/init.lua @@ -248,6 +248,9 @@ minetest.register_chatcommand("t", { minetest.chat_send_player(name, "The team channel is disabled.") return end + if param == "" then + return false, "-!- Empty team message, see /help t" + end local tname = ctf.player(name).team local team = ctf.team(tname)