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:
@@ -436,6 +436,7 @@ namespace OpenSim.Data.MySQL
|
||||
// World Map Addition
|
||||
UUID.TryParse((string)reader["regionMapTexture"], out retval.regionMapTextureID);
|
||||
UUID.TryParse((string)reader["owner_uuid"], out retval.owner_uuid);
|
||||
retval.maturity = Convert.ToUInt32(reader["access"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -976,13 +977,13 @@ namespace OpenSim.Data.MySQL
|
||||
// server for the UUID of the region's owner (master avatar). It consists of the addition of the column and value to the relevant sql,
|
||||
// as well as the related parameterization
|
||||
sql +=
|
||||
"regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort, owner_uuid, originUUID) VALUES ";
|
||||
"regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort, owner_uuid, originUUID, access) VALUES ";
|
||||
|
||||
sql += "(?regionHandle, ?regionName, ?uuid, ?regionRecvKey, ?regionSecret, ?regionSendKey, ?regionDataURI, ";
|
||||
sql +=
|
||||
"?serverIP, ?serverPort, ?serverURI, ?locX, ?locY, ?locZ, ?eastOverrideHandle, ?westOverrideHandle, ?southOverrideHandle, ?northOverrideHandle, ?regionAssetURI, ?regionAssetRecvKey, ";
|
||||
sql +=
|
||||
"?regionAssetSendKey, ?regionUserURI, ?regionUserRecvKey, ?regionUserSendKey, ?regionMapTexture, ?serverHttpPort, ?serverRemotingPort, ?owner_uuid, ?originUUID)";
|
||||
"?regionAssetSendKey, ?regionUserURI, ?regionUserRecvKey, ?regionUserSendKey, ?regionMapTexture, ?serverHttpPort, ?serverRemotingPort, ?owner_uuid, ?originUUID, ?access)";
|
||||
|
||||
if (GRID_ONLY_UPDATE_NECESSARY_DATA)
|
||||
{
|
||||
@@ -1023,6 +1024,7 @@ namespace OpenSim.Data.MySQL
|
||||
parameters["?serverRemotingPort"] = regiondata.remotingPort.ToString();
|
||||
parameters["?owner_uuid"] = regiondata.owner_uuid.ToString();
|
||||
parameters["?originUUID"] = regiondata.originUUID.ToString();
|
||||
parameters["?access"] = regiondata.maturity.ToString();
|
||||
|
||||
bool returnval = false;
|
||||
|
||||
|
||||
5
OpenSim/Data/MySQL/Resources/002_GridStore.sql
Normal file
5
OpenSim/Data/MySQL/Resources/002_GridStore.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE regions add column access integer unsigned default 1;
|
||||
|
||||
COMMIT;
|
||||
@@ -131,6 +131,11 @@ namespace OpenSim.Data
|
||||
/// </summary>
|
||||
public UUID originUUID;
|
||||
|
||||
/// <summary>
|
||||
/// The Maturity rating of the region
|
||||
/// </summary>
|
||||
public uint maturity;
|
||||
|
||||
|
||||
//Data Wrappers
|
||||
public string RegionName
|
||||
@@ -279,6 +284,17 @@ namespace OpenSim.Data
|
||||
get { return originUUID; }
|
||||
set { originUUID = value; }
|
||||
}
|
||||
public uint Maturity
|
||||
{
|
||||
get { return maturity; }
|
||||
set { maturity = value; }
|
||||
}
|
||||
|
||||
public byte AccessLevel
|
||||
{
|
||||
get { return Util.ConvertMaturityToAccessLevel(maturity); }
|
||||
}
|
||||
|
||||
|
||||
public RegionInfo ToRegionInfo()
|
||||
{
|
||||
@@ -295,10 +311,10 @@ namespace OpenSim.Data
|
||||
return Create(regionInfo.RegionID, regionInfo.RegionName, regionInfo.RegionLocX,
|
||||
regionInfo.RegionLocY, regionInfo.ExternalHostName,
|
||||
(uint) regionInfo.ExternalEndPoint.Port, regionInfo.HttpPort, regionInfo.RemotingPort,
|
||||
regionInfo.ServerURI);
|
||||
regionInfo.ServerURI, regionInfo.AccessLevel);
|
||||
}
|
||||
|
||||
public static RegionProfileData Create(UUID regionID, string regionName, uint locX, uint locY, string externalHostName, uint regionPort, uint httpPort, uint remotingPort, string serverUri)
|
||||
public static RegionProfileData Create(UUID regionID, string regionName, uint locX, uint locY, string externalHostName, uint regionPort, uint httpPort, uint remotingPort, string serverUri, byte access)
|
||||
{
|
||||
RegionProfileData regionProfile;
|
||||
regionProfile = new RegionProfileData();
|
||||
@@ -315,6 +331,7 @@ namespace OpenSim.Data
|
||||
regionProfile.httpServerURI = "http://" + externalHostName + ":" + httpPort + "/";
|
||||
regionProfile.UUID = regionID;
|
||||
regionProfile.regionName = regionName;
|
||||
regionProfile.maturity = access;
|
||||
return regionProfile;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,8 +65,9 @@ namespace OpenSim.Data
|
||||
string serverUri = (string)responseData["server_uri"];
|
||||
UUID regionID = new UUID((string)responseData["region_UUID"]);
|
||||
string regionName = (string)responseData["region_name"];
|
||||
byte access = Convert.ToByte((string)responseData["access"]);
|
||||
|
||||
simData = RegionProfileData.Create(regionID, regionName, locX, locY, externalHostName, simPort, httpPort, remotingPort, serverUri);
|
||||
simData = RegionProfileData.Create(regionID, regionName, locX, locY, externalHostName, simPort, httpPort, remotingPort, serverUri, access);
|
||||
}
|
||||
|
||||
return simData;
|
||||
|
||||
Reference in New Issue
Block a user