diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-02-03 17:32:57 +0200 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-02-03 17:32:57 +0200 |
commit | 11228d4b7d6be72759625e604fc09bade3cd306e (patch) | |
tree | 6865dda1aff6668d8c3038415e81210b285c4c59 /indra/newview/llchathistory.cpp | |
parent | 11f732bbbe910c2a63efaeb9044d206142d69e2f (diff) | |
parent | 8cbea388eaad8b40faa604f9d7fa2a64570548e2 (diff) |
Merge from default branch
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llchathistory.cpp')
-rw-r--r-- | indra/newview/llchathistory.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index a351c52ce2..1dc0e8c0a7 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -610,19 +610,26 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL url += "?name=" + chat.mFromName; url += "&owner=" + args["owner_id"].asString(); - LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent); - if (region) + std::string slurl = args["slurl"].asString(); + if (slurl.empty()) { - S32 x, y, z; - LLSLURL::globalPosToXYZ(LLVector3d(chat.mPosAgent), x, y, z); - url += "&slurl=" + region->getName() + llformat("/%d/%d/%d", x, y, z); + LLViewerRegion *region = LLWorld::getInstance()->getRegionFromPosAgent(chat.mPosAgent); + if (region) + { + S32 x, y, z; + LLSLURL::globalPosToXYZ(LLVector3d(chat.mPosAgent), x, y, z); + slurl = region->getName() + llformat("/%d/%d/%d", x, y, z); + } } + url += "&slurl=" + slurl; // set the link for the object name to be the objectim SLapp + // (don't let object names with hyperlinks override our objectim Url) LLStyle::Params link_params(style_params); link_params.color.control = "HTMLLinkColor"; link_params.link_href = url; - mEditor->appendText(chat.mFromName + delimiter, false, link_params); + mEditor->appendText("<nolink>" + chat.mFromName + "</nolink>" + delimiter, + false, link_params); } else if ( chat.mFromName != SYSTEM_FROM && chat.mFromID.notNull() ) { |