diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
10 files changed, 137 insertions, 142 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs index ddc3dd7..c72acc3 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveHelpers.cs | |||
@@ -33,7 +33,7 @@ using OpenSim.Framework.Serialization; | |||
33 | using OpenSim.Region.Framework.Scenes; | 33 | using OpenSim.Region.Framework.Scenes; |
34 | 34 | ||
35 | namespace OpenSim.Region.CoreModules.World.Archiver | 35 | namespace OpenSim.Region.CoreModules.World.Archiver |
36 | { | 36 | { |
37 | /// <summary> | 37 | /// <summary> |
38 | /// Helper methods for archive manipulation | 38 | /// Helper methods for archive manipulation |
39 | /// </summary> | 39 | /// </summary> |
@@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
50 | public static string CreateObjectFilename(SceneObjectGroup sog) | 50 | public static string CreateObjectFilename(SceneObjectGroup sog) |
51 | { | 51 | { |
52 | return ArchiveConstants.CreateOarObjectFilename(sog.Name, sog.UUID, sog.AbsolutePosition); | 52 | return ArchiveConstants.CreateOarObjectFilename(sog.Name, sog.UUID, sog.AbsolutePosition); |
53 | } | 53 | } |
54 | 54 | ||
55 | /// <summary> | 55 | /// <summary> |
56 | /// Create the path used to store an object in an OpenSim Archive. | 56 | /// Create the path used to store an object in an OpenSim Archive. |
@@ -62,7 +62,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
62 | public static string CreateObjectPath(SceneObjectGroup sog) | 62 | public static string CreateObjectPath(SceneObjectGroup sog) |
63 | { | 63 | { |
64 | return ArchiveConstants.CreateOarObjectPath(sog.Name, sog.UUID, sog.AbsolutePosition); | 64 | return ArchiveConstants.CreateOarObjectPath(sog.Name, sog.UUID, sog.AbsolutePosition); |
65 | } | 65 | } |
66 | 66 | ||
67 | /// <summary> | 67 | /// <summary> |
68 | /// Resolve path to a working FileStream | 68 | /// Resolve path to a working FileStream |
@@ -123,6 +123,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
123 | 123 | ||
124 | // return new BufferedStream(file, (int) response.ContentLength); | 124 | // return new BufferedStream(file, (int) response.ContentLength); |
125 | return new BufferedStream(file, 1000000); | 125 | return new BufferedStream(file, 1000000); |
126 | } | 126 | } |
127 | } | 127 | } |
128 | } \ No newline at end of file | 128 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index ea71fd9..634685a 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -72,12 +72,12 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
72 | #pragma warning restore 0429 | 72 | #pragma warning restore 0429 |
73 | 73 | ||
74 | /// <value> | 74 | /// <value> |
75 | /// Local land ids at specified region co-ordinates (region size / 4) | 75 | /// Local land ids at specified region co-ordinates (region size / 4) |
76 | /// </value> | 76 | /// </value> |
77 | private readonly int[,] m_landIDList = new int[landArrayMax, landArrayMax]; | 77 | private readonly int[,] m_landIDList = new int[landArrayMax, landArrayMax]; |
78 | 78 | ||
79 | /// <value> | 79 | /// <value> |
80 | /// Land objects keyed by local id | 80 | /// Land objects keyed by local id |
81 | /// </value> | 81 | /// </value> |
82 | private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>(); | 82 | private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>(); |
83 | 83 | ||
@@ -92,8 +92,8 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
92 | 92 | ||
93 | #region INonSharedRegionModule Members | 93 | #region INonSharedRegionModule Members |
94 | 94 | ||
95 | public Type ReplaceableInterface | 95 | public Type ReplaceableInterface |
96 | { | 96 | { |
97 | get { return null; } | 97 | get { return null; } |
98 | } | 98 | } |
99 | 99 | ||
@@ -192,7 +192,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
192 | Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); | 192 | Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); |
193 | forcedPosition = null; | 193 | forcedPosition = null; |
194 | } | 194 | } |
195 | //if we are far away, teleport | 195 | //if we are far away, teleport |
196 | else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) > 3) | 196 | else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) > 3) |
197 | { | 197 | { |
198 | Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); | 198 | Debug.WriteLine(string.Format("Teleporting out because {0} is too far from avatar position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition)); |
@@ -321,8 +321,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
321 | } | 321 | } |
322 | } | 322 | } |
323 | 323 | ||
324 | |||
325 | |||
326 | private void ForceAvatarToPosition(ScenePresence avatar, Vector3? position) | 324 | private void ForceAvatarToPosition(ScenePresence avatar, Vector3? position) |
327 | { | 325 | { |
328 | if (m_scene.Permissions.IsGod(avatar.UUID)) return; | 326 | if (m_scene.Permissions.IsGod(avatar.UUID)) return; |
@@ -336,7 +334,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
336 | { | 334 | { |
337 | avatar.ControllingClient.SendAlertMessage( | 335 | avatar.ControllingClient.SendAlertMessage( |
338 | "You are not allowed on this parcel because the land owner has restricted access."); | 336 | "You are not allowed on this parcel because the land owner has restricted access."); |
339 | |||
340 | } | 337 | } |
341 | 338 | ||
342 | public void EventManagerOnAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID) | 339 | public void EventManagerOnAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID) |
@@ -448,7 +445,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
448 | if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && | 445 | if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT && |
449 | clientAvatar.sentMessageAboutRestrictedParcelFlyingDown) | 446 | clientAvatar.sentMessageAboutRestrictedParcelFlyingDown) |
450 | { | 447 | { |
451 | EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID, | 448 | EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID, |
452 | m_scene.RegionInfo.RegionID); | 449 | m_scene.RegionInfo.RegionID); |
453 | //They are going under the safety line! | 450 | //They are going under the safety line! |
454 | if (!parcel.IsBannedFromLand(clientAvatar.UUID)) | 451 | if (!parcel.IsBannedFromLand(clientAvatar.UUID)) |
@@ -652,7 +649,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
652 | 649 | ||
653 | if (x_float > Constants.RegionSize || x_float <= 0 || y_float > Constants.RegionSize || y_float <= 0) | 650 | if (x_float > Constants.RegionSize || x_float <= 0 || y_float > Constants.RegionSize || y_float <= 0) |
654 | return null; | 651 | return null; |
655 | 652 | ||
656 | try | 653 | try |
657 | { | 654 | { |
658 | x = Convert.ToInt32(Math.Floor(Convert.ToDouble(x_float) / 4.0)); | 655 | x = Convert.ToInt32(Math.Floor(Convert.ToDouble(x_float) / 4.0)); |
@@ -667,7 +664,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
667 | { | 664 | { |
668 | return null; | 665 | return null; |
669 | } | 666 | } |
670 | 667 | ||
671 | lock (m_landList) | 668 | lock (m_landList) |
672 | { | 669 | { |
673 | // Corner case. If an autoreturn happens during sim startup | 670 | // Corner case. If an autoreturn happens during sim startup |
@@ -687,7 +684,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
687 | // they happen every time at border crossings | 684 | // they happen every time at border crossings |
688 | throw new Exception("Error: Parcel not found at point " + x + ", " + y); | 685 | throw new Exception("Error: Parcel not found at point " + x + ", " + y); |
689 | } | 686 | } |
690 | 687 | ||
691 | lock (m_landIDList) | 688 | lock (m_landIDList) |
692 | { | 689 | { |
693 | try | 690 | try |
@@ -741,7 +738,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
741 | 738 | ||
742 | public void EventManagerOnObjectBeingRemovedFromScene(SceneObjectGroup obj) | 739 | public void EventManagerOnObjectBeingRemovedFromScene(SceneObjectGroup obj) |
743 | { | 740 | { |
744 | |||
745 | lock (m_landList) | 741 | lock (m_landList) |
746 | { | 742 | { |
747 | foreach (LandObject p in m_landList.Values) | 743 | foreach (LandObject p in m_landList.Values) |
@@ -936,7 +932,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
936 | return; | 932 | return; |
937 | } | 933 | } |
938 | } | 934 | } |
939 | 935 | ||
940 | lock (m_landList) | 936 | lock (m_landList) |
941 | { | 937 | { |
942 | foreach (ILandObject slaveLandObject in selectedLandObjects) | 938 | foreach (ILandObject slaveLandObject in selectedLandObjects) |
@@ -1078,7 +1074,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1078 | temp.Add(currentParcel); | 1074 | temp.Add(currentParcel); |
1079 | } | 1075 | } |
1080 | } | 1076 | } |
1081 | |||
1082 | } | 1077 | } |
1083 | } | 1078 | } |
1084 | 1079 | ||
@@ -1121,7 +1116,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1121 | join(west, south, east, north, remote_client.AgentId); | 1116 | join(west, south, east, north, remote_client.AgentId); |
1122 | } | 1117 | } |
1123 | 1118 | ||
1124 | public void ClientOnParcelSelectObjects(int local_id, int request_type, | 1119 | public void ClientOnParcelSelectObjects(int local_id, int request_type, |
1125 | List<UUID> returnIDs, IClientAPI remote_client) | 1120 | List<UUID> returnIDs, IClientAPI remote_client) |
1126 | { | 1121 | { |
1127 | m_landList[local_id].SendForceObjectSelect(local_id, request_type, returnIDs, remote_client); | 1122 | m_landList[local_id].SendForceObjectSelect(local_id, request_type, returnIDs, remote_client); |
@@ -1358,31 +1353,31 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1358 | { | 1353 | { |
1359 | return RemoteParcelRequest(request, path, param, agentID, caps); | 1354 | return RemoteParcelRequest(request, path, param, agentID, caps); |
1360 | })); | 1355 | })); |
1361 | UUID parcelCapID = UUID.Random(); | 1356 | UUID parcelCapID = UUID.Random(); |
1362 | caps.RegisterHandler("ParcelPropertiesUpdate", | 1357 | caps.RegisterHandler("ParcelPropertiesUpdate", |
1363 | new RestStreamHandler("POST", "/CAPS/" + parcelCapID, | 1358 | new RestStreamHandler("POST", "/CAPS/" + parcelCapID, |
1364 | delegate(string request, string path, string param, | 1359 | delegate(string request, string path, string param, |
1365 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 1360 | OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
1366 | { | 1361 | { |
1367 | return ProcessPropertiesUpdate(request, path, param, agentID, caps); | 1362 | return ProcessPropertiesUpdate(request, path, param, agentID, caps); |
1368 | })); | 1363 | })); |
1369 | } | 1364 | } |
1370 | private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps) | 1365 | private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps) |
1371 | { | 1366 | { |
1372 | IClientAPI client; | 1367 | IClientAPI client; |
1373 | if ( ! m_scene.TryGetClient(agentID, out client) ) { | 1368 | if (! m_scene.TryGetClient(agentID, out client)) { |
1374 | m_log.WarnFormat("[LAND] unable to retrieve IClientAPI for {0}", agentID.ToString() ); | 1369 | m_log.WarnFormat("[LAND] unable to retrieve IClientAPI for {0}", agentID.ToString()); |
1375 | return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); | 1370 | return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); |
1376 | } | 1371 | } |
1377 | 1372 | ||
1378 | ParcelPropertiesUpdateMessage properties = new ParcelPropertiesUpdateMessage(); | 1373 | ParcelPropertiesUpdateMessage properties = new ParcelPropertiesUpdateMessage(); |
1379 | OpenMetaverse.StructuredData.OSDMap args = (OpenMetaverse.StructuredData.OSDMap) OSDParser.DeserializeLLSDXml(request); | 1374 | OpenMetaverse.StructuredData.OSDMap args = (OpenMetaverse.StructuredData.OSDMap) OSDParser.DeserializeLLSDXml(request); |
1380 | 1375 | ||
1381 | properties.Deserialize(args); | 1376 | properties.Deserialize(args); |
1382 | 1377 | ||
1383 | LandUpdateArgs land_update = new LandUpdateArgs(); | 1378 | LandUpdateArgs land_update = new LandUpdateArgs(); |
1384 | int parcelID = properties.LocalID; | 1379 | int parcelID = properties.LocalID; |
1385 | land_update.AuthBuyerID = properties.AuthBuyerID; | 1380 | land_update.AuthBuyerID = properties.AuthBuyerID; |
1386 | land_update.Category = properties.Category; | 1381 | land_update.Category = properties.Category; |
1387 | land_update.Desc = properties.Desc; | 1382 | land_update.Desc = properties.Desc; |
1388 | land_update.GroupID = properties.GroupID; | 1383 | land_update.GroupID = properties.GroupID; |
@@ -1399,15 +1394,15 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1399 | land_update.SnapshotID = properties.SnapshotID; | 1394 | land_update.SnapshotID = properties.SnapshotID; |
1400 | land_update.UserLocation = properties.UserLocation; | 1395 | land_update.UserLocation = properties.UserLocation; |
1401 | land_update.UserLookAt = properties.UserLookAt; | 1396 | land_update.UserLookAt = properties.UserLookAt; |
1402 | land_update.MediaDescription = properties.MediaDesc; | 1397 | land_update.MediaDescription = properties.MediaDesc; |
1403 | land_update.MediaType = properties.MediaType; | 1398 | land_update.MediaType = properties.MediaType; |
1404 | land_update.MediaWidth = properties.MediaWidth; | 1399 | land_update.MediaWidth = properties.MediaWidth; |
1405 | land_update.MediaHeight = properties.MediaHeight; | 1400 | land_update.MediaHeight = properties.MediaHeight; |
1406 | land_update.MediaLoop = properties.MediaLoop; | 1401 | land_update.MediaLoop = properties.MediaLoop; |
1407 | land_update.ObscureMusic = properties.ObscureMusic; | 1402 | land_update.ObscureMusic = properties.ObscureMusic; |
1408 | land_update.ObscureMedia = properties.ObscureMedia; | 1403 | land_update.ObscureMedia = properties.ObscureMedia; |
1409 | 1404 | ||
1410 | ILandObject land; | 1405 | ILandObject land; |
1411 | lock (m_landList) | 1406 | lock (m_landList) |
1412 | { | 1407 | { |
1413 | m_landList.TryGetValue(parcelID, out land); | 1408 | m_landList.TryGetValue(parcelID, out land); |
@@ -1415,15 +1410,15 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1415 | 1410 | ||
1416 | if (land != null) | 1411 | if (land != null) |
1417 | { | 1412 | { |
1418 | land.UpdateLandProperties(land_update, client); | 1413 | land.UpdateLandProperties(land_update, client); |
1419 | m_scene.EventManager.TriggerOnParcelPropertiesUpdateRequest(land_update, parcelID, client); | 1414 | m_scene.EventManager.TriggerOnParcelPropertiesUpdateRequest(land_update, parcelID, client); |
1420 | } | 1415 | } |
1421 | else | 1416 | else |
1422 | { | 1417 | { |
1423 | m_log.WarnFormat("[LAND] unable to find parcelID {0}", parcelID); | 1418 | m_log.WarnFormat("[LAND] unable to find parcelID {0}", parcelID); |
1424 | } | 1419 | } |
1425 | return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); | 1420 | return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty()); |
1426 | } | 1421 | } |
1427 | // we cheat here: As we don't have (and want) a grid-global parcel-store, we can't return the | 1422 | // we cheat here: As we don't have (and want) a grid-global parcel-store, we can't return the |
1428 | // "real" parcelID, because we wouldn't be able to map that to the region the parcel belongs to. | 1423 | // "real" parcelID, because we wouldn't be able to map that to the region the parcel belongs to. |
1429 | // So, we create a "fake" parcelID by using the regionHandle (64 bit), and the local (integer) x | 1424 | // So, we create a "fake" parcelID by using the regionHandle (64 bit), and the local (integer) x |
@@ -1500,19 +1495,19 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1500 | if (parcelID == UUID.Zero) | 1495 | if (parcelID == UUID.Zero) |
1501 | return; | 1496 | return; |
1502 | 1497 | ||
1503 | ExtendedLandData data = | 1498 | ExtendedLandData data = |
1504 | (ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(), | 1499 | (ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(), |
1505 | delegate(string id) | 1500 | delegate(string id) |
1506 | { | 1501 | { |
1507 | UUID parcel = UUID.Zero; | 1502 | UUID parcel = UUID.Zero; |
1508 | UUID.TryParse(id, out parcel); | 1503 | UUID.TryParse(id, out parcel); |
1509 | // assume we've got the parcelID we just computed in RemoteParcelRequest | 1504 | // assume we've got the parcelID we just computed in RemoteParcelRequest |
1510 | ExtendedLandData extLandData = new ExtendedLandData(); | 1505 | ExtendedLandData extLandData = new ExtendedLandData(); |
1511 | Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle, | 1506 | Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle, |
1512 | out extLandData.X, out extLandData.Y); | 1507 | out extLandData.X, out extLandData.Y); |
1513 | m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}", | 1508 | m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}", |
1514 | extLandData.RegionHandle, extLandData.X, extLandData.Y); | 1509 | extLandData.RegionHandle, extLandData.X, extLandData.Y); |
1515 | 1510 | ||
1516 | // for this region or for somewhere else? | 1511 | // for this region or for somewhere else? |
1517 | if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle) | 1512 | if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle) |
1518 | { | 1513 | { |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 499b60c..d87352f 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -229,13 +229,13 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
229 | newData.SnapshotID = args.SnapshotID; | 229 | newData.SnapshotID = args.SnapshotID; |
230 | newData.UserLocation = args.UserLocation; | 230 | newData.UserLocation = args.UserLocation; |
231 | newData.UserLookAt = args.UserLookAt; | 231 | newData.UserLookAt = args.UserLookAt; |
232 | newData.MediaType = args.MediaType; | 232 | newData.MediaType = args.MediaType; |
233 | newData.MediaDescription = args.MediaDescription; | 233 | newData.MediaDescription = args.MediaDescription; |
234 | newData.MediaWidth = args.MediaWidth; | 234 | newData.MediaWidth = args.MediaWidth; |
235 | newData.MediaHeight = args.MediaHeight; | 235 | newData.MediaHeight = args.MediaHeight; |
236 | newData.MediaLoop = args.MediaLoop; | 236 | newData.MediaLoop = args.MediaLoop; |
237 | newData.ObscureMusic = args.ObscureMusic; | 237 | newData.ObscureMusic = args.ObscureMusic; |
238 | newData.ObscureMedia = args.ObscureMedia; | 238 | newData.ObscureMedia = args.ObscureMedia; |
239 | 239 | ||
240 | m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); | 240 | m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData); |
241 | 241 | ||
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs index 82ad109..7c5d044 100644 --- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs +++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs | |||
@@ -54,11 +54,11 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
54 | { | 54 | { |
55 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MoapModule")] | 55 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MoapModule")] |
56 | public class MoapModule : INonSharedRegionModule, IMoapModule | 56 | public class MoapModule : INonSharedRegionModule, IMoapModule |
57 | { | 57 | { |
58 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 58 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
59 | 59 | ||
60 | public string Name { get { return "MoapModule"; } } | 60 | public string Name { get { return "MoapModule"; } } |
61 | public Type ReplaceableInterface { get { return null; } } | 61 | public Type ReplaceableInterface { get { return null; } } |
62 | 62 | ||
63 | /// <summary> | 63 | /// <summary> |
64 | /// Is this module enabled? | 64 | /// Is this module enabled? |
@@ -78,17 +78,17 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
78 | /// <summary> | 78 | /// <summary> |
79 | /// Track the ObjectMedia capabilities given to users keyed by agent. Lock m_omCapUsers to manipulate. | 79 | /// Track the ObjectMedia capabilities given to users keyed by agent. Lock m_omCapUsers to manipulate. |
80 | /// </summary> | 80 | /// </summary> |
81 | protected Dictionary<UUID, string> m_omCapUrls = new Dictionary<UUID, string>(); | 81 | protected Dictionary<UUID, string> m_omCapUrls = new Dictionary<UUID, string>(); |
82 | 82 | ||
83 | /// <summary> | 83 | /// <summary> |
84 | /// Track the ObjectMediaUpdate capabilities given to users keyed by path | 84 | /// Track the ObjectMediaUpdate capabilities given to users keyed by path |
85 | /// </summary> | 85 | /// </summary> |
86 | protected Dictionary<string, UUID> m_omuCapUsers = new Dictionary<string, UUID>(); | 86 | protected Dictionary<string, UUID> m_omuCapUsers = new Dictionary<string, UUID>(); |
87 | 87 | ||
88 | /// <summary> | 88 | /// <summary> |
89 | /// Track the ObjectMediaUpdate capabilities given to users keyed by agent. Lock m_omuCapUsers to manipulate | 89 | /// Track the ObjectMediaUpdate capabilities given to users keyed by agent. Lock m_omuCapUsers to manipulate |
90 | /// </summary> | 90 | /// </summary> |
91 | protected Dictionary<UUID, string> m_omuCapUrls = new Dictionary<UUID, string>(); | 91 | protected Dictionary<UUID, string> m_omuCapUrls = new Dictionary<UUID, string>(); |
92 | 92 | ||
93 | public void Initialise(IConfigSource configSource) | 93 | public void Initialise(IConfigSource configSource) |
94 | { | 94 | { |
@@ -129,7 +129,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
129 | m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps; | 129 | m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps; |
130 | m_scene.EventManager.OnDeregisterCaps -= OnDeregisterCaps; | 130 | m_scene.EventManager.OnDeregisterCaps -= OnDeregisterCaps; |
131 | m_scene.EventManager.OnSceneObjectPartCopy -= OnSceneObjectPartCopy; | 131 | m_scene.EventManager.OnSceneObjectPartCopy -= OnSceneObjectPartCopy; |
132 | } | 132 | } |
133 | 133 | ||
134 | public void OnRegisterCaps(UUID agentID, Caps caps) | 134 | public void OnRegisterCaps(UUID agentID, Caps caps) |
135 | { | 135 | { |
@@ -159,7 +159,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
159 | caps.RegisterHandler( | 159 | caps.RegisterHandler( |
160 | "ObjectMediaNavigate", new RestStreamHandler("POST", omuCapUrl, HandleObjectMediaNavigateMessage)); | 160 | "ObjectMediaNavigate", new RestStreamHandler("POST", omuCapUrl, HandleObjectMediaNavigateMessage)); |
161 | } | 161 | } |
162 | } | 162 | } |
163 | 163 | ||
164 | public void OnDeregisterCaps(UUID agentID, Caps caps) | 164 | public void OnDeregisterCaps(UUID agentID, Caps caps) |
165 | { | 165 | { |
@@ -179,7 +179,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
179 | } | 179 | } |
180 | 180 | ||
181 | protected void OnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed) | 181 | protected void OnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed) |
182 | { | 182 | { |
183 | if (original.Shape.Media != null) | 183 | if (original.Shape.Media != null) |
184 | { | 184 | { |
185 | PrimitiveBaseShape.MediaList dupeMedia = new PrimitiveBaseShape.MediaList(); | 185 | PrimitiveBaseShape.MediaList dupeMedia = new PrimitiveBaseShape.MediaList(); |
@@ -195,7 +195,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
195 | } | 195 | } |
196 | 196 | ||
197 | copy.Shape.Media = dupeMedia; | 197 | copy.Shape.Media = dupeMedia; |
198 | } | 198 | } |
199 | } | 199 | } |
200 | 200 | ||
201 | public MediaEntry GetMediaEntry(SceneObjectPart part, int face) | 201 | public MediaEntry GetMediaEntry(SceneObjectPart part, int face) |
@@ -211,9 +211,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
211 | me = null; | 211 | me = null; |
212 | } | 212 | } |
213 | else | 213 | else |
214 | { | 214 | { |
215 | lock (media) | 215 | lock (media) |
216 | me = media[face]; | 216 | me = media[face]; |
217 | 217 | ||
218 | // TODO: Really need a proper copy constructor down in libopenmetaverse | 218 | // TODO: Really need a proper copy constructor down in libopenmetaverse |
219 | if (me != null) | 219 | if (me != null) |
@@ -227,17 +227,17 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
227 | 227 | ||
228 | public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me) | 228 | public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me) |
229 | { | 229 | { |
230 | CheckFaceParam(part, face); | 230 | CheckFaceParam(part, face); |
231 | 231 | ||
232 | if (null == part.Shape.Media) | 232 | if (null == part.Shape.Media) |
233 | part.Shape.Media = new PrimitiveBaseShape.MediaList(new MediaEntry[part.GetNumberOfSides()]); | 233 | part.Shape.Media = new PrimitiveBaseShape.MediaList(new MediaEntry[part.GetNumberOfSides()]); |
234 | 234 | ||
235 | lock (part.Shape.Media) | 235 | lock (part.Shape.Media) |
236 | part.Shape.Media[face] = me; | 236 | part.Shape.Media[face] = me; |
237 | 237 | ||
238 | UpdateMediaUrl(part, UUID.Zero); | 238 | UpdateMediaUrl(part, UUID.Zero); |
239 | part.ScheduleFullUpdate(); | 239 | part.ScheduleFullUpdate(); |
240 | part.TriggerScriptChangedEvent(Changed.MEDIA); | 240 | part.TriggerScriptChangedEvent(Changed.MEDIA); |
241 | } | 241 | } |
242 | 242 | ||
243 | public void ClearMediaEntry(SceneObjectPart part, int face) | 243 | public void ClearMediaEntry(SceneObjectPart part, int face) |
@@ -256,7 +256,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
256 | /// <returns></returns> | 256 | /// <returns></returns> |
257 | protected string HandleObjectMediaMessage( | 257 | protected string HandleObjectMediaMessage( |
258 | string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 258 | string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
259 | { | 259 | { |
260 | // m_log.DebugFormat("[MOAP]: Got ObjectMedia path [{0}], raw request [{1}]", path, request); | 260 | // m_log.DebugFormat("[MOAP]: Got ObjectMedia path [{0}], raw request [{1}]", path, request); |
261 | 261 | ||
262 | OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request); | 262 | OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request); |
@@ -266,12 +266,12 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
266 | if (omm.Request is ObjectMediaRequest) | 266 | if (omm.Request is ObjectMediaRequest) |
267 | return HandleObjectMediaRequest(omm.Request as ObjectMediaRequest); | 267 | return HandleObjectMediaRequest(omm.Request as ObjectMediaRequest); |
268 | else if (omm.Request is ObjectMediaUpdate) | 268 | else if (omm.Request is ObjectMediaUpdate) |
269 | return HandleObjectMediaUpdate(path, omm.Request as ObjectMediaUpdate); | 269 | return HandleObjectMediaUpdate(path, omm.Request as ObjectMediaUpdate); |
270 | 270 | ||
271 | throw new Exception( | 271 | throw new Exception( |
272 | string.Format( | 272 | string.Format( |
273 | "[MOAP]: ObjectMediaMessage has unrecognized ObjectMediaBlock of {0}", | 273 | "[MOAP]: ObjectMediaMessage has unrecognized ObjectMediaBlock of {0}", |
274 | omm.Request.GetType())); | 274 | omm.Request.GetType())); |
275 | } | 275 | } |
276 | 276 | ||
277 | /// <summary> | 277 | /// <summary> |
@@ -279,7 +279,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
279 | /// </summary> | 279 | /// </summary> |
280 | /// <param name="omr"></param> | 280 | /// <param name="omr"></param> |
281 | /// <returns></returns> | 281 | /// <returns></returns> |
282 | protected string HandleObjectMediaRequest(ObjectMediaRequest omr) | 282 | protected string HandleObjectMediaRequest(ObjectMediaRequest omr) |
283 | { | 283 | { |
284 | UUID primId = omr.PrimID; | 284 | UUID primId = omr.PrimID; |
285 | 285 | ||
@@ -318,7 +318,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
318 | /// <param name="path">Path on which this request was made</param> | 318 | /// <param name="path">Path on which this request was made</param> |
319 | /// <param name="omu">/param> | 319 | /// <param name="omu">/param> |
320 | /// <returns></returns> | 320 | /// <returns></returns> |
321 | protected string HandleObjectMediaUpdate(string path, ObjectMediaUpdate omu) | 321 | protected string HandleObjectMediaUpdate(string path, ObjectMediaUpdate omu) |
322 | { | 322 | { |
323 | UUID primId = omu.PrimID; | 323 | UUID primId = omu.PrimID; |
324 | 324 | ||
@@ -330,9 +330,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
330 | "[MOAP]: Received an UPDATE ObjectMediaRequest for prim {0} but this doesn't exist in region {1}", | 330 | "[MOAP]: Received an UPDATE ObjectMediaRequest for prim {0} but this doesn't exist in region {1}", |
331 | primId, m_scene.RegionInfo.RegionName); | 331 | primId, m_scene.RegionInfo.RegionName); |
332 | return string.Empty; | 332 | return string.Empty; |
333 | } | 333 | } |
334 | 334 | ||
335 | // m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId); | 335 | // m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId); |
336 | 336 | ||
337 | // for (int i = 0; i < omu.FaceMedia.Length; i++) | 337 | // for (int i = 0; i < omu.FaceMedia.Length; i++) |
338 | // { | 338 | // { |
@@ -374,14 +374,14 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
374 | part.Shape.Textures = te; | 374 | part.Shape.Textures = te; |
375 | // m_log.DebugFormat( | 375 | // m_log.DebugFormat( |
376 | // "[MOAP]: Media flags for face {0} is {1}", | 376 | // "[MOAP]: Media flags for face {0} is {1}", |
377 | // i, part.Shape.Textures.FaceTextures[i].MediaFlags); | 377 | // i, part.Shape.Textures.FaceTextures[i].MediaFlags); |
378 | } | 378 | } |
379 | } | 379 | } |
380 | } | 380 | } |
381 | else | 381 | else |
382 | { | 382 | { |
383 | // We need to go through the media textures one at a time to make sure that we have permission | 383 | // We need to go through the media textures one at a time to make sure that we have permission |
384 | // to change them | 384 | // to change them |
385 | 385 | ||
386 | // FIXME: Race condition here since some other texture entry manipulator may overwrite/get | 386 | // FIXME: Race condition here since some other texture entry manipulator may overwrite/get |
387 | // overwritten. Unfortunately, PrimitiveBaseShape does not allow us to change texture entry | 387 | // overwritten. Unfortunately, PrimitiveBaseShape does not allow us to change texture entry |
@@ -391,18 +391,18 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
391 | lock (media) | 391 | lock (media) |
392 | { | 392 | { |
393 | for (int i = 0; i < media.Count; i++) | 393 | for (int i = 0; i < media.Count; i++) |
394 | { | 394 | { |
395 | if (m_scene.Permissions.CanControlPrimMedia(agentId, part.UUID, i)) | 395 | if (m_scene.Permissions.CanControlPrimMedia(agentId, part.UUID, i)) |
396 | { | 396 | { |
397 | media[i] = omu.FaceMedia[i]; | 397 | media[i] = omu.FaceMedia[i]; |
398 | 398 | ||
399 | // When a face is cleared this is done by setting the MediaFlags in the TextureEntry via a normal | 399 | // When a face is cleared this is done by setting the MediaFlags in the TextureEntry via a normal |
400 | // texture update, so we don't need to worry about clearing MediaFlags here. | 400 | // texture update, so we don't need to worry about clearing MediaFlags here. |
401 | if (null == media[i]) | 401 | if (null == media[i]) |
402 | continue; | 402 | continue; |
403 | 403 | ||
404 | Primitive.TextureEntryFace face = te.CreateFace((uint)i); | 404 | Primitive.TextureEntryFace face = te.CreateFace((uint)i); |
405 | face.MediaFlags = true; | 405 | face.MediaFlags = true; |
406 | 406 | ||
407 | // m_log.DebugFormat( | 407 | // m_log.DebugFormat( |
408 | // "[MOAP]: Media flags for face {0} is {1}", | 408 | // "[MOAP]: Media flags for face {0} is {1}", |
@@ -414,11 +414,11 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
414 | 414 | ||
415 | part.Shape.Textures = te; | 415 | part.Shape.Textures = te; |
416 | 416 | ||
417 | // for (int i2 = 0; i2 < part.Shape.Textures.FaceTextures.Length; i2++) | 417 | // for (int i2 = 0; i2 < part.Shape.Textures.FaceTextures.Length; i2++) |
418 | // m_log.DebugFormat("[MOAP]: FaceTexture[{0}] is {1}", i2, part.Shape.Textures.FaceTextures[i2]); | 418 | // m_log.DebugFormat("[MOAP]: FaceTexture[{0}] is {1}", i2, part.Shape.Textures.FaceTextures[i2]); |
419 | } | 419 | } |
420 | 420 | ||
421 | UpdateMediaUrl(part, agentId); | 421 | UpdateMediaUrl(part, agentId); |
422 | 422 | ||
423 | // Arguably, we could avoid sending a full update to the avatar that just changed the texture. | 423 | // Arguably, we could avoid sending a full update to the avatar that just changed the texture. |
424 | part.ScheduleFullUpdate(); | 424 | part.ScheduleFullUpdate(); |
@@ -439,16 +439,16 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
439 | /// <returns></returns> | 439 | /// <returns></returns> |
440 | protected string HandleObjectMediaNavigateMessage( | 440 | protected string HandleObjectMediaNavigateMessage( |
441 | string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) | 441 | string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) |
442 | { | 442 | { |
443 | // m_log.DebugFormat("[MOAP]: Got ObjectMediaNavigate request [{0}]", request); | 443 | // m_log.DebugFormat("[MOAP]: Got ObjectMediaNavigate request [{0}]", request); |
444 | 444 | ||
445 | OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request); | 445 | OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request); |
446 | ObjectMediaNavigateMessage omn = new ObjectMediaNavigateMessage(); | 446 | ObjectMediaNavigateMessage omn = new ObjectMediaNavigateMessage(); |
447 | omn.Deserialize(osd); | 447 | omn.Deserialize(osd); |
448 | 448 | ||
449 | UUID primId = omn.PrimID; | 449 | UUID primId = omn.PrimID; |
450 | 450 | ||
451 | SceneObjectPart part = m_scene.GetSceneObjectPart(primId); | 451 | SceneObjectPart part = m_scene.GetSceneObjectPart(primId); |
452 | 452 | ||
453 | if (null == part) | 453 | if (null == part) |
454 | { | 454 | { |
@@ -456,12 +456,12 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
456 | "[MOAP]: Received an ObjectMediaNavigateMessage for prim {0} but this doesn't exist in region {1}", | 456 | "[MOAP]: Received an ObjectMediaNavigateMessage for prim {0} but this doesn't exist in region {1}", |
457 | primId, m_scene.RegionInfo.RegionName); | 457 | primId, m_scene.RegionInfo.RegionName); |
458 | return string.Empty; | 458 | return string.Empty; |
459 | } | 459 | } |
460 | 460 | ||
461 | UUID agentId = default(UUID); | 461 | UUID agentId = default(UUID); |
462 | 462 | ||
463 | lock (m_omuCapUsers) | 463 | lock (m_omuCapUsers) |
464 | agentId = m_omuCapUsers[path]; | 464 | agentId = m_omuCapUsers[path]; |
465 | 465 | ||
466 | if (!m_scene.Permissions.CanInteractWithPrimMedia(agentId, part.UUID, omn.Face)) | 466 | if (!m_scene.Permissions.CanInteractWithPrimMedia(agentId, part.UUID, omn.Face)) |
467 | return string.Empty; | 467 | return string.Empty; |
@@ -484,7 +484,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
484 | return string.Empty; | 484 | return string.Empty; |
485 | 485 | ||
486 | if (me.EnableWhiteList) | 486 | if (me.EnableWhiteList) |
487 | { | 487 | { |
488 | if (!CheckUrlAgainstWhitelist(omn.URL, me.WhiteList)) | 488 | if (!CheckUrlAgainstWhitelist(omn.URL, me.WhiteList)) |
489 | { | 489 | { |
490 | // m_log.DebugFormat( | 490 | // m_log.DebugFormat( |
@@ -493,18 +493,18 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
493 | 493 | ||
494 | return string.Empty; | 494 | return string.Empty; |
495 | } | 495 | } |
496 | } | 496 | } |
497 | 497 | ||
498 | me.CurrentURL = omn.URL; | 498 | me.CurrentURL = omn.URL; |
499 | 499 | ||
500 | UpdateMediaUrl(part, agentId); | 500 | UpdateMediaUrl(part, agentId); |
501 | 501 | ||
502 | part.ScheduleFullUpdate(); | 502 | part.ScheduleFullUpdate(); |
503 | 503 | ||
504 | part.TriggerScriptChangedEvent(Changed.MEDIA); | 504 | part.TriggerScriptChangedEvent(Changed.MEDIA); |
505 | 505 | ||
506 | return OSDParser.SerializeLLSDXmlString(new OSD()); | 506 | return OSDParser.SerializeLLSDXmlString(new OSD()); |
507 | } | 507 | } |
508 | 508 | ||
509 | /// <summary> | 509 | /// <summary> |
510 | /// Check that the face number is valid for the given prim. | 510 | /// Check that the face number is valid for the given prim. |
@@ -519,7 +519,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
519 | int maxFaces = part.GetNumberOfSides() - 1; | 519 | int maxFaces = part.GetNumberOfSides() - 1; |
520 | if (face > maxFaces) | 520 | if (face > maxFaces) |
521 | throw new ArgumentException( | 521 | throw new ArgumentException( |
522 | string.Format("Face argument was {0} but max is {1}", face, maxFaces)); | 522 | string.Format("Face argument was {0} but max is {1}", face, maxFaces)); |
523 | } | 523 | } |
524 | 524 | ||
525 | /// <summary> | 525 | /// <summary> |
@@ -542,9 +542,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
542 | string rawVersion = part.MediaUrl.Substring(5, 10); | 542 | string rawVersion = part.MediaUrl.Substring(5, 10); |
543 | int version = int.Parse(rawVersion); | 543 | int version = int.Parse(rawVersion); |
544 | part.MediaUrl = string.Format("x-mv:{0:D10}/{1}", ++version, updateId); | 544 | part.MediaUrl = string.Format("x-mv:{0:D10}/{1}", ++version, updateId); |
545 | } | 545 | } |
546 | 546 | ||
547 | // m_log.DebugFormat("[MOAP]: Storing media url [{0}] in prim {1} {2}", part.MediaUrl, part.Name, part.UUID); | 547 | // m_log.DebugFormat("[MOAP]: Storing media url [{0}] in prim {1} {2}", part.MediaUrl, part.Name, part.UUID); |
548 | } | 548 | } |
549 | 549 | ||
550 | /// <summary> | 550 | /// <summary> |
@@ -554,7 +554,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
554 | /// <param name="whitelist"></param> | 554 | /// <param name="whitelist"></param> |
555 | /// <returns>true if the url matches an entry on the whitelist, false otherwise</returns> | 555 | /// <returns>true if the url matches an entry on the whitelist, false otherwise</returns> |
556 | protected bool CheckUrlAgainstWhitelist(string rawUrl, string[] whitelist) | 556 | protected bool CheckUrlAgainstWhitelist(string rawUrl, string[] whitelist) |
557 | { | 557 | { |
558 | Uri url = new Uri(rawUrl); | 558 | Uri url = new Uri(rawUrl); |
559 | 559 | ||
560 | foreach (string origWlUrl in whitelist) | 560 | foreach (string origWlUrl in whitelist) |
@@ -575,7 +575,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
575 | if (url.Host.Contains(wlUrl)) | 575 | if (url.Host.Contains(wlUrl)) |
576 | { | 576 | { |
577 | // m_log.DebugFormat("[MOAP]: Whitelist URL {0} matches {1}", origWlUrl, rawUrl); | 577 | // m_log.DebugFormat("[MOAP]: Whitelist URL {0} matches {1}", origWlUrl, rawUrl); |
578 | return true; | 578 | return true; |
579 | } | 579 | } |
580 | } | 580 | } |
581 | else | 581 | else |
@@ -588,7 +588,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap | |||
588 | return true; | 588 | return true; |
589 | } | 589 | } |
590 | } | 590 | } |
591 | } | 591 | } |
592 | 592 | ||
593 | return false; | 593 | return false; |
594 | } | 594 | } |
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs index 12750c5..db50339 100644 --- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | |||
@@ -49,8 +49,8 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
49 | protected Scene m_scene = null; | 49 | protected Scene m_scene = null; |
50 | protected IDialogModule m_dialogModule; | 50 | protected IDialogModule m_dialogModule; |
51 | 51 | ||
52 | public string Name { get { return "Object BuySell Module"; } } | 52 | public string Name { get { return "Object BuySell Module"; } } |
53 | public Type ReplaceableInterface { get { return null; } } | 53 | public Type ReplaceableInterface { get { return null; } } |
54 | 54 | ||
55 | public void Initialise(IConfigSource source) {} | 55 | public void Initialise(IConfigSource source) {} |
56 | 56 | ||
@@ -78,8 +78,8 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
78 | 78 | ||
79 | public void SubscribeToClientEvents(IClientAPI client) | 79 | public void SubscribeToClientEvents(IClientAPI client) |
80 | { | 80 | { |
81 | client.OnObjectSaleInfo += ObjectSaleInfo; | 81 | client.OnObjectSaleInfo += ObjectSaleInfo; |
82 | } | 82 | } |
83 | 83 | ||
84 | protected void ObjectSaleInfo( | 84 | protected void ObjectSaleInfo( |
85 | IClientAPI client, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice) | 85 | IClientAPI client, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice) |
@@ -99,7 +99,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
99 | part.ParentGroup.HasGroupChanged = true; | 99 | part.ParentGroup.HasGroupChanged = true; |
100 | 100 | ||
101 | part.GetProperties(client); | 101 | part.GetProperties(client); |
102 | } | 102 | } |
103 | 103 | ||
104 | public bool BuyObject(IClientAPI remoteClient, UUID categoryID, uint localID, byte saleType) | 104 | public bool BuyObject(IClientAPI remoteClient, UUID categoryID, uint localID, byte saleType) |
105 | { | 105 | { |
@@ -225,7 +225,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
225 | } | 225 | } |
226 | else | 226 | else |
227 | { | 227 | { |
228 | if (m_dialogModule != null) | 228 | if (m_dialogModule != null) |
229 | m_dialogModule.SendAlertToUser(remoteClient, "Cannot buy now. Your inventory is unavailable"); | 229 | m_dialogModule.SendAlertToUser(remoteClient, "Cannot buy now. Your inventory is unavailable"); |
230 | return false; | 230 | return false; |
231 | } | 231 | } |
@@ -261,6 +261,6 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
261 | } | 261 | } |
262 | 262 | ||
263 | return true; | 263 | return true; |
264 | } | 264 | } |
265 | } | 265 | } |
266 | } \ No newline at end of file | 266 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index bc54997..573a22a 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -397,13 +397,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
397 | m_groupsModule = m_scene.RequestModuleInterface<IGroupsModule>(); | 397 | m_groupsModule = m_scene.RequestModuleInterface<IGroupsModule>(); |
398 | 398 | ||
399 | if (m_groupsModule == null) | 399 | if (m_groupsModule == null) |
400 | m_log.Warn("[PERMISSIONS]: Groups module not found, group permissions will not work"); | 400 | m_log.Warn("[PERMISSIONS]: Groups module not found, group permissions will not work"); |
401 | 401 | ||
402 | m_moapModule = m_scene.RequestModuleInterface<IMoapModule>(); | 402 | m_moapModule = m_scene.RequestModuleInterface<IMoapModule>(); |
403 | 403 | ||
404 | // This log line will be commented out when no longer required for debugging | 404 | // This log line will be commented out when no longer required for debugging |
405 | // if (m_moapModule == null) | 405 | // if (m_moapModule == null) |
406 | // m_log.Warn("[PERMISSIONS]: Media on a prim module not found, media on a prim permissions will not work"); | 406 | // m_log.Warn("[PERMISSIONS]: Media on a prim module not found, media on a prim permissions will not work"); |
407 | } | 407 | } |
408 | 408 | ||
409 | public void Close() | 409 | public void Close() |
@@ -1906,7 +1906,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1906 | } | 1906 | } |
1907 | 1907 | ||
1908 | private bool CanControlPrimMedia(UUID agentID, UUID primID, int face) | 1908 | private bool CanControlPrimMedia(UUID agentID, UUID primID, int face) |
1909 | { | 1909 | { |
1910 | // m_log.DebugFormat( | 1910 | // m_log.DebugFormat( |
1911 | // "[PERMISSONS]: Performing CanControlPrimMedia check with agentID {0}, primID {1}, face {2}", | 1911 | // "[PERMISSONS]: Performing CanControlPrimMedia check with agentID {0}, primID {1}, face {2}", |
1912 | // agentID, primID, face); | 1912 | // agentID, primID, face); |
@@ -1918,7 +1918,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1918 | if (null == part) | 1918 | if (null == part) |
1919 | return false; | 1919 | return false; |
1920 | 1920 | ||
1921 | MediaEntry me = m_moapModule.GetMediaEntry(part, face); | 1921 | MediaEntry me = m_moapModule.GetMediaEntry(part, face); |
1922 | 1922 | ||
1923 | // If there is no existing media entry then it can be controlled (in this context, created). | 1923 | // If there is no existing media entry then it can be controlled (in this context, created). |
1924 | if (null == me) | 1924 | if (null == me) |
@@ -1929,7 +1929,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1929 | // agentID, primID, face, me.ControlPermissions); | 1929 | // agentID, primID, face, me.ControlPermissions); |
1930 | 1930 | ||
1931 | return GenericPrimMediaPermission(part, agentID, me.ControlPermissions); | 1931 | return GenericPrimMediaPermission(part, agentID, me.ControlPermissions); |
1932 | } | 1932 | } |
1933 | 1933 | ||
1934 | private bool CanInteractWithPrimMedia(UUID agentID, UUID primID, int face) | 1934 | private bool CanInteractWithPrimMedia(UUID agentID, UUID primID, int face) |
1935 | { | 1935 | { |
@@ -1952,15 +1952,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1952 | 1952 | ||
1953 | // m_log.DebugFormat( | 1953 | // m_log.DebugFormat( |
1954 | // "[PERMISSIONS]: Checking CanInteractWithPrimMedia for {0} on {1} face {2} with interact permissions {3}", | 1954 | // "[PERMISSIONS]: Checking CanInteractWithPrimMedia for {0} on {1} face {2} with interact permissions {3}", |
1955 | // agentID, primID, face, me.InteractPermissions); | 1955 | // agentID, primID, face, me.InteractPermissions); |
1956 | 1956 | ||
1957 | return GenericPrimMediaPermission(part, agentID, me.InteractPermissions); | 1957 | return GenericPrimMediaPermission(part, agentID, me.InteractPermissions); |
1958 | } | 1958 | } |
1959 | 1959 | ||
1960 | private bool GenericPrimMediaPermission(SceneObjectPart part, UUID agentID, MediaPermission perms) | 1960 | private bool GenericPrimMediaPermission(SceneObjectPart part, UUID agentID, MediaPermission perms) |
1961 | { | 1961 | { |
1962 | // if (IsAdministrator(agentID)) | 1962 | // if (IsAdministrator(agentID)) |
1963 | // return true; | 1963 | // return true; |
1964 | 1964 | ||
1965 | if ((perms & MediaPermission.Anyone) == MediaPermission.Anyone) | 1965 | if ((perms & MediaPermission.Anyone) == MediaPermission.Anyone) |
1966 | return true; | 1966 | return true; |
@@ -1969,15 +1969,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1969 | { | 1969 | { |
1970 | if (agentID == part.OwnerID) | 1970 | if (agentID == part.OwnerID) |
1971 | return true; | 1971 | return true; |
1972 | } | 1972 | } |
1973 | 1973 | ||
1974 | if ((perms & MediaPermission.Group) == MediaPermission.Group) | 1974 | if ((perms & MediaPermission.Group) == MediaPermission.Group) |
1975 | { | 1975 | { |
1976 | if (IsGroupMember(part.GroupID, agentID, 0)) | 1976 | if (IsGroupMember(part.GroupID, agentID, 0)) |
1977 | return true; | 1977 | return true; |
1978 | } | 1978 | } |
1979 | 1979 | ||
1980 | return false; | 1980 | return false; |
1981 | } | 1981 | } |
1982 | } | 1982 | } |
1983 | } \ No newline at end of file | 1983 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs index cb80111..25d73c2 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs | |||
@@ -814,7 +814,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain | |||
814 | { | 814 | { |
815 | //m_log.Debug("Terrain packet unacked, resending patch: " + patchX + " , " + patchY); | 815 | //m_log.Debug("Terrain packet unacked, resending patch: " + patchX + " , " + patchY); |
816 | client.SendLayerData(patchX, patchY, m_scene.Heightmap.GetFloatsSerialised()); | 816 | client.SendLayerData(patchX, patchY, m_scene.Heightmap.GetFloatsSerialised()); |
817 | } | 817 | } |
818 | 818 | ||
819 | private void StoreUndoState() | 819 | private void StoreUndoState() |
820 | { | 820 | { |
diff --git a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs index 9736b73..6bac555 100644 --- a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs +++ b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs | |||
@@ -425,7 +425,7 @@ namespace OpenSim.Region.CoreModules | |||
425 | { | 425 | { |
426 | if (m_ready) | 426 | if (m_ready) |
427 | { | 427 | { |
428 | if(m_scene.GetRootAgentCount() > 0) | 428 | if (m_scene.GetRootAgentCount() > 0) |
429 | { | 429 | { |
430 | // Ask wind plugin to generate a LL wind array to be cached locally | 430 | // Ask wind plugin to generate a LL wind array to be cached locally |
431 | // Try not to update this too often, as it may involve array copies | 431 | // Try not to update this too often, as it may involve array copies |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs index 1d9c2bd..1bd1371 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs | |||
@@ -228,7 +228,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
228 | SceneObjectGroup mapdot = (SceneObjectGroup)obj; | 228 | SceneObjectGroup mapdot = (SceneObjectGroup)obj; |
229 | Color mapdotspot = Color.Gray; // Default color when prim color is white | 229 | Color mapdotspot = Color.Gray; // Default color when prim color is white |
230 | 230 | ||
231 | // Loop over prim in group | 231 | // Loop over prim in group |
232 | List<SceneObjectPart> partList = null; | 232 | List<SceneObjectPart> partList = null; |
233 | lock (mapdot.Children) | 233 | lock (mapdot.Children) |
234 | partList = new List<SceneObjectPart>(mapdot.Children.Values); | 234 | partList = new List<SceneObjectPart>(mapdot.Children.Values); |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index f036d85..fbc8a50 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | |||
@@ -307,7 +307,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
307 | lock (m_rootAgents) | 307 | lock (m_rootAgents) |
308 | { | 308 | { |
309 | m_rootAgents.Remove(AgentId); | 309 | m_rootAgents.Remove(AgentId); |
310 | if(m_rootAgents.Count == 0) | 310 | if (m_rootAgents.Count == 0) |
311 | StopThread(); | 311 | StopThread(); |
312 | } | 312 | } |
313 | } | 313 | } |