summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-01-18 19:22:59 (GMT)
committerSwift Review <review@swift.im>2015-02-05 15:33:09 (GMT)
commit7d2ee8a852ca25f094ab003061d330a576a4806b (patch)
tree1d343b903297d547ff10a0b54992b9fbeed06f18 /Swift/Controllers
parentedfd69a55e4f52576ab58306da8a82b1df890d5f (diff)
downloadswift-7d2ee8a852ca25f094ab003061d330a576a4806b.zip
swift-7d2ee8a852ca25f094ab003061d330a576a4806b.tar.bz2
Add default hightlight rule that matches for the own nickname
Test-Information: Tested on OS X 10.9.5. Change-Id: I2ed72f0147a1dacd6e146e4d3b4c2d05ea1c7a85
Diffstat (limited to 'Swift/Controllers')
-rw-r--r--Swift/Controllers/HighlightManager.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/Swift/Controllers/HighlightManager.cpp b/Swift/Controllers/HighlightManager.cpp
index 383f5df..e2498dc 100644
--- a/Swift/Controllers/HighlightManager.cpp
+++ b/Swift/Controllers/HighlightManager.cpp
@@ -72,11 +72,21 @@ std::string HighlightManager::rulesToString() const
std::vector<HighlightRule> HighlightManager::getDefaultRules()
{
std::vector<HighlightRule> rules;
- HighlightRule r;
- r.setMatchChat(true);
- r.getAction().setPlaySound(true);
- r.setMatchWholeWords(true);
- rules.push_back(r);
+
+ HighlightRule chatNotificationRule;
+ chatNotificationRule.setMatchChat(true);
+ chatNotificationRule.getAction().setPlaySound(true);
+ chatNotificationRule.setMatchWholeWords(true);
+ rules.push_back(chatNotificationRule);
+
+ HighlightRule selfMentionMUCRule;
+ selfMentionMUCRule.setMatchMUC(true);
+ selfMentionMUCRule.getAction().setPlaySound(true);
+ selfMentionMUCRule.setNickIsKeyword(true);
+ selfMentionMUCRule.setMatchCase(true);
+ selfMentionMUCRule.setMatchWholeWords(true);
+ rules.push_back(selfMentionMUCRule);
+
return rules;
}