From 344df747d5faf4cfd3d700a8c1ebc6f6c9212146 Mon Sep 17 00:00:00 2001 From: TighMacFanatic Date: Tue, 27 Sep 2011 12:00:28 -0400 Subject: [PATCH] Fixed text highlighting so terms found in names do not trigger. --- indra/newview/llfloaterchat.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index eac5187f0..6fdd1bc19 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -604,11 +604,14 @@ LLColor4 get_text_color(const LLChat& chat) static const LLCachedControl mKeywordsChangeColor(gSavedPerAccountSettings, "KeywordsChangeColor", false); static const LLCachedControl mKeywordsColor(gSavedPerAccountSettings, "KeywordsColor", LLColor4(1.f, 1.f, 1.f, 1.f)); - if (gAgent.getID() != chat.mFromID) + if ((gAgent.getID() != chat.mFromID) && (chat.mSourceType != CHAT_SOURCE_SYSTEM)) { if (mKeywordsChangeColor) { - if (AscentKeyword::hasKeyword(chat.mText, 1)) + std::string shortmsg(chat.mText); + shortmsg.erase(0, chat.mFromName.length()); + + if (AscentKeyword::hasKeyword(shortmsg, 1)) { text_color = mKeywordsColor; }