From c27c4dff02a9046e030ca3477d0217dd2ebc87df Mon Sep 17 00:00:00 2001 From: cheapie Date: Mon, 27 Mar 2017 23:46:40 -0500 Subject: Make join/part colors configurable --- init.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 0abd7b8..47b9728 100644 --- a/init.lua +++ b/init.lua @@ -2,6 +2,8 @@ local player_name = "cheapie" local highlight_color = "#4E9A06" local send_nick_color = "#A40000" local send_message_color = "#888A85" +local join_color = "#CE5C00" +local part_color = "#C4A000" local timestamps = true local nick_colors = { @@ -72,10 +74,10 @@ minetest.register_on_receiving_chat_messages(function(message) if msgtype == "special" then minetest.display_chat_message(timestamp..text) elseif msgtype == "joined" then - local coloredmsg = minetest.colorize("#CE5C00",string.format("* %s has joined",user)) + local coloredmsg = minetest.colorize(join_color,string.format("* %s has joined",user)) minetest.display_chat_message(timestamp..coloredmsg) elseif msgtype == "left" then - local coloredmsg = minetest.colorize("#C4A000",string.format("* %s has quit %s",user,text)) + local coloredmsg = minetest.colorize(part_color,string.format("* %s has quit %s",user,text)) minetest.display_chat_message(timestamp..coloredmsg) elseif msgtype == "channel" then local colorednick = minetest.colorize(get_nick_color(user),user) -- cgit v1.2.3