From 7d2ee8a852ca25f094ab003061d330a576a4806b Mon Sep 17 00:00:00 2001 From: Tobias Markmann <tm@ayena.de> Date: Sun, 18 Jan 2015 20:22:59 +0100 Subject: Add default hightlight rule that matches for the own nickname Test-Information: Tested on OS X 10.9.5. Change-Id: I2ed72f0147a1dacd6e146e4d3b4c2d05ea1c7a85 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; } -- cgit v0.10.2-6-g49f6