Inventory decline notifications are annoying, add LogInventoryDecline from upstream.

View without space changes please~
This commit is contained in:
Inusaito Sayori
2015-04-04 15:31:39 -04:00
parent 744def3c1f
commit 0d27d0cbc7
2 changed files with 30 additions and 16 deletions

View File

@@ -18029,6 +18029,17 @@ This should be as low as possible, but too low may break functionality</string>
<integer>0</integer>
</map>
<key>LogInventoryDecline</key>
<map>
<key>Comment</key>
<string>Log in system chat whenever an inventory offer is declined</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>UseHTTPInventory</key>
<map>
<key>Comment</key>

View File

@@ -1651,26 +1651,29 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
// send the message
msg->sendReliable(mHost);
// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1e) | Added: RLVa-1.2.1e
if ( (rlv_handler_t::isEnabled()) &&
(IM_TASK_INVENTORY_OFFERED == mIM) && (LLAssetType::AT_CATEGORY == mType) && (mDesc.find(RLV_PUTINV_PREFIX) == 1) )
if (gSavedSettings.getBOOL("LogInventoryDecline"))
{
std::string::size_type idxToken = mDesc.find("' ( http://");
if (std::string::npos != idxToken)
RlvBehaviourNotifyHandler::instance().sendNotification("declined inv_offer " + mDesc.substr(1, idxToken - 1));
}
// [RLVa:KB] - Checked: 2010-09-23 (RLVa-1.2.1e) | Added: RLVa-1.2.1e
if ( (rlv_handler_t::isEnabled()) &&
(IM_TASK_INVENTORY_OFFERED == mIM) && (LLAssetType::AT_CATEGORY == mType) && (mDesc.find(RLV_PUTINV_PREFIX) == 1) )
{
std::string::size_type idxToken = mDesc.find("' ( http://");
if (std::string::npos != idxToken)
RlvBehaviourNotifyHandler::instance().sendNotification("declined inv_offer " + mDesc.substr(1, idxToken - 1));
}
// [/RLVa:KB]
LLStringUtil::format_map_t log_message_args;
log_message_args["[DESC]"] = mDesc;
log_message_args["[NAME]"] = mFromName;
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
{
chat.mMuted = TRUE;
LLStringUtil::format_map_t log_message_args;
log_message_args["[DESC]"] = mDesc;
log_message_args["[NAME]"] = mFromName;
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
{
chat.mMuted = TRUE;
}
LLFloaterChat::addChatHistory(chat);
}
LLFloaterChat::addChatHistory(chat);
// If it's from an agent, we have to fetch the item to throw
// it away. If it's from a task or group, just denying the