diff --git a/mods/ctf/ctf_chat/init.lua b/mods/ctf/ctf_chat/init.lua index f30082f7c3..13dc56f0a6 100644 --- a/mods/ctf/ctf_chat/init.lua +++ b/mods/ctf/ctf_chat/init.lua @@ -64,6 +64,18 @@ minetest.override_chatcommand("me", { end }) +minetest.override_chatcommand("donate", { + func = function(name, param) + local old_func = minetest.registered_chatcommands["donate"].func + if filter and not filter.check_message(name, param) then + filter.on_violation(name, param) + return false, "No swearing" + end + + return old_func(name, param) + end +}) + minetest.register_chatcommand("t", { params = "msg", description = "Send a message on the team channel", diff --git a/mods/ctf/ctf_modebase/ranking_commands.lua b/mods/ctf/ctf_modebase/ranking_commands.lua index ee628b3b54..fb1d302f41 100644 --- a/mods/ctf/ctf_modebase/ranking_commands.lua +++ b/mods/ctf/ctf_modebase/ranking_commands.lua @@ -110,7 +110,7 @@ minetest.register_chatcommand("donate", { pname, score = score, pname end - dmessage = (dmessage and dmessage ~= "") and (":" .. dmessage) or "" + dmessage = (dmessage and dmessage ~= "") and (":" .. dmessage) or " for their hard work" if not pname then return false, "You should provide the player name!"