summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorYchebotarev ProductEngine <ychebotarev@productengine.com>2010-01-13 19:37:27 +0200
committerYchebotarev ProductEngine <ychebotarev@productengine.com>2010-01-13 19:37:27 +0200
commit3398ed6f890def2ab9fa31536d13a38f85847d93 (patch)
tree696f818e0dd9336445b2c8746eff00e411235a7d /indra/newview
parent70de93ce10528595012a43aa9c68633069e5406e (diff)
parent37f55393e42b21f26b34aa21e139d0649076b646 (diff)
merge
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llchathistory.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 4f2dbe9fb1..9a1572364f 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -503,11 +503,20 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_
//whether to show colon after a name in header copy/past and in plain text mode
bool show_colon = chat.mChatType != CHAT_TYPE_SHOUT && chat.mChatType != CHAT_TYPE_WHISPER;
+ //IRC styled /me messages.
+ bool irc_me = false;
+
+ std::string prefix = chat.mText.substr(0, 4);
+ if (prefix == "/me " || prefix == "/me'")
+ {
+ irc_me = true;
+ }
+
if (use_plain_text_chat_history)
{
mEditor->appendText("[" + chat.mTimeStr + "] ", mEditor->getText().size() != 0, style_params);
- if (utf8str_trim(chat.mFromName).size() != 0)
+ if (utf8str_trim(chat.mFromName).size() != 0 && !irc_me)
{
// Don't hotlink any messages from the system (e.g. "Second Life:"), so just add those in plain text.
if ( chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() )
@@ -572,14 +581,13 @@ void LLChatHistory::appendMessage(const LLChat& chat, const bool use_plain_text_
mLastFromID = chat.mFromID;
mLastMessageTime = new_message_time;
}
- //Handle IRC styled /me messages.
- std::string prefix = chat.mText.substr(0, 4);
- if (prefix == "/me " || prefix == "/me'")
+
+ if (irc_me)
{
style_params.font.style = "ITALIC";
if (chat.mFromName.size() > 0)
- mEditor->appendText(chat.mFromName, TRUE, style_params);
+ mEditor->appendText(chat.mFromName, FALSE, style_params);
// Ensure that message ends with NewLine, to avoid losing of new lines
// while copy/paste from text chat. See EXT-3263.
mEditor->appendText(chat.mText.substr(3) + NEW_LINE, FALSE, style_params);