X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fignorelistmanager.h;h=b5bdf227a69d711f480e488cd26d315e5197e486;hp=171f8b23522fec7ffc4e1d8cbfdb1a38709a004e;hb=9da8a8a14a39bffe74403001978a13cc8b130138;hpb=ac374ec32612798c230d54665f6bce7faf416602 diff --git a/src/common/ignorelistmanager.h b/src/common/ignorelistmanager.h index 171f8b23..b5bdf227 100644 --- a/src/common/ignorelistmanager.h +++ b/src/common/ignorelistmanager.h @@ -23,10 +23,9 @@ #include +#include "message.h" #include "syncableobject.h" -class Message; - class IgnoreListManager : public SyncableObject { SYNCABLE_OBJECT @@ -92,7 +91,7 @@ public: * \param network The networkname the message belongs to * \return UnmatchedStrictness, HardStrictness or SoftStrictness representing the match type */ - StrictnessType match(const Message &msg, const QString &network = QString()); + inline StrictnessType match(const Message &msg, const QString &network = QString()) { return _match(msg.contents(), msg.sender(), msg.type(), network, msg.bufferInfo().bufferName()); } bool ctcpMatch(const QString sender, const QString &network, const QString &type = QString()); @@ -137,8 +136,10 @@ public slots: protected: void setIgnoreList(const QList &ignoreList) { _ignoreList = ignoreList; } - // scopeRule is a ; separated list, string is a network/channel-name - bool scopeMatch(const QString &scopeRule, const QString &string) const; + bool scopeMatch(const QString &scopeRule, const QString &string) const; // scopeRule is a ';'-separated list, string is a network/channel-name + + StrictnessType _match(const QString &msgContents, const QString &msgSender, Message::Type msgType, const QString &network, const QString &bufferName); + signals: void ignoreAdded(IgnoreType type, const QString &ignoreRule, bool isRegex, StrictnessType strictness, ScopeType scope, const QVariant &scopeRule, bool isActive);