diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index da13f8df15..b8fe64616e 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -20236,6 +20236,19 @@ Change of this parameter will affect the layout of buttons in notification toast Value 0 + + FSUseAntiSpamMine + + Comment + Use the Anti-Spam System even for the user's own objects + Persist + 1 + Type + Boolean + Value + 0 + + _NACL_AntiSpamGlobalQueue diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 82072c61d5..7871adf777 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2940,21 +2940,37 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) // NaCl - Newline flood protection static LLCachedControl useAntiSpam(gSavedSettings, "UseAntiSpam"); + // FIRE-23138: Add option to antispam user's own objects + bool deferred_spam_check = false; + static LLCachedControl useAntiSpamMine(gSavedSettings, "FSUseAntiSpamMine"); if (useAntiSpam) { bool doCheck = true; - if (owner_id.isNull() || gAgentID == owner_id) + if (owner_id.isNull()) { doCheck = false; } - if (doCheck && chatter && chatter->permYouOwner()) + if (doCheck && !useAntiSpamMine) { - doCheck = false; + if (gAgentID == owner_id) + { + doCheck = false; + } + if (doCheck && chatter && chatter->permYouOwner()) + { + doCheck = false; + } + if (doCheck && NACLAntiSpamRegistry::instance().checkNewlineFlood(ANTISPAM_QUEUE_CHAT, owner_id, mesg)) + { + return; + } } - if (doCheck && NACLAntiSpamRegistry::instance().checkNewlineFlood(ANTISPAM_QUEUE_CHAT, owner_id, mesg)) + if (doCheck && useAntiSpamMine) { - return; + // If it's the user's object, defer the check so RLV commands still work + deferred_spam_check = true; } + // FIRE-23138 } // NaCl End @@ -3222,6 +3238,12 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) LL_WARNS("Messaging") << "Unknown type " << chat.mChatType << " in chat!" << LL_ENDL; break; } + // FIRE-23138: Enable spam checking for user's own objects + if (deferred_spam_check && NACLAntiSpamRegistry::instance().checkNewlineFlood(ANTISPAM_QUEUE_CHAT, from_id, mesg)) + { + return; + } + // FIRE-23138 chat.mText += mesg; } diff --git a/indra/newview/skins/default/xui/en/panel_preferences_firestorm.xml b/indra/newview/skins/default/xui/en/panel_preferences_firestorm.xml index 045fa5727a..53c9163c83 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_firestorm.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_firestorm.xml @@ -308,6 +308,17 @@ height="16" name="UseAntiSpam" width="200" /> + + +