diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-04-30 09:40:14 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-04-30 09:40:14 +0800 |
commit | c0a2498fa1ff074fa29b31bbd63b2ac6f69b38bb (patch) | |
tree | 0909d51200a3de225f20ebe7d0aa7cb95fb380e1 /indra/newview/llviewerchat.cpp | |
parent | 39cc9a1706340d6f84b152593a4d8aaeeaa88b56 (diff) | |
parent | d9e55c44152064133796bfb08f1da524387c1300 (diff) |
Merge tag 'Second_Life_Release#d9e55c44-Second_Life_Release#d9e55c4-2025.04' into 2025.04
Diffstat (limited to 'indra/newview/llviewerchat.cpp')
-rw-r--r-- | indra/newview/llviewerchat.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llviewerchat.cpp b/indra/newview/llviewerchat.cpp index 8b01c4ef88..2ca2c5c07d 100644 --- a/indra/newview/llviewerchat.cpp +++ b/indra/newview/llviewerchat.cpp @@ -36,6 +36,7 @@ #include "llviewerregion.h" #include "llworld.h" #include "llinstantmessage.h" //SYSTEM_FROM +#include "llurlregistry.h" // LLViewerChat LLViewerChat::font_change_signal_t LLViewerChat::sChatFontChangedSignal; @@ -222,6 +223,13 @@ void LLViewerChat::formatChatMsg(const LLChat& chat, std::string& formated_msg) { std::string tmpmsg = chat.mText; + // show @name instead of slurl for chat mentions + LLUrlMatch match; + while (LLUrlRegistry::instance().findUrl(tmpmsg, match, LLUrlRegistryNullCallback, false, true)) + { + tmpmsg.replace(match.getStart(), match.getEnd() - match.getStart() + 1, match.getLabel()); + } + if(chat.mChatStyle == CHAT_STYLE_IRC) { formated_msg = chat.mFromName + tmpmsg.substr(3); |