more chat fixes

This commit is contained in:
proller committed 2016-06-14 01:48:17 +03:00
1 parent 99100e79b4
commit a85f3bc120
6 files changed
+12 -8

No files matched your search

+1 -1
View File
@@ -104,7 +104,7 @@ core.register_chatcommand("help", {
local function format_help_line(cmd, def)
local msg = core.colorize("#00ffff", "/"..cmd)
if def.params and def.params ~= "" then
msg = msg .. " " .. freeminer.colorize("eeeeee", def.params)
msg = msg .. " " .. core.colorize("#eeeeee", def.params)
end
if def.description and def.description ~= "" then
msg = msg .. ": " .. def.description
+3 -1
View File
@@ -169,14 +169,16 @@ function core.record_protection_violation(pos, name)
end
end
--[[
function freeminer.color(color)
assert(#color == 6, "Color must be six characters in length.")
return "\v" .. color
return "\v#" .. color
end
function freeminer.colorize(color, message)
return freeminer.color(color) .. message .. freeminer.color("ffffff")
end
]]
local raillike_ids = {}
local raillike_cur_id = 0
+1 -1
View File
@@ -538,7 +538,7 @@ minetest.register_on_dieplayer(function(player)
minetest.chat_send_all(player_name .. " burned up.")
--Death by something else
else
minetest.chat_send_all(player_name .. " \v#bb0000died.")
minetest.chat_send_all(player_name .. core.colorize("#bb0000", " died."))
end
end)
+3 -3
View File
@@ -31,8 +31,8 @@ end
if freeminer.setting_getbool("profiler_autostart") then
start_profiler()
freeminer.after(3, function()
freeminer.chat_send_all("The profiler was started. If you don't want this, set " .. freeminer.colorize("61ad6d", "profiler_autostart")
.. " to false in " .. freeminer.colorize("61ad6d", "freeminer.conf"))
freeminer.chat_send_all("The profiler was started. If you don't want this, set " .. core.colorize("#61ad6d", "profiler_autostart")
.. " to false in " .. core.colorize("#61ad6d", "freeminer.conf"))
end)
end
@@ -41,7 +41,7 @@ freeminer.register_chatcommand("profiler_stop", {
privs = {server=true},
func = function(name)
if not started then
freeminer.chat_send_player(name, "Profiler has not been started. You can start it using " .. freeminer.colorize("00ffff", "/profiler_start"))
freeminer.chat_send_player(name, "Profiler has not been started. You can start it using " .. core.colorize("#00ffff", "/profiler_start"))
return
end
+2 -1
View File
@@ -747,7 +747,8 @@ EnrichedString ChatBackend::getRecentChat()
{
const ChatLine& line = m_recent_buffer.getLine(i);
if (i != 0)
result += L"\n\v#ffffff";
result += L"\n";
//fmold: \v#ffffff
if (!line.name.empty()) {
result += L"<";
result += line.name;
+2 -1
View File
@@ -3355,7 +3355,8 @@ void Server::notifyPlayer(const char *name, const std::string &msg)
if (player->peer_id == PEER_ID_INEXISTENT)
return;
SendChatMessage(player->peer_id, std::string("\v#ffffff") + msg);
//fmold: SendChatMessage(player->peer_id, std::string("\v#ffffff") + msg);
SendChatMessage(player->peer_id, msg);
}
bool Server::showFormspec(const char *playername, const std::string &formspec,