diff options
author | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-11-11 15:28:24 +0200 |
---|---|---|
committer | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-11-11 15:28:24 +0200 |
commit | 9a88d4b02de57bf1e9e4e22d30d95f358d9ec37c (patch) | |
tree | ba0d3922cf8610b47523e55249eb7a7c4b601778 /indra/newview/llimfloater.cpp | |
parent | ef721de720690ad4ec89114c56197098c100136c (diff) | |
parent | 7123f0d447c39c0f81936eef8867b8ff3cc9cda8 (diff) |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llimfloater.cpp')
-rw-r--r-- | indra/newview/llimfloater.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index a634a1b0fd..8b44ccebdd 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -479,11 +479,29 @@ void LLIMFloater::updateMessages() LLStyle::Params style_params; style_params.color(chat_color); - LLChat chat(message); + LLChat chat; chat.mFromID = from_id; chat.mFromName = from; - mChatHistory->appendWidgetMessage(chat, style_params); + //Handle IRC styled /me messages. + std::string prefix = message.substr(0, 4); + if (prefix == "/me " || prefix == "/me'") + { + if (from.size() > 0) + { + style_params.font.style = "ITALIC"; + chat.mText = from + " "; + mChatHistory->appendWidgetMessage(chat, style_params); + } + message = message.substr(3); + style_params.font.style = "UNDERLINE"; + mChatHistory->appendText(message, FALSE, style_params); + } + else + { + chat.mText = message; + mChatHistory->appendWidgetMessage(chat, style_params); + } mLastMessageIndex = msg["index"].asInteger(); } |