From b101206115683cfa24c4806c1349cc05bfbefd83 Mon Sep 17 00:00:00 2001 From: luk3yx Date: Sat, 7 Apr 2018 15:37:12 +1200 Subject: [PATCH] Add channel prefix check to incoming PMs --- init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.lua b/init.lua index 05caf7d..abf41ef 100644 --- a/init.lua +++ b/init.lua @@ -148,6 +148,8 @@ minetest.register_on_receiving_chat_messages(function(msg) elseif m:match('^PM from [^\\- ]*: -[^ ]*- ') then local s, e = msg:find('-[^ ]*- ') if not s then return end + local prefix = msg:sub(s + 1, s + 1) + if prefix ~= '#' then return end local chan = msg:sub(s + 2, e - 2) local text = msg:sub(e + 1) local user = m:sub(9)