diff options
Diffstat (limited to 'linden/indra/newview/llstartup.cpp')
-rw-r--r-- | linden/indra/newview/llstartup.cpp | 40 |
1 files changed, 31 insertions, 9 deletions
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 8ec5d98..346f7dd 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp | |||
@@ -1425,20 +1425,13 @@ bool idle_startup() | |||
1425 | gSavedSettings.setBOOL("RememberPassword", remember_password); | 1425 | gSavedSettings.setBOOL("RememberPassword", remember_password); |
1426 | 1426 | ||
1427 | // This fixes Imprudence 1.2 thinking it's a teen. | 1427 | // This fixes Imprudence 1.2 thinking it's a teen. |
1428 | // Will need updating for the 1.23 merge. | 1428 | // Will need fixing for the 1.23 merge. |
1429 | // this is their actual ability to access content | 1429 | // this is their actual ability to access content |
1430 | text = LLUserAuth::getInstance()->getResponse("agent_access_max"); | 1430 | text = LLUserAuth::getInstance()->getResponse("agent_access_max"); |
1431 | if (!text.empty()) | 1431 | if (!text.empty()) |
1432 | { | 1432 | { |
1433 | // agent_access can be 'A', 'M', and 'PG'. | 1433 | // agent_access can be 'A', 'M', and 'PG'. |
1434 | if (text[0] == 'PG') | 1434 | gAgent.convertTextToMaturity(text[0]); |
1435 | { | ||
1436 | gAgent.setTeen(true); | ||
1437 | } | ||
1438 | else | ||
1439 | { | ||
1440 | gAgent.setTeen(false); | ||
1441 | } | ||
1442 | } | 1435 | } |
1443 | else // we're on an older sim version (prolly an opensim) | 1436 | else // we're on an older sim version (prolly an opensim) |
1444 | { | 1437 | { |
@@ -2623,6 +2616,35 @@ bool idle_startup() | |||
2623 | gDebugView->mFastTimerView->setVisible(TRUE); | 2616 | gDebugView->mFastTimerView->setVisible(TRUE); |
2624 | #endif | 2617 | #endif |
2625 | 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 | |||
2626 | LLAppViewer::instance()->initMainloopTimeout("Mainloop Init"); | 2648 | LLAppViewer::instance()->initMainloopTimeout("Mainloop Init"); |
2627 | 2649 | ||
2628 | return TRUE; | 2650 | return TRUE; |