From ff6c99dd1f16c75769f3ae874ba8a95573a9b640 Mon Sep 17 00:00:00 2001 From: luk3yx Date: Mon, 16 Jul 2018 09:24:23 +1200 Subject: [PATCH] Fix bugs with the local echo channel Allow users to change to the local echo channel without it reporting it empty and add it to README.md --- README.md | 1 + init.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e2f7208..fc57269 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ The following channel prefixes exist: The following special channels exist: - `#main`: Normal chat without the CSM. + - `@`: A "local echo" channel, messages in this channel are locally displayed. - `@[off]`: Prefixes messages with `[off]`, displayed in chat as `[off]`. ## Added commands diff --git a/init.lua b/init.lua index 80f5a78..034363b 100644 --- a/init.lua +++ b/init.lua @@ -144,7 +144,7 @@ minetest.register_on_sending_chat_messages(function(msg) if cmdprefix ~= '#' or channels[msg:sub(2)] or msg == main_channel then local players = chat_channels.get_channel_users(msg) - if players then + if players and msg ~= '@' then local empty = true for p = 1, #players do if connected_players[players[p]] then