diff options
Diffstat (limited to 'linden/indra/newview/llimpanel.cpp')
-rw-r--r-- | linden/indra/newview/llimpanel.cpp | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/linden/indra/newview/llimpanel.cpp b/linden/indra/newview/llimpanel.cpp index f30ae8c..014c050 100644 --- a/linden/indra/newview/llimpanel.cpp +++ b/linden/indra/newview/llimpanel.cpp | |||
@@ -1543,8 +1543,8 @@ void LLFloaterIMPanel::addHistoryLine(const std::string &utf8msg, const LLColor4 | |||
1543 | else | 1543 | else |
1544 | { | 1544 | { |
1545 | // Convert the name to a hotlink and add to message. | 1545 | // Convert the name to a hotlink and add to message. |
1546 | const LLStyleSP &source_style = LLStyleMap::instance().lookup(source); | 1546 | const LLStyleSP &source_style = LLStyleMap::instance().lookupAgent(source); |
1547 | mHistoryEditor->appendStyledText(name,false,prepend_newline,&source_style); | 1547 | mHistoryEditor->appendStyledText(name,false,prepend_newline,source_style); |
1548 | } | 1548 | } |
1549 | prepend_newline = false; | 1549 | prepend_newline = false; |
1550 | } | 1550 | } |
@@ -2009,6 +2009,42 @@ void LLFloaterIMPanel::sendMsg() | |||
2009 | std::string utf8_text = wstring_to_utf8str(text); | 2009 | std::string utf8_text = wstring_to_utf8str(text); |
2010 | utf8_text = utf8str_truncate(utf8_text, MAX_MSG_BUF_SIZE - 1); | 2010 | utf8_text = utf8str_truncate(utf8_text, MAX_MSG_BUF_SIZE - 1); |
2011 | 2011 | ||
2012 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | Modified: RLVa-1.0.0g | ||
2013 | if (gRlvHandler.hasBehaviour(RLV_BHVR_SENDIM)) | ||
2014 | { | ||
2015 | if (IM_NOTHING_SPECIAL == mDialog) // One-on-one IM: allow if recipient is a sendim exception | ||
2016 | { | ||
2017 | if (!gRlvHandler.isException(RLV_BHVR_SENDIM, mOtherParticipantUUID)) | ||
2018 | utf8_text = rlv_handler_t::cstrBlockedSendIM; | ||
2019 | } | ||
2020 | else if (gAgent.isInGroup(mSessionUUID)) // Group chat: allow if recipient is a sendim exception | ||
2021 | { | ||
2022 | if (!gRlvHandler.isException(RLV_BHVR_SENDIM, mSessionUUID)) | ||
2023 | utf8_text = rlv_handler_t::cstrBlockedSendIM; | ||
2024 | } | ||
2025 | else if (mSpeakers) // Conference chat: allow if all participants are sendim exceptions | ||
2026 | { | ||
2027 | LLSpeakerMgr::speaker_list_t speakers; | ||
2028 | mSpeakers->getSpeakerList(&speakers, TRUE); | ||
2029 | |||
2030 | for (LLSpeakerMgr::speaker_list_t::const_iterator itSpeaker = speakers.begin(); | ||
2031 | itSpeaker != speakers.end(); ++itSpeaker) | ||
2032 | { | ||
2033 | LLSpeaker* pSpeaker = *itSpeaker; | ||
2034 | if ( (gAgent.getID() != pSpeaker->mID) && (!gRlvHandler.isException(RLV_BHVR_SENDIM, pSpeaker->mID)) ) | ||
2035 | { | ||
2036 | utf8_text = rlv_handler_t::cstrBlockedSendIM; | ||
2037 | break; | ||
2038 | } | ||
2039 | } | ||
2040 | } | ||
2041 | else // Catch all fall-through | ||
2042 | { | ||
2043 | utf8_text = rlv_handler_t::cstrBlockedSendIM; | ||
2044 | } | ||
2045 | } | ||
2046 | // [/RLVa:KB] | ||
2047 | |||
2012 | if ( mSessionInitialized ) | 2048 | if ( mSessionInitialized ) |
2013 | { | 2049 | { |
2014 | deliver_message(utf8_text, | 2050 | deliver_message(utf8_text, |