From 1f44160087f00dc3a2ae7e79669fe1ff3c8ef3e3 Mon Sep 17 00:00:00 2001 From: luk3yx Date: Tue, 2 Jun 2020 22:57:43 +1200 Subject: [PATCH] Add support for new ChatMessage API. --- sscsm_init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sscsm_init.lua b/sscsm_init.lua index fddc15c..a7cdb19 100644 --- a/sscsm_init.lua +++ b/sscsm_init.lua @@ -246,6 +246,10 @@ end -- Detect messages and handle them minetest.register_on_receiving_chat_message(function(message) + if type(message) == 'table' then + message = message.message + end + local chan, msg = message:match('^\001SSCSM_COM\001([^\001]*)\001(.*)$') if not chan or not msg then return end