diff options
author | Charles Krinke | 2009-05-12 03:30:37 +0000 |
---|---|---|
committer | Charles Krinke | 2009-05-12 03:30:37 +0000 |
commit | c1d680b6c3a5e3dc11cd1e7cc9b74d3d81317eee (patch) | |
tree | ff2c7eb3d841bceb24dc01fa4d8e8c5261f33a5e /OpenSim/Data | |
parent | Changes to the new user system to add the modularity developed for the asset (diff) | |
download | opensim-SC_OLD-c1d680b6c3a5e3dc11cd1e7cc9b74d3d81317eee.zip opensim-SC_OLD-c1d680b6c3a5e3dc11cd1e7cc9b74d3d81317eee.tar.gz opensim-SC_OLD-c1d680b6c3a5e3dc11cd1e7cc9b74d3d81317eee.tar.bz2 opensim-SC_OLD-c1d680b6c3a5e3dc11cd1e7cc9b74d3d81317eee.tar.xz |
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.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLManager.cs | 6 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/002_GridStore.sql | 5 | ||||
-rw-r--r-- | OpenSim/Data/RegionProfileData.cs | 21 | ||||
-rw-r--r-- | OpenSim/Data/RegionProfileServiceProxy.cs | 3 |
4 files changed, 30 insertions, 5 deletions
diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs index ad022a5..139d57f 100644 --- a/OpenSim/Data/MySQL/MySQLManager.cs +++ b/OpenSim/Data/MySQL/MySQLManager.cs | |||
@@ -436,6 +436,7 @@ namespace OpenSim.Data.MySQL | |||
436 | // World Map Addition | 436 | // World Map Addition |
437 | UUID.TryParse((string)reader["regionMapTexture"], out retval.regionMapTextureID); | 437 | UUID.TryParse((string)reader["regionMapTexture"], out retval.regionMapTextureID); |
438 | UUID.TryParse((string)reader["owner_uuid"], out retval.owner_uuid); | 438 | UUID.TryParse((string)reader["owner_uuid"], out retval.owner_uuid); |
439 | retval.maturity = Convert.ToUInt32(reader["access"]); | ||
439 | } | 440 | } |
440 | else | 441 | else |
441 | { | 442 | { |
@@ -976,13 +977,13 @@ namespace OpenSim.Data.MySQL | |||
976 | // 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, | 977 | // 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, |
977 | // as well as the related parameterization | 978 | // as well as the related parameterization |
978 | sql += | 979 | sql += |
979 | "regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort, owner_uuid, originUUID) VALUES "; | 980 | "regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture, serverHttpPort, serverRemotingPort, owner_uuid, originUUID, access) VALUES "; |
980 | 981 | ||
981 | sql += "(?regionHandle, ?regionName, ?uuid, ?regionRecvKey, ?regionSecret, ?regionSendKey, ?regionDataURI, "; | 982 | sql += "(?regionHandle, ?regionName, ?uuid, ?regionRecvKey, ?regionSecret, ?regionSendKey, ?regionDataURI, "; |
982 | sql += | 983 | sql += |
983 | "?serverIP, ?serverPort, ?serverURI, ?locX, ?locY, ?locZ, ?eastOverrideHandle, ?westOverrideHandle, ?southOverrideHandle, ?northOverrideHandle, ?regionAssetURI, ?regionAssetRecvKey, "; | 984 | "?serverIP, ?serverPort, ?serverURI, ?locX, ?locY, ?locZ, ?eastOverrideHandle, ?westOverrideHandle, ?southOverrideHandle, ?northOverrideHandle, ?regionAssetURI, ?regionAssetRecvKey, "; |
984 | sql += | 985 | sql += |
985 | "?regionAssetSendKey, ?regionUserURI, ?regionUserRecvKey, ?regionUserSendKey, ?regionMapTexture, ?serverHttpPort, ?serverRemotingPort, ?owner_uuid, ?originUUID)"; | 986 | "?regionAssetSendKey, ?regionUserURI, ?regionUserRecvKey, ?regionUserSendKey, ?regionMapTexture, ?serverHttpPort, ?serverRemotingPort, ?owner_uuid, ?originUUID, ?access)"; |
986 | 987 | ||
987 | if (GRID_ONLY_UPDATE_NECESSARY_DATA) | 988 | if (GRID_ONLY_UPDATE_NECESSARY_DATA) |
988 | { | 989 | { |
@@ -1023,6 +1024,7 @@ namespace OpenSim.Data.MySQL | |||
1023 | parameters["?serverRemotingPort"] = regiondata.remotingPort.ToString(); | 1024 | parameters["?serverRemotingPort"] = regiondata.remotingPort.ToString(); |
1024 | parameters["?owner_uuid"] = regiondata.owner_uuid.ToString(); | 1025 | parameters["?owner_uuid"] = regiondata.owner_uuid.ToString(); |
1025 | parameters["?originUUID"] = regiondata.originUUID.ToString(); | 1026 | parameters["?originUUID"] = regiondata.originUUID.ToString(); |
1027 | parameters["?access"] = regiondata.maturity.ToString(); | ||
1026 | 1028 | ||
1027 | bool returnval = false; | 1029 | bool returnval = false; |
1028 | 1030 | ||
diff --git a/OpenSim/Data/MySQL/Resources/002_GridStore.sql b/OpenSim/Data/MySQL/Resources/002_GridStore.sql new file mode 100644 index 0000000..bda43d0 --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/002_GridStore.sql | |||
@@ -0,0 +1,5 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE regions add column access integer unsigned default 1; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/RegionProfileData.cs b/OpenSim/Data/RegionProfileData.cs index 8ff2184..ed3ecfc 100644 --- a/OpenSim/Data/RegionProfileData.cs +++ b/OpenSim/Data/RegionProfileData.cs | |||
@@ -131,6 +131,11 @@ namespace OpenSim.Data | |||
131 | /// </summary> | 131 | /// </summary> |
132 | public UUID originUUID; | 132 | public UUID originUUID; |
133 | 133 | ||
134 | /// <summary> | ||
135 | /// The Maturity rating of the region | ||
136 | /// </summary> | ||
137 | public uint maturity; | ||
138 | |||
134 | 139 | ||
135 | //Data Wrappers | 140 | //Data Wrappers |
136 | public string RegionName | 141 | public string RegionName |
@@ -279,6 +284,17 @@ namespace OpenSim.Data | |||
279 | get { return originUUID; } | 284 | get { return originUUID; } |
280 | set { originUUID = value; } | 285 | set { originUUID = value; } |
281 | } | 286 | } |
287 | public uint Maturity | ||
288 | { | ||
289 | get { return maturity; } | ||
290 | set { maturity = value; } | ||
291 | } | ||
292 | |||
293 | public byte AccessLevel | ||
294 | { | ||
295 | get { return Util.ConvertMaturityToAccessLevel(maturity); } | ||
296 | } | ||
297 | |||
282 | 298 | ||
283 | public RegionInfo ToRegionInfo() | 299 | public RegionInfo ToRegionInfo() |
284 | { | 300 | { |
@@ -295,10 +311,10 @@ namespace OpenSim.Data | |||
295 | return Create(regionInfo.RegionID, regionInfo.RegionName, regionInfo.RegionLocX, | 311 | return Create(regionInfo.RegionID, regionInfo.RegionName, regionInfo.RegionLocX, |
296 | regionInfo.RegionLocY, regionInfo.ExternalHostName, | 312 | regionInfo.RegionLocY, regionInfo.ExternalHostName, |
297 | (uint) regionInfo.ExternalEndPoint.Port, regionInfo.HttpPort, regionInfo.RemotingPort, | 313 | (uint) regionInfo.ExternalEndPoint.Port, regionInfo.HttpPort, regionInfo.RemotingPort, |
298 | regionInfo.ServerURI); | 314 | regionInfo.ServerURI, regionInfo.AccessLevel); |
299 | } | 315 | } |
300 | 316 | ||
301 | public static RegionProfileData Create(UUID regionID, string regionName, uint locX, uint locY, string externalHostName, uint regionPort, uint httpPort, uint remotingPort, string serverUri) | 317 | public static RegionProfileData Create(UUID regionID, string regionName, uint locX, uint locY, string externalHostName, uint regionPort, uint httpPort, uint remotingPort, string serverUri, byte access) |
302 | { | 318 | { |
303 | RegionProfileData regionProfile; | 319 | RegionProfileData regionProfile; |
304 | regionProfile = new RegionProfileData(); | 320 | regionProfile = new RegionProfileData(); |
@@ -315,6 +331,7 @@ namespace OpenSim.Data | |||
315 | regionProfile.httpServerURI = "http://" + externalHostName + ":" + httpPort + "/"; | 331 | regionProfile.httpServerURI = "http://" + externalHostName + ":" + httpPort + "/"; |
316 | regionProfile.UUID = regionID; | 332 | regionProfile.UUID = regionID; |
317 | regionProfile.regionName = regionName; | 333 | regionProfile.regionName = regionName; |
334 | regionProfile.maturity = access; | ||
318 | return regionProfile; | 335 | return regionProfile; |
319 | } | 336 | } |
320 | } | 337 | } |
diff --git a/OpenSim/Data/RegionProfileServiceProxy.cs b/OpenSim/Data/RegionProfileServiceProxy.cs index da71936..e9d0036 100644 --- a/OpenSim/Data/RegionProfileServiceProxy.cs +++ b/OpenSim/Data/RegionProfileServiceProxy.cs | |||
@@ -65,8 +65,9 @@ namespace OpenSim.Data | |||
65 | string serverUri = (string)responseData["server_uri"]; | 65 | string serverUri = (string)responseData["server_uri"]; |
66 | UUID regionID = new UUID((string)responseData["region_UUID"]); | 66 | UUID regionID = new UUID((string)responseData["region_UUID"]); |
67 | string regionName = (string)responseData["region_name"]; | 67 | string regionName = (string)responseData["region_name"]; |
68 | byte access = Convert.ToByte((string)responseData["access"]); | ||
68 | 69 | ||
69 | simData = RegionProfileData.Create(regionID, regionName, locX, locY, externalHostName, simPort, httpPort, remotingPort, serverUri); | 70 | simData = RegionProfileData.Create(regionID, regionName, locX, locY, externalHostName, simPort, httpPort, remotingPort, serverUri, access); |
70 | } | 71 | } |
71 | 72 | ||
72 | return simData; | 73 | return simData; |