summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llviewermessage.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 26b088e390..56f759833c 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -2646,19 +2646,25 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
else
{
chat.mText = "";
+ auto [msg_without_prefix, is_lua] = LLStringUtil::withoutPrefix(mesg, LUA_PREFIX);
+ std::string prefix;
+ if (is_lua)
+ {
+ prefix = LUA_PREFIX;
+ }
switch(chat.mChatType)
{
case CHAT_TYPE_WHISPER:
- chat.mText = LLTrans::getString("whisper") + " ";
+ prefix += LLTrans::getString("whisper") + " ";
+ break;
+ case CHAT_TYPE_SHOUT:
+ prefix += LLTrans::getString("shout") + " ";
break;
case CHAT_TYPE_DEBUG_MSG:
case CHAT_TYPE_OWNER:
case CHAT_TYPE_NORMAL:
case CHAT_TYPE_DIRECT:
break;
- case CHAT_TYPE_SHOUT:
- chat.mText = LLTrans::getString("shout") + " ";
- break;
case CHAT_TYPE_START:
case CHAT_TYPE_STOP:
LL_WARNS("Messaging") << "Got chat type start/stop in main chat processing." << LL_ENDL;
@@ -2668,7 +2674,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
break;
}
- chat.mText += mesg;
+ chat.mText = prefix + msg_without_prefix;
}
// We have a real utterance now, so can stop showing "..." and proceed.