diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2016-10-26 15:10:40 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2016-10-26 15:10:40 +0300 |
commit | 5828d061144fe1d15580dc6f9e00d7dcf93456ea (patch) | |
tree | 1335fce8415f9b383fcf53f9f154a3e023cd68b1 /indra/newview/llmutelist.cpp | |
parent | d4373437f2bb80579b0a2c984d30d041e0c6d156 (diff) |
SL-448 Implement a limit to block list
Diffstat (limited to 'indra/newview/llmutelist.cpp')
-rw-r--r-- | indra/newview/llmutelist.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
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 |