From 960ee9260783a17465c3e13ac7fb360335191779 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Thu, 5 Oct 2017 23:10:52 +0100 Subject: [PATCH] Update chatplus --- mods/chatplus/api.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mods/chatplus/api.lua b/mods/chatplus/api.lua index 406e023..7196f23 100644 --- a/mods/chatplus/api.lua +++ b/mods/chatplus/api.lua @@ -189,7 +189,7 @@ function chatplus.send(from, msg) if msg:sub(1, 1) == "/" then return false end - + if not minetest.check_player_privs(from, {shout = true}) then return nil end @@ -219,6 +219,8 @@ function chatplus.send(from, msg) if res == nil or res == true then minetest.chat_send_player(to, "<" .. from .. "> " .. msg) end + elseif minetest.features.no_chat_message_prediction then + minetest.chat_send_player(from, "<" .. from .. "> " .. msg) end end return true @@ -228,6 +230,9 @@ end -- Minetest callbacks minetest.register_on_chat_message(function(...) local ret = chatplus.send(...) + if ret and minetest.global_exists("irc") and irc.on_chatmessage then + irc.on_chatmessage(...) + end return ret end) minetest.register_on_joinplayer(function(player)