diff options
author | cheapie <no-email-for-you@example.com> | 2017-03-27 23:46:40 -0500 |
---|---|---|
committer | cheapie <no-email-for-you@example.com> | 2017-03-27 23:46:40 -0500 |
commit | c27c4dff02a9046e030ca3477d0217dd2ebc87df (patch) | |
tree | c2e7484d9058d27acd87962676319f376e24f58b | |
parent | 9abe5998c3ea013f71d1c9c2c4cd2692029e5139 (diff) | |
download | chat6-c27c4dff02a9046e030ca3477d0217dd2ebc87df.tar chat6-c27c4dff02a9046e030ca3477d0217dd2ebc87df.tar.gz chat6-c27c4dff02a9046e030ca3477d0217dd2ebc87df.tar.bz2 chat6-c27c4dff02a9046e030ca3477d0217dd2ebc87df.tar.xz chat6-c27c4dff02a9046e030ca3477d0217dd2ebc87df.zip |
Make join/part colors configurable
-rw-r--r-- | init.lua | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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) |