summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.cpp
diff options
context:
space:
mode:
authorsimon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com>2012-07-11 16:15:23 -0700
committersimon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com>2012-07-11 16:15:23 -0700
commit173d0fa213f59b872a4a6c34b8668c67b58fdca7 (patch)
tree3f02cf0344273dd227b356e3e7768d91cf6786f3 /indra/newview/llviewerregion.cpp
parent08c6c5b78d709503e4b5177477046c30495d2d95 (diff)
parent9298b1abe9f8b5a7230a5788e86affb22747740d (diff)
Pull in viewer-development because it's painful. Merge with runitai's help.
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rw-r--r--indra/newview/llviewerregion.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index e4108e2cd1..61ff2ee12e 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -655,6 +655,31 @@ std::string LLViewerRegion::accessToShortString(U8 sim_access)
}
// static
+U8 LLViewerRegion::shortStringToAccess(const std::string &sim_access)
+{
+ U8 accessValue;
+
+ if (LLStringUtil::compareStrings(sim_access, "PG") == 0)
+ {
+ accessValue = SIM_ACCESS_PG;
+ }
+ else if (LLStringUtil::compareStrings(sim_access, "M") == 0)
+ {
+ accessValue = SIM_ACCESS_MATURE;
+ }
+ else if (LLStringUtil::compareStrings(sim_access, "A") == 0)
+ {
+ accessValue = SIM_ACCESS_ADULT;
+ }
+ else
+ {
+ accessValue = SIM_ACCESS_MIN;
+ }
+
+ return accessValue;
+}
+
+// static
void LLViewerRegion::processRegionInfo(LLMessageSystem* msg, void**)
{
// send it to 'observers'