mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:57:35 +00:00
IRCClient: Colorize some channel messages (joins, parts, topics)
This commit is contained in:
parent
794c81626e
commit
55aa819077
11 changed files with 60 additions and 23 deletions
|
@ -17,9 +17,15 @@ IRCLogBuffer::~IRCLogBuffer()
|
|||
{
|
||||
}
|
||||
|
||||
void IRCLogBuffer::add_message(char prefix, const String& name, const String& text)
|
||||
void IRCLogBuffer::add_message(char prefix, const String& name, const String& text, Color color)
|
||||
{
|
||||
m_messages.enqueue({ time(nullptr), prefix, name, text });
|
||||
m_messages.enqueue({ time(nullptr), prefix, name, text, color });
|
||||
m_model->update();
|
||||
}
|
||||
|
||||
void IRCLogBuffer::add_message(const String& text, Color color)
|
||||
{
|
||||
m_messages.enqueue({ time(nullptr), '\0', String(), text, color });
|
||||
m_model->update();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue