X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fqtuimessageprocessor.cpp;h=aa24f08cbaafb2217a0763b3a7cce7be906706ad;hp=a80dcd29d77ce129c8e25cea4b44caed4bf52b85;hb=7a413a4808e9357e7d2c69840efe913b4c4ab0a3;hpb=de7b3d6260c8e6a38738d9dc63517944ffaa7155 diff --git a/src/qtui/qtuimessageprocessor.cpp b/src/qtui/qtuimessageprocessor.cpp index a80dcd29..aa24f08c 100644 --- a/src/qtui/qtuimessageprocessor.cpp +++ b/src/qtui/qtuimessageprocessor.cpp @@ -129,7 +129,19 @@ void QtUiMessageProcessor::checkForHighlight(Message &msg) { for(int i = 0; i < _highlightRules.count(); i++) { const HighlightRule &rule = _highlightRules.at(i); if(!rule.isEnabled) - continue; + continue; + + if(rule.chanName.size() > 0 && rule.chanName.compare(".*") != 0) { + if(rule.chanName.startsWith("!")) { + QRegExp rx(rule.chanName.mid(1), Qt::CaseInsensitive); + if(rx.exactMatch(msg.bufferInfo().bufferName())) + continue; + } else { + QRegExp rx(rule.chanName, Qt::CaseInsensitive); + if(!rx.exactMatch(msg.bufferInfo().bufferName())) + continue; + } + } QRegExp rx; if(rule.isRegExp) { @@ -160,7 +172,8 @@ void QtUiMessageProcessor::highlightListChanged(const QVariant &variant) { _highlightRules << HighlightRule(rule["Name"].toString(), rule["Enable"].toBool(), rule["CS"].toBool() ? Qt::CaseSensitive : Qt::CaseInsensitive, - rule["RegEx"].toBool()); + rule["RegEx"].toBool(), + rule["Chan"].toString()); iter++; } }