summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-03-06 22:02:18 +0200
committerakleshchev <117672381+akleshchev@users.noreply.github.com>2023-03-06 22:53:04 +0200
commit0c2b00efaa2b01204618f4950e5d945331a52f0d (patch)
treee6dabc7a61d30301d3e35bb3fe3dcdb3c5cb4514
parent9ee7c2598e13f78a5a944a09fbe0dd104270ef18 (diff)
SL-19346 PERMISSION_DEBIT remove warning for Linden owned content
-rw-r--r--indra/newview/llimprocessing.cpp2
-rw-r--r--indra/newview/llimview.cpp4
-rw-r--r--indra/newview/llmutelist.cpp6
-rw-r--r--indra/newview/llmutelist.h2
-rw-r--r--indra/newview/llviewermessage.cpp14
-rw-r--r--indra/newview/llvoicevivox.cpp2
6 files changed, 17 insertions, 13 deletions
diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp
index 81f51ca0ea..3536b83989 100644
--- a/indra/newview/llimprocessing.cpp
+++ b/indra/newview/llimprocessing.cpp
@@ -453,7 +453,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
BOOL is_friend = (LLAvatarTracker::instance().getBuddyInfo(from_id) == NULL) ? false : true;
BOOL accept_im_from_only_friend = gSavedPerAccountSettings.getBOOL("VoiceCallsFriendsOnly");
BOOL is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT &&
- LLMuteList::getInstance()->isLinden(name);
+ LLMuteList::isLinden(name);
chat.mMuted = is_muted;
chat.mFromID = from_id;
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 3125e80296..af16f5c7d4 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -3088,7 +3088,7 @@ void LLIMMgr::addMessage(
name_is_setted = true;
}
bool skip_message = false;
- bool from_linden = LLMuteList::getInstance()->isLinden(from);
+ bool from_linden = LLMuteList::isLinden(from);
if (gSavedPerAccountSettings.getBOOL("VoiceCallsFriendsOnly") && !from_linden)
{
// Evaluate if we need to skip this message when that setting is true (default is false)
@@ -3426,7 +3426,7 @@ void LLIMMgr::inviteToSession(
std::string question_type = "VoiceInviteQuestionDefault";
BOOL voice_invite = FALSE;
- bool is_linden = LLMuteList::getInstance()->isLinden(caller_name);
+ bool is_linden = LLMuteList::isLinden(caller_name);
if(type == IM_SESSION_P2P_INVITE)
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp
index bf00d77dea..a7a7ed1b70 100644
--- a/indra/newview/llmutelist.cpp
+++ b/indra/newview/llmutelist.cpp
@@ -192,7 +192,7 @@ void LLMuteList::cleanupSingleton()
LLAvatarNameCache::getInstance()->setAccountNameChangedCallback(NULL);
}
-BOOL LLMuteList::isLinden(const std::string& name) const
+bool LLMuteList::isLinden(const std::string& name)
{
std::string username = boost::replace_all_copy(name, ".", " ");
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
@@ -200,9 +200,9 @@ BOOL LLMuteList::isLinden(const std::string& name) const
tokenizer tokens(username, sep);
tokenizer::iterator token_iter = tokens.begin();
- if (token_iter == tokens.end()) return FALSE;
+ if (token_iter == tokens.end()) return false;
token_iter++;
- if (token_iter == tokens.end()) return FALSE;
+ if (token_iter == tokens.end()) return false;
std::string last_name = *token_iter;
LLStringUtil::toLower(last_name);
diff --git a/indra/newview/llmutelist.h b/indra/newview/llmutelist.h
index 0d426fbd48..2c45014321 100644
--- a/indra/newview/llmutelist.h
+++ b/indra/newview/llmutelist.h
@@ -104,7 +104,7 @@ public:
// Alternate (convenience) form for places we don't need to pass the name, but do need flags
BOOL isMuted(const LLUUID& id, U32 flags) const { return isMuted(id, LLStringUtil::null, flags); };
- BOOL isLinden(const std::string& name) const;
+ static bool isLinden(const std::string& name);
BOOL isLoaded() const { return mIsLoaded; }
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index d97ed61e11..17d4f1928c 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1907,7 +1907,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
log_message = LLTrans::getString("InvOfferDecline", log_message_args);
}
chat.mText = log_message;
- if( LLMuteList::getInstance()->isMuted(mFromID ) && ! LLMuteList::getInstance()->isLinden(mFromName) ) // muting for SL-42269
+ if( LLMuteList::getInstance()->isMuted(mFromID ) && ! LLMuteList::isLinden(mFromName) ) // muting for SL-42269
{
chat.mMuted = TRUE;
accept_to_trash = false; // will send decline message
@@ -2512,7 +2512,7 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
LLMute::flagTextChat)
|| LLMuteList::getInstance()->isMuted(owner_id, LLMute::flagTextChat);
is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT &&
- LLMuteList::getInstance()->isLinden(from_name);
+ LLMuteList::isLinden(from_name);
if (is_muted && (chat.mSourceType == CHAT_SOURCE_OBJECT))
{
@@ -5819,8 +5819,12 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
{
count++;
known_questions |= script_perm.permbit;
- // check whether permission question should cause special caution dialog
- caution |= (script_perm.caution);
+
+ if (!LLMuteList::isLinden(owner_name))
+ {
+ // check whether permission question should cause special caution dialog
+ caution |= (script_perm.caution);
+ }
if (("ScriptTakeMoney" == script_perm.question) && has_not_only_debit)
continue;
@@ -6346,7 +6350,7 @@ bool teleport_request_callback(const LLSD& notification, const LLSD& response)
LLAvatarName av_name;
LLAvatarNameCache::get(from_id, &av_name);
- if(LLMuteList::getInstance()->isMuted(from_id) && !LLMuteList::getInstance()->isLinden(av_name.getUserName()))
+ if(LLMuteList::getInstance()->isMuted(from_id) && !LLMuteList::isLinden(av_name.getUserName()))
{
return false;
}
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 8f0938d01e..c73f96da2d 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -4525,7 +4525,7 @@ void LLVivoxVoiceClient::messageEvent(
{
bool is_do_not_disturb = gAgent.isDoNotDisturb();
bool is_muted = LLMuteList::getInstance()->isMuted(session->mCallerID, session->mName, LLMute::flagTextChat);
- bool is_linden = LLMuteList::getInstance()->isLinden(session->mName);
+ bool is_linden = LLMuteList::isLinden(session->mName);
LLChat chat;
chat.mMuted = is_muted && !is_linden;