From b83647fb0c3ce721e24b7773bfa557d9fbbaab14 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Wed, 23 May 2012 15:52:48 -0700 Subject: EXP-1947: Altering notification toasts in the case of a teen user. --- indra/newview/llviewermessage.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'indra/newview/llviewermessage.cpp') diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index c68e86d7e9..91f0ad86bc 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -5510,13 +5510,16 @@ bool handle_special_notification(std::string notificationID, LLSD& llsdBlock) bool returnValue = false; LLNotificationPtr maturityLevelNotification; + std::string notifySuffix = "_Notify"; if (regionAccess == SIM_ACCESS_MATURE) { if (gAgent.isTeen()) { gAgent.clearFailedTeleportRequest(); - maturityLevelNotification = LLNotificationsUtil::add(notificationID+"_KB", llsdBlock); + maturityLevelNotification = LLNotificationsUtil::add(notificationID+"_AdultsOnlyContent", llsdBlock); returnValue = true; + + notifySuffix = "_NotifyAdultsOnly"; } else if (gAgent.prefersPG()) { @@ -5545,8 +5548,10 @@ bool handle_special_notification(std::string notificationID, LLSD& llsdBlock) if (!gAgent.isAdult()) { gAgent.clearFailedTeleportRequest(); - maturityLevelNotification = LLNotificationsUtil::add(notificationID+"_KB", llsdBlock); + maturityLevelNotification = LLNotificationsUtil::add(notificationID+"_AdultsOnlyContent", llsdBlock); returnValue = true; + + notifySuffix = "_NotifyAdultsOnly"; } else if (gAgent.prefersPG() || gAgent.prefersMature()) { @@ -5574,7 +5579,7 @@ bool handle_special_notification(std::string notificationID, LLSD& llsdBlock) if ((maturityLevelNotification == NULL) || maturityLevelNotification->isIgnored()) { // Given a simple notification if no maturityLevelNotification is set or it is ignore - LLNotificationsUtil::add(notificationID+"_Notify", llsdBlock); + LLNotificationsUtil::add(notificationID + notifySuffix, llsdBlock); } return returnValue; @@ -5621,16 +5626,20 @@ bool attempt_standard_notification(LLMessageSystem* msgsystem) RegionEntryAccessBlocked RegionEntryAccessBlocked_Notify + RegionEntryAccessBlocked_NotifyAdultsOnly RegionEntryAccessBlocked_Change - RegionEntryAccessBlocked_KB + RegionEntryAccessBlocked_AdultsOnlyContent + RegionEntryAccessBlocked_ChangeAndReTeleport LandClaimAccessBlocked LandClaimAccessBlocked_Notify + LandClaimAccessBlocked_NotifyAdultsOnly LandClaimAccessBlocked_Change - LandClaimAccessBlocked_KB + LandClaimAccessBlocked_AdultsOnlyContent LandBuyAccessBlocked LandBuyAccessBlocked_Notify + LandBuyAccessBlocked_NotifyAdultsOnly LandBuyAccessBlocked_Change - LandBuyAccessBlocked_KB + LandBuyAccessBlocked_AdultsOnlyContent -----------------------------------------------------------------------*/ if (handle_special_notification(notificationID, llsdBlock)) -- cgit v1.2.3