diff options
Diffstat (limited to 'linden/indra/newview/llfloaterchat.cpp')
-rw-r--r-- | linden/indra/newview/llfloaterchat.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/linden/indra/newview/llfloaterchat.cpp b/linden/indra/newview/llfloaterchat.cpp index 68aaceb..1f51a21 100644 --- a/linden/indra/newview/llfloaterchat.cpp +++ b/linden/indra/newview/llfloaterchat.cpp | |||
@@ -189,7 +189,7 @@ void LLFloaterChat::updateConsoleVisibility() | |||
189 | || (getHost() && getHost()->isMinimized() )); // are we hosted in a minimized floater? | 189 | || (getHost() && getHost()->isMinimized() )); // are we hosted in a minimized floater? |
190 | } | 190 | } |
191 | 191 | ||
192 | void add_timestamped_line(LLViewerTextEditor* edit, const LLChat &chat, const LLColor4& color) | 192 | void add_timestamped_line(LLViewerTextEditor* edit, LLChat chat, const LLColor4& color) |
193 | { | 193 | { |
194 | std::string line = chat.mText; | 194 | std::string line = chat.mText; |
195 | bool prepend_newline = true; | 195 | bool prepend_newline = true; |
@@ -199,20 +199,25 @@ void add_timestamped_line(LLViewerTextEditor* edit, const LLChat &chat, const LL | |||
199 | prepend_newline = false; | 199 | prepend_newline = false; |
200 | } | 200 | } |
201 | 201 | ||
202 | // If the msg is not from an agent (not yourself though), | 202 | // If the msg is from an agent (not yourself though), |
203 | // extract out the sender name and replace it with the hotlinked name. | 203 | // extract out the sender name and replace it with the hotlinked name. |
204 | if (chat.mSourceType == CHAT_SOURCE_AGENT && | 204 | if (chat.mSourceType == CHAT_SOURCE_AGENT && |
205 | chat.mFromID != LLUUID::null && | 205 | chat.mFromID != LLUUID::null && |
206 | // (line.length() > chat.mFromName.length() && line.find(chat.mFromName,0) == 0)) | ||
207 | (line.length() > chat.mFromName.length() && line.find(chat.mFromName,0) == 0) && | ||
208 | // [RLVa] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) | 206 | // [RLVa] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e) |
209 | (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) | 207 | (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) ) |
210 | // [/RLVa] | 208 | // [/RLVa] |
211 | { | 209 | { |
210 | chat.mURL = llformat("secondlife:///app/agent/%s/about",chat.mFromID.asString().c_str()); | ||
211 | } | ||
212 | |||
213 | // If the chat line has an associated url, link it up to the name. | ||
214 | if (!chat.mURL.empty() | ||
215 | && (line.length() > chat.mFromName.length() && line.find(chat.mFromName,0) == 0)) | ||
216 | { | ||
212 | std::string start_line = line.substr(0, chat.mFromName.length() + 1); | 217 | std::string start_line = line.substr(0, chat.mFromName.length() + 1); |
213 | line = line.substr(chat.mFromName.length() + 1); | 218 | line = line.substr(chat.mFromName.length() + 1); |
214 | const LLStyleSP &sourceStyle = LLStyleMap::instance().lookup(chat.mFromID); | 219 | const LLStyleSP &sourceStyle = LLStyleMap::instance().lookup(chat.mFromID,chat.mURL); |
215 | edit->appendStyledText(start_line, false, prepend_newline, &sourceStyle); | 220 | edit->appendStyledText(start_line, false, prepend_newline, sourceStyle); |
216 | prepend_newline = false; | 221 | prepend_newline = false; |
217 | } | 222 | } |
218 | edit->appendColoredText(line, false, prepend_newline, color); | 223 | edit->appendColoredText(line, false, prepend_newline, color); |