summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
authorbrad kittenbrink <brad@lindenlab.com>2009-08-13 01:28:38 -0400
committerbrad kittenbrink <brad@lindenlab.com>2009-08-13 01:28:38 -0400
commit39c2a584f47785c826c3bc133106f3689120bf32 (patch)
tree898695d92fc467672618f08260106ab773e456b5 /indra/newview/llimview.cpp
parenta15feff98c13cd693e60fc59345609c007de16db (diff)
parentefd58603da6062d90a5d7019987409994bc73858 (diff)
Merged latest viewer-2.0.0-3 change up through svn r130333 into login-api.
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r--indra/newview/llimview.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 66165090ef..b45d36e7ac 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -380,6 +380,28 @@ void LLIMModel::sendMessage(const std::string& utf8_text,
std::string from;
gAgent.buildFullname(from);
LLIMModel::instance().addToHistory(im_session_id, from, utf8_text);
+
+ //local echo for the legacy communicate panel
+ std::string history_echo;
+ std::string utf8_copy = utf8_text;
+ gAgent.buildFullname(history_echo);
+
+ // Look for IRC-style emotes here.
+
+ std::string prefix = utf8_copy.substr(0, 4);
+ if (prefix == "/me " || prefix == "/me'")
+ {
+ utf8_copy.replace(0,3,"");
+ }
+ else
+ {
+ history_echo += ": ";
+ }
+ history_echo += utf8_copy;
+
+ LLFloaterIMPanel* floater = gIMMgr->findFloaterBySession(im_session_id);
+ if (floater) floater->addHistoryLine(history_echo, LLUIColorTable::instance().getColor("IMChatColor"), true, gAgent.getID());
+
}
// Add the recipient to the recent people list.
@@ -1362,7 +1384,7 @@ LLUUID LLIMMgr::addSession(
{
// *TODO: Remove this? Otherwise old communicate window opens on
// second initiation of IM session from People panel?
- floater->openFloater();
+ // floater->openFloater();
}
//mTabContainer->selectTabPanel(panel);
floater->setInputFocus(TRUE);