diff options
| author | angela <angela@lindenlab.com> | 2009-11-17 10:04:41 +0800 |
|---|---|---|
| committer | angela <angela@lindenlab.com> | 2009-11-17 10:04:41 +0800 |
| commit | 28aa749db58b3a4095ca7e59811900767cd897b0 (patch) | |
| tree | 82337af6ace682a5f5f5a7646f5dfd0dc44fa56a /indra/newview/llnearbychat.cpp | |
| parent | 27a555e443c98ce1a41ef21e6111bdfe903894e8 (diff) | |
| parent | bce2cab144214b5a90a702e62f1e7c98e93fefc3 (diff) | |
Automated merge with ssh://angela@hg.lindenlab.com/viewer/viewer-2-0/
Diffstat (limited to 'indra/newview/llnearbychat.cpp')
| -rw-r--r-- | indra/newview/llnearbychat.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 029019a8dc..3af9448564 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -155,7 +155,33 @@ void LLNearbyChat::addMessage(const LLChat& chat) if (!chat.mMuted) { - mChatHistory->appendWidgetMessage(chat); + std::string message = chat.mText; + std::string prefix = message.substr(0, 4); + if (chat.mChatStyle == CHAT_STYLE_IRC) + { + LLStyle::Params append_style_params; + if (chat.mFromName.size() > 0) + { + append_style_params.italic= true; + LLChat add_chat=chat; + add_chat.mText = chat.mFromName + " "; + mChatHistory->appendWidgetMessage(add_chat, append_style_params); + } + message = message.substr(3); + + LLColor4 txt_color = LLUIColorTable::instance().getColor("White"); + LLViewerChat::getChatColor(chat,txt_color); + LLFontGL* fontp = LLViewerChat::getChatFont(); + append_style_params.color(txt_color); + append_style_params.readonly_color(txt_color); + append_style_params.font(fontp); + append_style_params.underline = true; + mChatHistory->appendText(message, FALSE, append_style_params); + } + else + { + mChatHistory->appendWidgetMessage(chat); + } } } |
