diff options
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/llmutelist.cpp | 11 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 11 |
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" |