common: Put scopeMatch in util, use in highlights
authorShane Synan <digitalcircuit36939@gmail.com>
Thu, 1 Mar 2018 08:06:42 +0000 (02:06 -0600)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 6 Jun 2018 17:15:14 +0000 (19:15 +0200)
commit8f1b4ca33d65b7d9b0e5be399dbff13c9591fbce
treef828911ec79a9a0fc2d2b6739da21b8070b768fa
parentcd4f987d0d8ace10272bf1d87c788b741a9e85e8
common: Put scopeMatch in util, use in highlights

Move ignore rule scopeMatch() to util to share usage with highlight
rule scope matching.

Use scopeMatch() in highlight rule channel name processing.

Advantages:
> Simpler to manage common cases
> Shares the same rules as ignore lists, already-learned behavior
Disadvantages:
> No way to escape ';' in rules
> No longer able to use full regular expressions
> Breaks existing channel name rules (also applies to local!)

(Another approach is to keep only local highlight rules inconsistent)
src/common/highlightrulemanager.cpp
src/common/ignorelistmanager.cpp
src/common/ignorelistmanager.h
src/common/util.cpp
src/common/util.h
src/qtui/qtuimessageprocessor.cpp