FIRE-23138: Add option for antispam checking on user's own objects.
parent
375fe0a924
commit
61ab09a07b
|
|
@ -20236,6 +20236,19 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<!-- FS:TS FIRE-23138: Enable antispam even for user's own objects -->
|
||||
<key>FSUseAntiSpamMine</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Use the Anti-Spam System even for the user's own objects</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<!-- /FS:TS FIRE-23138 -->
|
||||
|
||||
<key>_NACL_AntiSpamGlobalQueue</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -2940,21 +2940,37 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
|
|||
|
||||
// NaCl - Newline flood protection
|
||||
static LLCachedControl<bool> useAntiSpam(gSavedSettings, "UseAntiSpam");
|
||||
// <FS:TS> FIRE-23138: Add option to antispam user's own objects
|
||||
bool deferred_spam_check = false;
|
||||
static LLCachedControl<bool> 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;
|
||||
}
|
||||
// </FS:TS> 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;
|
||||
}
|
||||
// <FS:TS> FIRE-23138: Enable spam checking for user's own objects
|
||||
if (deferred_spam_check && NACLAntiSpamRegistry::instance().checkNewlineFlood(ANTISPAM_QUEUE_CHAT, from_id, mesg))
|
||||
{
|
||||
return;
|
||||
}
|
||||
// </FS:TS> FIRE-23138
|
||||
|
||||
chat.mText += mesg;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -308,6 +308,17 @@
|
|||
height="16"
|
||||
name="UseAntiSpam"
|
||||
width="200" />
|
||||
<!-- FS:TS FIRE-23138: Enable spam protection for user's objects -->
|
||||
<check_box
|
||||
left="20"
|
||||
label="Enable Spam Protection even for objects owned by you"
|
||||
control_name="FSUseAntiSpamMine"
|
||||
follows="left|top"
|
||||
height="16"
|
||||
name="FSUseAntiSpamMine"
|
||||
width="380"
|
||||
tool_tip="This will apply antispam protection even to objects you own."/>
|
||||
<!-- /FS:TS FIRE-23138 -->
|
||||
<text
|
||||
top_pad="5"
|
||||
type="string"
|
||||
|
|
|
|||
Loading…
Reference in New Issue