X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fqtuimessageprocessor.cpp;h=de35336a5c1a583721ff5488100e99a53d862e51;hp=84deebee27371e1cd58134f4d787fc05738976e1;hb=16f22647e6890d3eb8c3e94f7a0700e12fa29e44;hpb=b50541ba6d7c58322846cc2eb9f023a117d8c47d diff --git a/src/qtui/qtuimessageprocessor.cpp b/src/qtui/qtuimessageprocessor.cpp index 84deebee..de35336a 100644 --- a/src/qtui/qtuimessageprocessor.cpp +++ b/src/qtui/qtuimessageprocessor.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 by the Quassel Project * + * Copyright (C) 2005-2016 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -57,7 +57,8 @@ void QtUiMessageProcessor::reset() void QtUiMessageProcessor::process(Message &msg) { - checkForHighlight(msg); + if (!Client::coreFeatures().testFlag(Quassel::Feature::CoreSideHighlights)) + checkForHighlight(msg); preProcess(msg); Client::messageModel()->insertMessage(msg); } @@ -68,7 +69,8 @@ void QtUiMessageProcessor::process(QList &msgs) QList::iterator msgIter = msgs.begin(); QList::iterator msgIterEnd = msgs.end(); while (msgIter != msgIterEnd) { - checkForHighlight(*msgIter); + if (!Client::coreFeatures().testFlag(Quassel::Feature::CoreSideHighlights)) + checkForHighlight(*msgIter); preProcess(*msgIter); ++msgIter; } @@ -130,7 +132,7 @@ void QtUiMessageProcessor::checkForHighlight(Message &msg) } foreach(QString nickname, nickList) { QRegExp nickRegExp("(^|\\W)" + QRegExp::escape(nickname) + "(\\W|$)", _nicksCaseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive); - if (nickRegExp.indexIn(msg.contents()) >= 0) { + if (nickRegExp.indexIn(stripFormatCodes(msg.contents())) >= 0) { msg.setFlags(msg.flags() | Message::Highlight); return; } @@ -161,7 +163,7 @@ void QtUiMessageProcessor::checkForHighlight(Message &msg) else { rx = QRegExp("(^|\\W)" + QRegExp::escape(rule.name) + "(\\W|$)", rule.caseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive); } - bool match = (rx.indexIn(msg.contents()) >= 0); + bool match = (rx.indexIn(stripFormatCodes(msg.contents())) >= 0); if (match) { msg.setFlags(msg.flags() | Message::Highlight); return;