summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp27
1 files changed, 9 insertions, 18 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 921868d448..1b32709e63 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1499,15 +1499,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)
@@ -1559,7 +1550,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;
@@ -1577,7 +1568,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())
@@ -1597,7 +1588,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)
@@ -1613,7 +1604,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;
@@ -1635,7 +1626,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 );
@@ -1923,7 +1914,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)
{
@@ -1941,7 +1932,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;
@@ -1954,7 +1945,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;
@@ -1979,7 +1970,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;