mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 18:55:58 +08:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user