summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/newview/llviewermessage.cpp29
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml26
2 files changed, 41 insertions, 14 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index f84ada18ab..bb48391fe0 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -5683,6 +5683,30 @@ void process_alert_message(LLMessageSystem *msgsystem, void **user_data)
}
}
+bool handle_not_age_verified_alert(const std::string &pAlertName)
+{
+ LLNotificationPtr notification = LLNotificationsUtil::add(pAlertName);
+ if ((notification == NULL) || notification->isIgnored())
+ {
+ LLNotificationsUtil::add(pAlertName + "_Notify");
+ }
+
+ return true;
+}
+
+bool handle_special_alerts(const std::string &pAlertName)
+{
+ bool isHandled = false;
+
+ if (LLStringUtil::compareStrings(pAlertName, "NotAgeVerified") == 0)
+ {
+
+ isHandled = handle_not_age_verified_alert(pAlertName);
+ }
+
+ return isHandled;
+}
+
void process_alert_core(const std::string& message, BOOL modal)
{
// HACK -- handle callbacks for specific alerts. It also is localized in notifications.xml
@@ -5706,7 +5730,10 @@ void process_alert_core(const std::string& message, BOOL modal)
// Allow the server to spawn a named alert so that server alerts can be
// translated out of English.
std::string alert_name(message.substr(ALERT_PREFIX.length()));
- LLNotificationsUtil::add(alert_name);
+ if (!handle_special_alerts(alert_name))
+ {
+ LLNotificationsUtil::add(alert_name);
+ }
}
else if (message.find(NOTIFY_PREFIX) == 0)
{
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index cd28b5a770..fd153aba1f 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -5142,20 +5142,20 @@ Would you like to automatically wear the clothing you are about to create?
icon="alertmodal.tga"
name="NotAgeVerified"
type="alertmodal">
- <tag>fail</tag>
-To access adult content and areas in Second Life you must be at least 18 years old. Please visit our age verification page to confirm you are over 18.
-Note this will launch your web browser.
-
-[_URL]
- <tag>confirm</tag>
- <url option="0" name="url">
- https://secondlife.com/my/account/verification.php
- </url>
+ The location you're trying to visit is restricted to residents age 18 and over.
+ <tag>fail</tag>
<usetemplate
- ignoretext="I have not verified my age"
- name="okcancelignore"
- notext="Cancel"
- yestext="Go to Age Verification"/>
+ ignoretext="I am not old enough to visit age restricted areas."
+ name="okignore"
+ yestext="OK"/>
+ </notification>
+
+ <notification
+ icon="notifytip.tga"
+ name="NotAgeVerified_Notify"
+ type="notifytip">
+ Location restricted to age 18 and over.
+ <tag>fail</tag>
</notification>
<notification