aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterchat.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfloaterchat.cpp60
1 files changed, 58 insertions, 2 deletions
diff --git a/linden/indra/newview/llfloaterchat.cpp b/linden/indra/newview/llfloaterchat.cpp
index 5117b8d..4cc721e 100644
--- a/linden/indra/newview/llfloaterchat.cpp
+++ b/linden/indra/newview/llfloaterchat.cpp
@@ -202,7 +202,11 @@ void add_timestamped_line(LLViewerTextEditor* edit, const LLChat &chat, const LL
202 // extract out the sender name and replace it with the hotlinked name. 202 // extract out the sender name and replace it with the hotlinked name.
203 if (chat.mSourceType == CHAT_SOURCE_AGENT && 203 if (chat.mSourceType == CHAT_SOURCE_AGENT &&
204 chat.mFromID != LLUUID::null && 204 chat.mFromID != LLUUID::null &&
205 (line.length() > chat.mFromName.length() && line.find(chat.mFromName,0) == 0)) 205// (line.length() > chat.mFromName.length() && line.find(chat.mFromName,0) == 0))
206 (line.length() > chat.mFromName.length() && line.find(chat.mFromName,0) == 0) &&
207// [RLVa] - Version: 1.22.11 | Checked: 2009-07-08 (RLVa-1.0.0e)
208 (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
209// [/RLVa]
206 { 210 {
207 std::string start_line = line.substr(0, chat.mFromName.length() + 1); 211 std::string start_line = line.substr(0, chat.mFromName.length() + 1);
208 line = line.substr(chat.mFromName.length() + 1); 212 line = line.substr(chat.mFromName.length() + 1);
@@ -226,6 +230,30 @@ void log_chat_text(const LLChat& chat)
226// static 230// static
227void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file) 231void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file)
228{ 232{
233// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
234 if (rlv_handler_t::isEnabled())
235 {
236 // TODO-RLVa: we might cast too broad a net by filtering here, needs testing
237 if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) && (!chat.mRlvLocFiltered) && (CHAT_SOURCE_AGENT != chat.mSourceType) )
238 {
239 LLChat& rlvChat = const_cast<LLChat&>(chat);
240 gRlvHandler.filterLocation(rlvChat.mText);
241 rlvChat.mRlvLocFiltered = TRUE;
242 }
243 if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (!chat.mRlvNamesFiltered) )
244 {
245 // NOTE: this will also filter inventory accepted/declined text in the chat history
246 LLChat& rlvChat = const_cast<LLChat&>(chat);
247 if (CHAT_SOURCE_AGENT != chat.mSourceType)
248 {
249 // Filter object and system chat (names are filtered elsewhere to save ourselves an gObjectList lookup)
250 gRlvHandler.filterNames(rlvChat.mText);
251 }
252 rlvChat.mRlvNamesFiltered = TRUE;
253 }
254 }
255// [/RLVa:KB]
256
229 if ( gSavedPerAccountSettings.getBOOL("LogChat") && log_to_file) 257 if ( gSavedPerAccountSettings.getBOOL("LogChat") && log_to_file)
230 { 258 {
231 log_chat_text(chat); 259 log_chat_text(chat);
@@ -356,6 +384,30 @@ void LLFloaterChat::addChat(const LLChat& chat,
356 chat.mChatType == CHAT_TYPE_DEBUG_MSG 384 chat.mChatType == CHAT_TYPE_DEBUG_MSG
357 && !gSavedSettings.getBOOL("ScriptErrorsAsChat"); 385 && !gSavedSettings.getBOOL("ScriptErrorsAsChat");
358 386
387// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
388 if (rlv_handler_t::isEnabled())
389 {
390 // TODO-RLVa: we might cast too broad a net by filtering here, needs testing
391 if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) && (!chat.mRlvLocFiltered) && (CHAT_SOURCE_AGENT != chat.mSourceType) )
392 {
393 LLChat& rlvChat = const_cast<LLChat&>(chat);
394 if (!from_instant_message)
395 gRlvHandler.filterLocation(rlvChat.mText);
396 rlvChat.mRlvLocFiltered = TRUE;
397 }
398 if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (!chat.mRlvNamesFiltered) )
399 {
400 LLChat& rlvChat = const_cast<LLChat&>(chat);
401 if ( (!from_instant_message) && (CHAT_SOURCE_AGENT != chat.mSourceType) )
402 {
403 // Filter object and system chat (names are filtered elsewhere to save ourselves an gObjectList lookup)
404 gRlvHandler.filterNames(rlvChat.mText);
405 }
406 rlvChat.mRlvNamesFiltered = TRUE;
407 }
408 }
409// [/RLVa:KB]
410
359#if LL_LCD_COMPILE 411#if LL_LCD_COMPILE
360 // add into LCD displays 412 // add into LCD displays
361 if (!invisible_script_debug_chat) 413 if (!invisible_script_debug_chat)
@@ -513,7 +565,11 @@ void LLFloaterChat::onClickToggleActiveSpeakers(void* userdata)
513{ 565{
514 LLFloaterChat* self = (LLFloaterChat*)userdata; 566 LLFloaterChat* self = (LLFloaterChat*)userdata;
515 567
516 self->childSetVisible("active_speakers_panel", !self->childIsVisible("active_speakers_panel")); 568// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
569 self->childSetVisible("active_speakers_panel",
570 (!self->childIsVisible("active_speakers_panel")) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) );
571// [/RLVa:KB]
572 //self->childSetVisible("active_speakers_panel", !self->childIsVisible("active_speakers_panel"));
517} 573}
518 574
519//static 575//static