1
0
mirror of https://github.com/minetest-mods/irc.git synced 2024-11-05 09:40:20 +01:00
irc/messages.lua
Anand S b4fbccd64a Add support for configurable coloring of IRC messages in-game
IRC channel messages are colored green by default
IRC PMs are colored purple by default
2018-11-02 21:54:36 -07:00

18 lines
432 B
Lua

-- This file is licensed under the terms of the BSD 2-clause license.
-- See LICENSE.txt for details.
irc.msgs = irc.lib.msgs
function irc.logChat(message)
minetest.log("action", "IRC CHAT: "..message)
end
function irc.sendLocal(message)
minetest.chat_send_all(minetest.colorize(irc.config.chat_color, message))
irc.logChat(message)
end
function irc.playerMessage(name, message)
return ("<%s> %s"):format(name, message)
end