summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2017-03-27 23:46:40 -0500
committercheapie <no-email-for-you@example.com>2017-03-27 23:46:40 -0500
commitc27c4dff02a9046e030ca3477d0217dd2ebc87df (patch)
treec2e7484d9058d27acd87962676319f376e24f58b
parent9abe5998c3ea013f71d1c9c2c4cd2692029e5139 (diff)
downloadchat6-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.lua6
1 files 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)