aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llstartup.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2009-10-03 04:25:50 -0500
committerJacek Antonelli2009-10-03 04:25:50 -0500
commit0a6d84a05ad59d613092b6fd87fc84099df0d160 (patch)
tree1e64e2657f764c9c2a015a70d8c1a6d67afc722a /linden/indra/newview/llstartup.cpp
parentImprudence 1.2.0 beta released. (diff)
parentFixed switched Buy and Create locations in object pie menu (regression) (diff)
downloadmeta-impy-0a6d84a05ad59d613092b6fd87fc84099df0d160.zip
meta-impy-0a6d84a05ad59d613092b6fd87fc84099df0d160.tar.gz
meta-impy-0a6d84a05ad59d613092b6fd87fc84099df0d160.tar.bz2
meta-impy-0a6d84a05ad59d613092b6fd87fc84099df0d160.tar.xz
Merge remote branch 'mccabe/next' into next
Diffstat (limited to 'linden/indra/newview/llstartup.cpp')
-rw-r--r--linden/indra/newview/llstartup.cpp51
1 files changed, 46 insertions, 5 deletions
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp
index 6839a4f..346f7dd 100644
--- a/linden/indra/newview/llstartup.cpp
+++ b/linden/indra/newview/llstartup.cpp
@@ -1424,14 +1424,26 @@ bool idle_startup()
1424 } 1424 }
1425 gSavedSettings.setBOOL("RememberPassword", remember_password); 1425 gSavedSettings.setBOOL("RememberPassword", remember_password);
1426 1426
1427 text = LLUserAuth::getInstance()->getResponse("agent_access"); 1427 // This fixes Imprudence 1.2 thinking it's a teen.
1428 if(!text.empty() && (text[0] == 'M')) 1428 // Will need fixing for the 1.23 merge.
1429 // this is their actual ability to access content
1430 text = LLUserAuth::getInstance()->getResponse("agent_access_max");
1431 if (!text.empty())
1429 { 1432 {
1430 gAgent.setTeen(false); 1433 // agent_access can be 'A', 'M', and 'PG'.
1434 gAgent.convertTextToMaturity(text[0]);
1431 } 1435 }
1432 else 1436 else // we're on an older sim version (prolly an opensim)
1433 { 1437 {
1434 gAgent.setTeen(true); 1438 text = LLUserAuth::getInstance()->getResponse("agent_access");
1439 if(!text.empty() && (text[0] == 'M'))
1440 {
1441 gAgent.setTeen(false);
1442 }
1443 else
1444 {
1445 gAgent.setTeen(true);
1446 }
1435 } 1447 }
1436 1448
1437 text = LLUserAuth::getInstance()->getResponse("start_location"); 1449 text = LLUserAuth::getInstance()->getResponse("start_location");
@@ -2604,6 +2616,35 @@ bool idle_startup()
2604 gDebugView->mFastTimerView->setVisible(TRUE); 2616 gDebugView->mFastTimerView->setVisible(TRUE);
2605#endif 2617#endif
2606 2618
2619 // HACK: remove this when based on 1.23
2620 // Send our preferred maturity.
2621 // Update agent access preference on the server
2622 std::string url = gAgent.getRegion()->getCapability("UpdateAgentInformation");
2623 if (!url.empty())
2624 {
2625 U32 preferredMaturity = gSavedSettings.getU32("PreferredMaturity");
2626 // Set new access preference
2627 LLSD access_prefs = LLSD::emptyMap();
2628 if (preferredMaturity == SIM_ACCESS_PG)
2629 {
2630 access_prefs["max"] = "PG";
2631 }
2632 else if (preferredMaturity == SIM_ACCESS_MATURE)
2633 {
2634 access_prefs["max"] = "M";
2635 }
2636 if (preferredMaturity == SIM_ACCESS_ADULT)
2637 {
2638 access_prefs["max"] = "A";
2639 }
2640
2641 LLSD body = LLSD::emptyMap();
2642 body["access_prefs"] = access_prefs;
2643 llinfos << "Sending access prefs update to " << (access_prefs["max"].asString()) << " via capability to: "
2644 << url << llendl;
2645 LLHTTPClient::post(url, body, new LLHTTPClient::Responder()); // Ignore response
2646 }
2647
2607 LLAppViewer::instance()->initMainloopTimeout("Mainloop Init"); 2648 LLAppViewer::instance()->initMainloopTimeout("Mainloop Init");
2608 2649
2609 return TRUE; 2650 return TRUE;