diff options
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index a90790c59a..1a4c849f25 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1498,15 +1498,6 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } std::string separator_string(": "); - int message_offset = 0; - - //Handle IRC styled /me messages. - std::string prefix = message.substr(0, 4); - if (prefix == "/me " || prefix == "/me'") - { - separator_string = ""; - message_offset = 3; - } LLSD args; switch(dialog) @@ -1558,7 +1549,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // now store incoming IM in chat history - buffer = message.substr(message_offset); + buffer = message; LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL; @@ -1576,7 +1567,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) true); // pretend this is chat generated by self, so it does not show up on screen - chat.mText = std::string("IM: ") + name + separator_string + message.substr(message_offset); + chat.mText = std::string("IM: ") + name + separator_string + message; LLFloaterChat::addChat( chat, TRUE, TRUE ); } else if (from_id.isNull()) @@ -1596,7 +1587,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) // Treat like a system message and put in chat history. // Claim to be from a local agent so it doesn't go into // console. - chat.mText = name + separator_string + message.substr(message_offset); + chat.mText = name + separator_string + message; LLNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLNearbyChat>("nearby_chat", LLSD()); if(nearby_chat) @@ -1612,7 +1603,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) { saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str()); } - buffer = saved + message.substr(message_offset); + buffer = saved + message; LL_INFOS("Messaging") << "process_improved_im: session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL; @@ -1634,7 +1625,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) region_id, position, true); - chat.mText = std::string("IM: ") + name + separator_string + saved + message.substr(message_offset); + chat.mText = std::string("IM: ") + name + separator_string + saved + message; BOOL local_agent = FALSE; LLFloaterChat::addChat( chat, TRUE, local_agent ); @@ -1922,7 +1913,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) { saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str()); } - buffer = saved + message.substr(message_offset); + buffer = saved + message; BOOL is_this_agent = FALSE; if(from_id == gAgentID) { @@ -1940,7 +1931,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) position, true); - chat.mText = std::string("IM: ") + name + separator_string + saved + message.substr(message_offset); + chat.mText = std::string("IM: ") + name + separator_string + saved + message; LLFloaterChat::addChat(chat, TRUE, is_this_agent); } break; @@ -1953,7 +1944,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) } LLSD substitutions; - substitutions["MSG"] = message.substr(message_offset); + substitutions["MSG"] = message; LLNotifications::instance().add("ServerObjectMessage", substitutions); } break; @@ -1978,7 +1969,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) else { // TODO: after LLTrans hits release, get "busy response" into translatable file - buffer = llformat("%s (%s): %s", name.c_str(), "busy response", message.substr(message_offset).c_str()); + buffer = llformat("%s (%s): %s", name.c_str(), "busy response", message.c_str()); gIMMgr->addMessage(session_id, from_id, name, buffer); } break; |