/***************************************************************************
- * Copyright (C) 2005-2016 by the Quassel Project *
+ * Copyright (C) 2005-2018 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
void QtUiMessageProcessor::process(Message &msg)
{
- if (!Client::isCoreFeatureEnabled(Quassel::Feature::CoreSideHighlights))
- checkForHighlight(msg);
+ checkForHighlight(msg);
preProcess(msg);
Client::messageModel()->insertMessage(msg);
}
QList<Message>::iterator msgIter = msgs.begin();
QList<Message>::iterator msgIterEnd = msgs.end();
while (msgIter != msgIterEnd) {
- if (!Client::isCoreFeatureEnabled(Quassel::Feature::CoreSideHighlights))
- checkForHighlight(*msgIter);
+ checkForHighlight(*msgIter);
preProcess(*msgIter);
++msgIter;
}
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(msg.bufferInfo().bufferName()))
- continue;
- }
- else {
- QRegExp rx(rule.chanName, Qt::CaseInsensitive);
- if (!rx.exactMatch(msg.bufferInfo().bufferName()))
- continue;
- }
+ if (!rule.chanName.isEmpty()
+ && !scopeMatch(msg.bufferInfo().bufferName(), rule.chanName,
+ rule.isRegExp, rule.caseSensitive)) {
+ // A channel name rule is specified and does NOT match the current buffer name, skip
+ // this rule
+ continue;
}
QRegExp rx;