summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2009-08-14 14:44:36 -0400
committerNat Goodspeed <nat@lindenlab.com>2009-08-14 14:44:36 -0400
commit21bfcbde7ec6e6b3e8a92237b7c33879216c4e82 (patch)
tree5346bb05d7f74d2f2021883ff0ee4f32bbb56f4a /indra/newview/llimview.cpp
parent2da8eb43d57ae6876f9955386f604f2c56849211 (diff)
parentaff85ed92c5aad3a9445cf4ec5447cc56c44dfc0 (diff)
Merge changes
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);