Thank you kindly, Patnad, for a patch that:

This is to handle the changes in the v1.23 viewer 
of LL regarding the adult rating. With this patch 
a region can be changed to the adult rating from 
LL viewer v1.23 and above.
This commit is contained in:
Charles Krinke
2009-05-12 03:30:37 +00:00
parent 16efb78698
commit c1d680b6c3
14 changed files with 100 additions and 22 deletions

View File

@@ -334,6 +334,11 @@ namespace OpenSim.Framework
get { return m_objectCapacity; }
}
public byte AccessLevel
{
get { return (byte)Util.ConvertMaturityToAccessLevel((uint)m_regionSettings.Maturity); }
}
public void SetEndPoint(string ipaddr, int port)
{
IPAddress tmpIP = IPAddress.Parse(ipaddr);
@@ -691,5 +696,6 @@ namespace OpenSim.Framework
regionInfo.ServerURI = serverURI;
return regionInfo;
}
}
}

View File

@@ -1045,5 +1045,29 @@ namespace OpenSim.Framework
return guid;
}
public static byte ConvertMaturityToAccessLevel(uint maturity)
{
byte retVal = 0;
switch (maturity)
{
case 0: //PG
retVal = 13;
break;
case 1: //Mature
retVal = 21;
break;
case 2: // Adult
retVal = 42;
break;
}
return retVal;
}
}
}