SL-448 Implement a limit to block list
parent
d4373437f2
commit
5828d06114
|
|
@ -6617,6 +6617,17 @@
|
|||
<string>Boolean</string>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue