mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Special message when login expired.
This commit is contained in:
parent
6d9545157e
commit
3b3791e43a
|
@ -197,6 +197,8 @@ TextElement::TextElement(const QString &text, MessageElementFlags flags,
|
||||||
, color_(color)
|
, color_(color)
|
||||||
, style_(style)
|
, style_(style)
|
||||||
{
|
{
|
||||||
|
assert(text != "authentication");
|
||||||
|
|
||||||
for (const auto &word : text.split(' '))
|
for (const auto &word : text.split(' '))
|
||||||
{
|
{
|
||||||
this->words_.push_back({word, -1});
|
this->words_.push_back({word, -1});
|
||||||
|
|
|
@ -516,12 +516,21 @@ void IrcMessageHandler::handleModeMessage(Communi::IrcMessage *message)
|
||||||
std::vector<MessagePtr> IrcMessageHandler::parseNoticeMessage(
|
std::vector<MessagePtr> IrcMessageHandler::parseNoticeMessage(
|
||||||
Communi::IrcNoticeMessage *message)
|
Communi::IrcNoticeMessage *message)
|
||||||
{
|
{
|
||||||
|
if (message->content().startsWith("Login auth", Qt::CaseInsensitive))
|
||||||
|
{
|
||||||
|
return {MessageBuilder(systemMessage,
|
||||||
|
"Login expired! Try logging in again.")
|
||||||
|
.release()};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
std::vector<MessagePtr> builtMessages;
|
std::vector<MessagePtr> builtMessages;
|
||||||
|
|
||||||
builtMessages.emplace_back(makeSystemMessage(message->content()));
|
builtMessages.emplace_back(makeSystemMessage(message->content()));
|
||||||
|
|
||||||
return builtMessages;
|
return builtMessages;
|
||||||
}
|
}
|
||||||
|
} // namespace chatterino
|
||||||
|
|
||||||
void IrcMessageHandler::handleNoticeMessage(Communi::IrcNoticeMessage *message)
|
void IrcMessageHandler::handleNoticeMessage(Communi::IrcNoticeMessage *message)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue