diff options
-rw-r--r-- | init.lua | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -694,7 +694,11 @@ minetest.register_on_chat_message(function(name, message) -- Checking if the target is in this channel if playersChannels[target][channel_name] then if not minetest.get_player_by_name(target):get_attribute("beerchat:muted:"..name) then - minetest.chat_send_player(target, format_message(main_channel_message_string, { channel_name = channel_name, from_player = name, message = message })) + if channel_name == main_channel_name then + minetest.chat_send_player(target, format_message(main_channel_message_string, { channel_name = channel_name, from_player = name, message = message })) + else + minetest.chat_send_player(target, format_message(channel_message_string, { channel_name = channel_name, from_player = name, message = message })) + end if channel_name ~= main_channel_name and enable_sounds then minetest.sound_play(channel_message_sound, { to_player = target, gain = 1.0 } ) end |