diff options
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
| -rw-r--r-- | indra/newview/llviewermessage.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 059a71c044..240de962e6 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4928,6 +4928,7 @@ 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; @@ -5005,8 +5006,17 @@ bool handle_teleport_access_blocked(LLSD& llsdBlock, const std::string & notific { if (notificationID == "RegionTPAccessBlocked") { - LLFloaterReg::showInstance("maturity_dialog", LLSD((S32)regionAccess)); - skip_notif = true; + 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 { |
