Merged in RLVa. Viewer broken!

This commit is contained in:
Siana Gearz
2010-11-07 05:05:47 +01:00
parent ae4a9521af
commit 740b570168
94 changed files with 11249 additions and 503 deletions

View File

@@ -86,6 +86,10 @@
#include "llwindow.h"
#include "message.h"
// [RLVa:KB]
#include "rlvhandler.h"
// [/RLVa:KB]
//
// Global statics
//
@@ -205,7 +209,11 @@ void add_timestamped_line(LLViewerTextEditor* edit, LLChat chat, const LLColor4&
// If the msg is from an agent (not yourself though),
// extract out the sender name and replace it with the hotlinked name.
if (chat.mSourceType == CHAT_SOURCE_AGENT &&
chat.mFromID != LLUUID::null)
// chat.mFromID != LLUUID::null)
// [RLVa:KB] - Version: 1.23.4 | Checked: 2009-07-08 (RLVa-1.0.0e)
chat.mFromID != LLUUID::null &&
(!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) )
// [/RLVa:KB]
{
chat.mURL = llformat("secondlife:///app/agent/%s/about",chat.mFromID.asString().c_str());
}
@@ -236,6 +244,30 @@ void log_chat_text(const LLChat& chat)
// static
void LLFloaterChat::addChatHistory(const LLChat& chat, bool log_to_file)
{
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
if (rlv_handler_t::isEnabled())
{
// TODO-RLVa: we might cast too broad a net by filtering here, needs testing
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) && (!chat.mRlvLocFiltered) && (CHAT_SOURCE_AGENT != chat.mSourceType) )
{
LLChat& rlvChat = const_cast<LLChat&>(chat);
gRlvHandler.filterLocation(rlvChat.mText);
rlvChat.mRlvLocFiltered = TRUE;
}
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (!chat.mRlvNamesFiltered) )
{
// NOTE: this will also filter inventory accepted/declined text in the chat history
LLChat& rlvChat = const_cast<LLChat&>(chat);
if (CHAT_SOURCE_AGENT != chat.mSourceType)
{
// Filter object and system chat (names are filtered elsewhere to save ourselves an gObjectList lookup)
gRlvHandler.filterNames(rlvChat.mText);
}
rlvChat.mRlvNamesFiltered = TRUE;
}
}
// [/RLVa:KB]
if ( gSavedPerAccountSettings.getBOOL("LogChat") && log_to_file)
{
log_chat_text(chat);
@@ -389,6 +421,30 @@ void LLFloaterChat::addChat(const LLChat& chat,
chat.mChatType == CHAT_TYPE_DEBUG_MSG
&& !gSavedSettings.getBOOL("ScriptErrorsAsChat");
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
if (rlv_handler_t::isEnabled())
{
// TODO-RLVa: we might cast too broad a net by filtering here, needs testing
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) && (!chat.mRlvLocFiltered) && (CHAT_SOURCE_AGENT != chat.mSourceType) )
{
LLChat& rlvChat = const_cast<LLChat&>(chat);
if (!from_instant_message)
gRlvHandler.filterLocation(rlvChat.mText);
rlvChat.mRlvLocFiltered = TRUE;
}
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (!chat.mRlvNamesFiltered) )
{
LLChat& rlvChat = const_cast<LLChat&>(chat);
if ( (!from_instant_message) && (CHAT_SOURCE_AGENT != chat.mSourceType) )
{
// Filter object and system chat (names are filtered elsewhere to save ourselves an gObjectList lookup)
gRlvHandler.filterNames(rlvChat.mText);
}
rlvChat.mRlvNamesFiltered = TRUE;
}
}
// [/RLVa:KB]
#if LL_LCD_COMPILE
// add into LCD displays
if (!invisible_script_debug_chat)
@@ -588,7 +644,11 @@ void LLFloaterChat::onClickToggleActiveSpeakers(void* userdata)
{
LLFloaterChat* self = (LLFloaterChat*)userdata;
self->childSetVisible("active_speakers_panel", !self->childIsVisible("active_speakers_panel"));
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e)
self->childSetVisible("active_speakers_panel",
(!self->childIsVisible("active_speakers_panel")) && (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) );
// [/RLVa:KB]
//self->childSetVisible("active_speakers_panel", !self->childIsVisible("active_speakers_panel"));
}
//static