summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2026-09-04 22:45:38 +0800
committerErik Kundiman <erik@megapahit.org>2026-09-04 22:45:38 +0800
commitf7beb28baafa6600c1e8c9b6a08deb3705ba2e78 (patch)
tree6bd3af510b83613f2e9c9627d3bf4c33e30db394 /indra/newview/llviewermessage.cpp
parentf57d1d24e1a9947405587a6fe36d38ba42e097bd (diff)
parent5ddd940bf4bd75659a86e8d0eb205a766be5d53e (diff)
Merge tag 'Second_Life_Release#5ddd940b-26.4' into 26.4
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp34
1 files changed, 27 insertions, 7 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index dde4897ab7..c4bd9e73ec 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4950,10 +4950,12 @@ bool handle_teleport_access_blocked(LLSD& llsdBlock, const std::string & notific
{
U8 regionAccess = static_cast<U8>(llsdBlock["_region_access"].asInteger());
std::string regionMaturity = LLViewerRegion::accessToString(regionAccess);
+ llsdBlock["REGIONMATURITY_CAP"] = regionMaturity;
LLStringUtil::toLower(regionMaturity);
llsdBlock["REGIONMATURITY"] = regionMaturity;
LLNotificationPtr tp_failure_notification;
+ bool skip_notif = false;
std::string notifySuffix;
if (notificationID == std::string("TeleportEntryAccessBlocked"))
@@ -5023,21 +5025,39 @@ bool handle_teleport_access_blocked(LLSD& llsdBlock, const std::string & notific
}
} // End of special handling for "TeleportEntryAccessBlocked"
else
- { // Normal case, no message munging
- gAgent.clearTeleportRequest();
- if (LLNotifications::getInstance()->templateExists(notificationID))
+ {
+ if (notificationID == "RegionTPAccessBlocked")
{
- tp_failure_notification = LLNotificationsUtil::add(notificationID, llsdBlock, llsdBlock);
+ bool can_change_maturity = (regionAccess == SIM_ACCESS_MATURE) ? gAgent.isMature() : gAgent.isAdult();
+ if (can_change_maturity)
+ {
+ LLFloaterReg::showInstance("maturity_dialog", LLSD((S32)regionAccess));
+ skip_notif = true;
+ }
+ else
+ {
+ gAgent.clearTeleportRequest();
+ tp_failure_notification = LLNotificationsUtil::add("RegionTPAccessBlocked_NotifyAdultsOnly", llsdBlock);
+ }
}
else
{
- llsdBlock["MESSAGE"] = defaultMessage;
- tp_failure_notification = LLNotificationsUtil::add("GenericAlertOK", llsdBlock);
+ // Normal case, no message munging
+ gAgent.clearTeleportRequest();
+ if (LLNotifications::getInstance()->templateExists(notificationID))
+ {
+ tp_failure_notification = LLNotificationsUtil::add(notificationID, llsdBlock, llsdBlock);
+ }
+ else
+ {
+ llsdBlock["MESSAGE"] = defaultMessage;
+ tp_failure_notification = LLNotificationsUtil::add("GenericAlertOK", llsdBlock);
+ }
}
returnValue = true;
}
- if ((tp_failure_notification == NULL) || tp_failure_notification->isIgnored())
+ if (((tp_failure_notification == NULL) || tp_failure_notification->isIgnored()) && !skip_notif)
{
// Given a simple notification if no tp_failure_notification is set or it is ignore
LLNotificationsUtil::add(notificationID + notifySuffix, llsdBlock);