#include "message.h" #include "qcolor.h" #include "colorscheme.h" Message::Message(const QString &text) { } Message::Message(const IrcPrivateMessage& ircMessage, const Channel& Channel) { m_parseTime = std::chrono::system_clock::now(); auto words = new QList(); // username m_userName = ircMessage.account(); if (m_userName.isEmpty()) { auto iterator = ircMessage.tags().find("login"); if (iterator != ircMessage.tags().end()) { m_userName = iterator.value().toString(); } } // highlights #warning "xD" // color QColor usernameColor = ColorScheme::SystemMessageColor; auto iterator = ircMessage.tags().find("color"); if (iterator != ircMessage.tags().end()) { usernameColor = QColor(iterator.value().toString()); } }