summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2024-08-27 14:11:07 +0300
committerGitHub <noreply@github.com>2024-08-27 14:11:07 +0300
commit2142a4590ab1973a22e2db3aeccfe4d9e616471f (patch)
tree9f2095087f358755f0a8923b78ca56e5be427b19
parent8887711019f3b37bc830a51609a4940fe10d7cec (diff)
parent3919e85f89d2d95af3bd4b824293d6eda6a80162 (diff)
Merge branch 'release/luau-scripting' into lua-inventory
-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.