X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fhighlightrulemanager.cpp;fp=src%2Fcommon%2Fhighlightrulemanager.cpp;h=f23f6aae526c39bd5f35575528b1f9e9742a19f9;hp=aca87e6bad5fb742338421e5083163814e1e0134;hb=8f1b4ca33d65b7d9b0e5be399dbff13c9591fbce;hpb=cd4f987d0d8ace10272bf1d87c788b741a9e85e8 diff --git a/src/common/highlightrulemanager.cpp b/src/common/highlightrulemanager.cpp index aca87e6b..f23f6aae 100644 --- a/src/common/highlightrulemanager.cpp +++ b/src/common/highlightrulemanager.cpp @@ -141,17 +141,10 @@ bool HighlightRuleManager::match(const QString &msgContents, if (!rule.isEnabled) 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(bufferName)) - continue; - } - else { - QRegExp rx(rule.chanName, Qt::CaseInsensitive); - if (!rx.exactMatch(bufferName)) - continue; - } + if (!rule.chanName.isEmpty() && !scopeMatch(rule.chanName, bufferName)) { + // A channel name rule is specified and does NOT match the current buffer name, skip + // this rule + continue; } QRegExp rx;