summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2016-10-26 15:10:40 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2016-10-26 15:10:40 +0300
commit5828d061144fe1d15580dc6f9e00d7dcf93456ea (patch)
tree1335fce8415f9b383fcf53f9f154a3e023cd68b1 /indra
parentd4373437f2bb80579b0a2c984d30d041e0c6d156 (diff)
SL-448 Implement a limit to block list
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llmutelist.cpp11
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml11
3 files changed, 32 insertions, 1 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 8836ed0e5e..c6347c3f65 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -6618,6 +6618,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>MuteListLimit</key>
+ <map>
+ <key>Comment</key>
+ <string>Maximum number of entries in the mute list</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>1000</integer>
+ </map>
<key>MyOutfitsAutofill</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llmutelist.cpp b/indra/newview/llmutelist.cpp
index 01cf68bcda..84cf7d0313 100644
--- a/indra/newview/llmutelist.cpp
+++ b/indra/newview/llmutelist.cpp
@@ -56,6 +56,7 @@
#include "llworld.h" //for particle system banning
#include "llimview.h"
#include "llnotifications.h"
+#include "llviewercontrol.h"
#include "llviewerobjectlist.h"
#include "lltrans.h"
@@ -231,6 +232,16 @@ BOOL LLMuteList::add(const LLMute& mute, U32 flags)
return FALSE;
}
+ S32 mute_list_limit = gSavedSettings.getS32("MuteListLimit");
+ if (getMutes().size() >= mute_list_limit)
+ {
+ LL_WARNS() << "Mute limit is reached; ignored" << LL_ENDL;
+ LLSD args;
+ args["MUTE_LIMIT"] = mute_list_limit;
+ LLNotifications::instance().add(LLNotification::Params("MuteLimitReached").substitutions(args));
+ return FALSE;
+ }
+
if (mute.mType == LLMute::BY_NAME)
{
// Can't mute empty string by name
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 65ab3f001f..db90e6a163 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -1886,7 +1886,16 @@ Go to [_URL] for information on purchasing L$?
notext="Cancel"
yestext="OK"/>
</notification>
-
+
+ <notification
+ icon="alertmodal.tga"
+ name="MuteLimitReached"
+ persist="false"
+ type="notify">
+Unable to add new entry to block list because you reached the limit of [MUTE_LIMIT] entries.
+ <tag>fail</tag>
+ </notification>
+
<notification
icon="alertmodal.tga"
name="UnableToLinkObjects"