Permalink
Browse files

Allow exclusively filtering out Landmark offers with AntiSpamItemOffe…

…rsLandmarks.

This was requested on our JIRA, but then no one suggested any other things to filter.
  • Loading branch information...
Lirusaito committed Apr 13, 2016
1 parent 56bc3ae commit b90d905cc589c5f7ed137bb0b4682623771eda6e
@@ -1763,6 +1763,17 @@ This should be as low as possible, but too low may break functionality</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AntiSpamItemOffersLandmarks</key>
<map>
<key>Comment</key>
<string>When AntiSpamItemOffers is false but this is true, dialogs from inventory item offers of landmarks will be blocked.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AntiSpamNotFriend</key>
<map>
<key>Comment</key>
@@ -1806,10 +1806,13 @@ bool is_spam_filtered(const EInstantMessage& dialog, bool is_friend, bool is_own
return true;
}
void inventory_offer_handler(LLOfferInfo* info)
void inventory_offer_handler(LLOfferInfo* info, bool is_friend, bool is_owned_by_me)
{
static const LLCachedControl<bool> no_landmarks(gSavedSettings, "AntiSpamItemOffersLandmarks");
// NaCl - Antispam Registry
if (NACLAntiSpamRegistry::checkQueue((U32)NACLAntiSpamRegistry::QUEUE_INVENTORY,info->mFromID))
if (NACLAntiSpamRegistry::checkQueue((U32)NACLAntiSpamRegistry::QUEUE_INVENTORY,info->mFromID)
|| (!has_spam_bypass(is_friend, is_owned_by_me)
&& (no_landmarks && info->mType == LLAssetType::AT_LANDMARK)))
{
delete info;
return;
@@ -2941,7 +2944,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
*/
else
{
inventory_offer_handler(info);
inventory_offer_handler(info, is_friend, is_owned_by_me);
}
}
break;
@@ -168,6 +168,7 @@ The following wildcards are available to enhance your autoresponses: #n for user
<check_box disabled_control="_NACL_Antispam" control_name="AntiSpamTeleports" height="16" label="Teleport Offers" name="Teleport Offers" bottom_delta="0" left_delta="120"/>
<check_box disabled_control="_NACL_Antispam" control_name="AntiSpamGroupNotices" height="16" label="Group Notices" name="Group Notices" bottom_delta="0" left_delta="120"/>
<check_box disabled_control="_NACL_Antispam" control_name="AntiSpamTeleportRequests" height="16" label="Teleport Requests" name="Teleport Requests" left="14" bottom_delta="-20"/>
<check_box disabled_control="_NACL_Antispam" invisibility_control="AntiSpamItemOffers" control_name="AntiSpamItemOffersLandmarks" height="16" label="LM Offers" name="LM Offers" left="14"/>
<text name="Except those from:" left="21" bottom_delta="-10">Except those from:</text>
<check_box control_name="AntiSpamNotMine" height="16" label="My objects" name="My objects" left="25" bottom_delta="-23"/>
<check_box control_name="AntiSpamNotFriend" height="16" label="My friends" name="My friends" bottom_delta="0" left_delta="120"/>

0 comments on commit b90d905

Please sign in to comment.