From 153e86b038796e5f449bd084f432a18e12725c6b Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 2 Oct 2009 22:18:02 -0700 Subject: Applied clickable object names for whisper/say/shout from Emerald viewer --- linden/indra/newview/llviewermessage.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'linden/indra/newview/llviewermessage.cpp') diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index d900cd9..47231fb 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp @@ -2436,6 +2436,32 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) is_owned_by_me = chatter->permYouOwner(); } + if(chat.mSourceType == CHAT_SOURCE_OBJECT + && chat.mChatType != CHAT_TYPE_DEBUG_MSG + && !owner_id.isNull() + && owner_id != gAgent.getID()) + { + std::string tempname = from_name; + + size_t found = tempname.find(" "); + while(found != std::string::npos) + { + tempname.replace(found, 1, ""); + found = tempname.find(" "); + } + + if (tempname.length() < 1) + { + from_name = "no name"; + chat.mFromName = from_name; + } + + // std::string ownername; + // if(gCacheName->getFullName(owner_id,ownername)) + // from_name += (" (" + ownername + ")"); + chat.mURL = llformat("secondlife:///app/agent/%s/about",owner_id.asString().c_str()); + } + if (is_audible) { BOOL visible_in_chat_bubble = FALSE; -- cgit v1.1