Formatting cleanup.

This commit is contained in:
Jeff Ames
2010-09-12 13:43:49 -04:00
parent 20cd1da6bf
commit f1f0bc23f4
92 changed files with 754 additions and 772 deletions

View File

@@ -33,7 +33,7 @@ using OpenSim.Framework.Serialization;
using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.CoreModules.World.Archiver
{
{
/// <summary>
/// Helper methods for archive manipulation
/// </summary>
@@ -50,7 +50,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
public static string CreateObjectFilename(SceneObjectGroup sog)
{
return ArchiveConstants.CreateOarObjectFilename(sog.Name, sog.UUID, sog.AbsolutePosition);
}
}
/// <summary>
/// Create the path used to store an object in an OpenSim Archive.
@@ -62,7 +62,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
public static string CreateObjectPath(SceneObjectGroup sog)
{
return ArchiveConstants.CreateOarObjectPath(sog.Name, sog.UUID, sog.AbsolutePosition);
}
}
/// <summary>
/// Resolve path to a working FileStream
@@ -123,6 +123,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver
// return new BufferedStream(file, (int) response.ContentLength);
return new BufferedStream(file, 1000000);
}
}
}
}

View File

@@ -72,12 +72,12 @@ namespace OpenSim.Region.CoreModules.World.Land
#pragma warning restore 0429
/// <value>
/// Local land ids at specified region co-ordinates (region size / 4)
/// Local land ids at specified region co-ordinates (region size / 4)
/// </value>
private readonly int[,] m_landIDList = new int[landArrayMax, landArrayMax];
/// <value>
/// Land objects keyed by local id
/// Land objects keyed by local id
/// </value>
private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>();
@@ -92,8 +92,8 @@ namespace OpenSim.Region.CoreModules.World.Land
#region INonSharedRegionModule Members
public Type ReplaceableInterface
{
public Type ReplaceableInterface
{
get { return null; }
}
@@ -192,7 +192,7 @@ namespace OpenSim.Region.CoreModules.World.Land
Debug.WriteLine(string.Format("Stopping force position because {0} is close enough to position {1}", forcedPosition.Value, clientAvatar.AbsolutePosition));
forcedPosition = null;
}
//if we are far away, teleport
//if we are far away, teleport
else if (Vector3.Distance(clientAvatar.AbsolutePosition, forcedPosition.Value) > 3)
{
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
}
}
private void ForceAvatarToPosition(ScenePresence avatar, Vector3? position)
{
if (m_scene.Permissions.IsGod(avatar.UUID)) return;
@@ -336,7 +334,6 @@ namespace OpenSim.Region.CoreModules.World.Land
{
avatar.ControllingClient.SendAlertMessage(
"You are not allowed on this parcel because the land owner has restricted access.");
}
public void EventManagerOnAvatarEnteringNewParcel(ScenePresence avatar, int localLandID, UUID regionID)
@@ -448,7 +445,7 @@ namespace OpenSim.Region.CoreModules.World.Land
if (clientAvatar.AbsolutePosition.Z < LandChannel.BAN_LINE_SAFETY_HIEGHT &&
clientAvatar.sentMessageAboutRestrictedParcelFlyingDown)
{
EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID,
EventManagerOnAvatarEnteringNewParcel(clientAvatar, parcel.LandData.LocalID,
m_scene.RegionInfo.RegionID);
//They are going under the safety line!
if (!parcel.IsBannedFromLand(clientAvatar.UUID))
@@ -652,7 +649,7 @@ namespace OpenSim.Region.CoreModules.World.Land
if (x_float > Constants.RegionSize || x_float <= 0 || y_float > Constants.RegionSize || y_float <= 0)
return null;
try
{
x = Convert.ToInt32(Math.Floor(Convert.ToDouble(x_float) / 4.0));
@@ -667,7 +664,7 @@ namespace OpenSim.Region.CoreModules.World.Land
{
return null;
}
lock (m_landList)
{
// Corner case. If an autoreturn happens during sim startup
@@ -687,7 +684,7 @@ namespace OpenSim.Region.CoreModules.World.Land
// they happen every time at border crossings
throw new Exception("Error: Parcel not found at point " + x + ", " + y);
}
lock (m_landIDList)
{
try
@@ -741,7 +738,6 @@ namespace OpenSim.Region.CoreModules.World.Land
public void EventManagerOnObjectBeingRemovedFromScene(SceneObjectGroup obj)
{
lock (m_landList)
{
foreach (LandObject p in m_landList.Values)
@@ -936,7 +932,7 @@ namespace OpenSim.Region.CoreModules.World.Land
return;
}
}
lock (m_landList)
{
foreach (ILandObject slaveLandObject in selectedLandObjects)
@@ -1078,7 +1074,6 @@ namespace OpenSim.Region.CoreModules.World.Land
temp.Add(currentParcel);
}
}
}
}
@@ -1121,7 +1116,7 @@ namespace OpenSim.Region.CoreModules.World.Land
join(west, south, east, north, remote_client.AgentId);
}
public void ClientOnParcelSelectObjects(int local_id, int request_type,
public void ClientOnParcelSelectObjects(int local_id, int request_type,
List<UUID> returnIDs, IClientAPI remote_client)
{
m_landList[local_id].SendForceObjectSelect(local_id, request_type, returnIDs, remote_client);
@@ -1358,31 +1353,31 @@ namespace OpenSim.Region.CoreModules.World.Land
{
return RemoteParcelRequest(request, path, param, agentID, caps);
}));
UUID parcelCapID = UUID.Random();
caps.RegisterHandler("ParcelPropertiesUpdate",
new RestStreamHandler("POST", "/CAPS/" + parcelCapID,
delegate(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
return ProcessPropertiesUpdate(request, path, param, agentID, caps);
}));
UUID parcelCapID = UUID.Random();
caps.RegisterHandler("ParcelPropertiesUpdate",
new RestStreamHandler("POST", "/CAPS/" + parcelCapID,
delegate(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
return ProcessPropertiesUpdate(request, path, param, agentID, caps);
}));
}
private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps)
{
IClientAPI client;
if ( ! m_scene.TryGetClient(agentID, out client) ) {
m_log.WarnFormat("[LAND] unable to retrieve IClientAPI for {0}", agentID.ToString() );
return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty());
}
ParcelPropertiesUpdateMessage properties = new ParcelPropertiesUpdateMessage();
OpenMetaverse.StructuredData.OSDMap args = (OpenMetaverse.StructuredData.OSDMap) OSDParser.DeserializeLLSDXml(request);
private string ProcessPropertiesUpdate(string request, string path, string param, UUID agentID, Caps caps)
{
IClientAPI client;
if (! m_scene.TryGetClient(agentID, out client)) {
m_log.WarnFormat("[LAND] unable to retrieve IClientAPI for {0}", agentID.ToString());
return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty());
}
properties.Deserialize(args);
LandUpdateArgs land_update = new LandUpdateArgs();
int parcelID = properties.LocalID;
land_update.AuthBuyerID = properties.AuthBuyerID;
ParcelPropertiesUpdateMessage properties = new ParcelPropertiesUpdateMessage();
OpenMetaverse.StructuredData.OSDMap args = (OpenMetaverse.StructuredData.OSDMap) OSDParser.DeserializeLLSDXml(request);
properties.Deserialize(args);
LandUpdateArgs land_update = new LandUpdateArgs();
int parcelID = properties.LocalID;
land_update.AuthBuyerID = properties.AuthBuyerID;
land_update.Category = properties.Category;
land_update.Desc = properties.Desc;
land_update.GroupID = properties.GroupID;
@@ -1399,15 +1394,15 @@ namespace OpenSim.Region.CoreModules.World.Land
land_update.SnapshotID = properties.SnapshotID;
land_update.UserLocation = properties.UserLocation;
land_update.UserLookAt = properties.UserLookAt;
land_update.MediaDescription = properties.MediaDesc;
land_update.MediaType = properties.MediaType;
land_update.MediaWidth = properties.MediaWidth;
land_update.MediaHeight = properties.MediaHeight;
land_update.MediaLoop = properties.MediaLoop;
land_update.ObscureMusic = properties.ObscureMusic;
land_update.ObscureMedia = properties.ObscureMedia;
ILandObject land;
land_update.MediaDescription = properties.MediaDesc;
land_update.MediaType = properties.MediaType;
land_update.MediaWidth = properties.MediaWidth;
land_update.MediaHeight = properties.MediaHeight;
land_update.MediaLoop = properties.MediaLoop;
land_update.ObscureMusic = properties.ObscureMusic;
land_update.ObscureMedia = properties.ObscureMedia;
ILandObject land;
lock (m_landList)
{
m_landList.TryGetValue(parcelID, out land);
@@ -1415,15 +1410,15 @@ namespace OpenSim.Region.CoreModules.World.Land
if (land != null)
{
land.UpdateLandProperties(land_update, client);
land.UpdateLandProperties(land_update, client);
m_scene.EventManager.TriggerOnParcelPropertiesUpdateRequest(land_update, parcelID, client);
}
}
else
{
m_log.WarnFormat("[LAND] unable to find parcelID {0}", parcelID);
}
m_log.WarnFormat("[LAND] unable to find parcelID {0}", parcelID);
}
return LLSDHelpers.SerialiseLLSDReply(new LLSDEmpty());
}
}
// we cheat here: As we don't have (and want) a grid-global parcel-store, we can't return the
// "real" parcelID, because we wouldn't be able to map that to the region the parcel belongs to.
// 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
if (parcelID == UUID.Zero)
return;
ExtendedLandData data =
(ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(),
delegate(string id)
ExtendedLandData data =
(ExtendedLandData)parcelInfoCache.Get(parcelID.ToString(),
delegate(string id)
{
UUID parcel = UUID.Zero;
UUID.TryParse(id, out parcel);
// assume we've got the parcelID we just computed in RemoteParcelRequest
ExtendedLandData extLandData = new ExtendedLandData();
Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle,
Util.ParseFakeParcelID(parcel, out extLandData.RegionHandle,
out extLandData.X, out extLandData.Y);
m_log.DebugFormat("[LAND] got parcelinfo request for regionHandle {0}, x/y {1}/{2}",
extLandData.RegionHandle, extLandData.X, extLandData.Y);
// for this region or for somewhere else?
if (extLandData.RegionHandle == m_scene.RegionInfo.RegionHandle)
{

View File

@@ -229,13 +229,13 @@ namespace OpenSim.Region.CoreModules.World.Land
newData.SnapshotID = args.SnapshotID;
newData.UserLocation = args.UserLocation;
newData.UserLookAt = args.UserLookAt;
newData.MediaType = args.MediaType;
newData.MediaDescription = args.MediaDescription;
newData.MediaWidth = args.MediaWidth;
newData.MediaHeight = args.MediaHeight;
newData.MediaLoop = args.MediaLoop;
newData.ObscureMusic = args.ObscureMusic;
newData.ObscureMedia = args.ObscureMedia;
newData.MediaType = args.MediaType;
newData.MediaDescription = args.MediaDescription;
newData.MediaWidth = args.MediaWidth;
newData.MediaHeight = args.MediaHeight;
newData.MediaLoop = args.MediaLoop;
newData.ObscureMusic = args.ObscureMusic;
newData.ObscureMedia = args.ObscureMedia;
m_scene.LandChannel.UpdateLandObject(LandData.LocalID, newData);

View File

@@ -54,11 +54,11 @@ namespace OpenSim.Region.CoreModules.Media.Moap
{
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MoapModule")]
public class MoapModule : INonSharedRegionModule, IMoapModule
{
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public string Name { get { return "MoapModule"; } }
public Type ReplaceableInterface { get { return null; } }
public string Name { get { return "MoapModule"; } }
public Type ReplaceableInterface { get { return null; } }
/// <summary>
/// Is this module enabled?
@@ -78,17 +78,17 @@ namespace OpenSim.Region.CoreModules.Media.Moap
/// <summary>
/// Track the ObjectMedia capabilities given to users keyed by agent. Lock m_omCapUsers to manipulate.
/// </summary>
protected Dictionary<UUID, string> m_omCapUrls = new Dictionary<UUID, string>();
protected Dictionary<UUID, string> m_omCapUrls = new Dictionary<UUID, string>();
/// <summary>
/// Track the ObjectMediaUpdate capabilities given to users keyed by path
/// </summary>
/// </summary>
protected Dictionary<string, UUID> m_omuCapUsers = new Dictionary<string, UUID>();
/// <summary>
/// Track the ObjectMediaUpdate capabilities given to users keyed by agent. Lock m_omuCapUsers to manipulate
/// </summary>
protected Dictionary<UUID, string> m_omuCapUrls = new Dictionary<UUID, string>();
/// </summary>
protected Dictionary<UUID, string> m_omuCapUrls = new Dictionary<UUID, string>();
public void Initialise(IConfigSource configSource)
{
@@ -129,7 +129,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps;
m_scene.EventManager.OnDeregisterCaps -= OnDeregisterCaps;
m_scene.EventManager.OnSceneObjectPartCopy -= OnSceneObjectPartCopy;
}
}
public void OnRegisterCaps(UUID agentID, Caps caps)
{
@@ -159,7 +159,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
caps.RegisterHandler(
"ObjectMediaNavigate", new RestStreamHandler("POST", omuCapUrl, HandleObjectMediaNavigateMessage));
}
}
}
public void OnDeregisterCaps(UUID agentID, Caps caps)
{
@@ -179,7 +179,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
}
protected void OnSceneObjectPartCopy(SceneObjectPart copy, SceneObjectPart original, bool userExposed)
{
{
if (original.Shape.Media != null)
{
PrimitiveBaseShape.MediaList dupeMedia = new PrimitiveBaseShape.MediaList();
@@ -195,7 +195,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
}
copy.Shape.Media = dupeMedia;
}
}
}
public MediaEntry GetMediaEntry(SceneObjectPart part, int face)
@@ -211,9 +211,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap
me = null;
}
else
{
{
lock (media)
me = media[face];
me = media[face];
// TODO: Really need a proper copy constructor down in libopenmetaverse
if (me != null)
@@ -227,17 +227,17 @@ namespace OpenSim.Region.CoreModules.Media.Moap
public void SetMediaEntry(SceneObjectPart part, int face, MediaEntry me)
{
CheckFaceParam(part, face);
CheckFaceParam(part, face);
if (null == part.Shape.Media)
part.Shape.Media = new PrimitiveBaseShape.MediaList(new MediaEntry[part.GetNumberOfSides()]);
lock (part.Shape.Media)
lock (part.Shape.Media)
part.Shape.Media[face] = me;
UpdateMediaUrl(part, UUID.Zero);
UpdateMediaUrl(part, UUID.Zero);
part.ScheduleFullUpdate();
part.TriggerScriptChangedEvent(Changed.MEDIA);
part.TriggerScriptChangedEvent(Changed.MEDIA);
}
public void ClearMediaEntry(SceneObjectPart part, int face)
@@ -256,7 +256,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
/// <returns></returns>
protected string HandleObjectMediaMessage(
string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
{
// m_log.DebugFormat("[MOAP]: Got ObjectMedia path [{0}], raw request [{1}]", path, request);
OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request);
@@ -266,12 +266,12 @@ namespace OpenSim.Region.CoreModules.Media.Moap
if (omm.Request is ObjectMediaRequest)
return HandleObjectMediaRequest(omm.Request as ObjectMediaRequest);
else if (omm.Request is ObjectMediaUpdate)
return HandleObjectMediaUpdate(path, omm.Request as ObjectMediaUpdate);
return HandleObjectMediaUpdate(path, omm.Request as ObjectMediaUpdate);
throw new Exception(
string.Format(
"[MOAP]: ObjectMediaMessage has unrecognized ObjectMediaBlock of {0}",
omm.Request.GetType()));
omm.Request.GetType()));
}
/// <summary>
@@ -279,7 +279,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
/// </summary>
/// <param name="omr"></param>
/// <returns></returns>
protected string HandleObjectMediaRequest(ObjectMediaRequest omr)
protected string HandleObjectMediaRequest(ObjectMediaRequest omr)
{
UUID primId = omr.PrimID;
@@ -318,7 +318,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
/// <param name="path">Path on which this request was made</param>
/// <param name="omu">/param>
/// <returns></returns>
protected string HandleObjectMediaUpdate(string path, ObjectMediaUpdate omu)
protected string HandleObjectMediaUpdate(string path, ObjectMediaUpdate omu)
{
UUID primId = omu.PrimID;
@@ -330,9 +330,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap
"[MOAP]: Received an UPDATE ObjectMediaRequest for prim {0} but this doesn't exist in region {1}",
primId, m_scene.RegionInfo.RegionName);
return string.Empty;
}
}
// m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId);
// m_log.DebugFormat("[MOAP]: Received {0} media entries for prim {1}", omu.FaceMedia.Length, primId);
// for (int i = 0; i < omu.FaceMedia.Length; i++)
// {
@@ -374,14 +374,14 @@ namespace OpenSim.Region.CoreModules.Media.Moap
part.Shape.Textures = te;
// m_log.DebugFormat(
// "[MOAP]: Media flags for face {0} is {1}",
// i, part.Shape.Textures.FaceTextures[i].MediaFlags);
// i, part.Shape.Textures.FaceTextures[i].MediaFlags);
}
}
}
else
{
{
// We need to go through the media textures one at a time to make sure that we have permission
// to change them
// to change them
// FIXME: Race condition here since some other texture entry manipulator may overwrite/get
// overwritten. Unfortunately, PrimitiveBaseShape does not allow us to change texture entry
@@ -391,18 +391,18 @@ namespace OpenSim.Region.CoreModules.Media.Moap
lock (media)
{
for (int i = 0; i < media.Count; i++)
{
{
if (m_scene.Permissions.CanControlPrimMedia(agentId, part.UUID, i))
{
{
media[i] = omu.FaceMedia[i];
// When a face is cleared this is done by setting the MediaFlags in the TextureEntry via a normal
// texture update, so we don't need to worry about clearing MediaFlags here.
if (null == media[i])
continue;
continue;
Primitive.TextureEntryFace face = te.CreateFace((uint)i);
face.MediaFlags = true;
face.MediaFlags = true;
// m_log.DebugFormat(
// "[MOAP]: Media flags for face {0} is {1}",
@@ -414,11 +414,11 @@ namespace OpenSim.Region.CoreModules.Media.Moap
part.Shape.Textures = te;
// for (int i2 = 0; i2 < part.Shape.Textures.FaceTextures.Length; i2++)
// m_log.DebugFormat("[MOAP]: FaceTexture[{0}] is {1}", i2, part.Shape.Textures.FaceTextures[i2]);
// for (int i2 = 0; i2 < part.Shape.Textures.FaceTextures.Length; i2++)
// m_log.DebugFormat("[MOAP]: FaceTexture[{0}] is {1}", i2, part.Shape.Textures.FaceTextures[i2]);
}
UpdateMediaUrl(part, agentId);
UpdateMediaUrl(part, agentId);
// Arguably, we could avoid sending a full update to the avatar that just changed the texture.
part.ScheduleFullUpdate();
@@ -439,16 +439,16 @@ namespace OpenSim.Region.CoreModules.Media.Moap
/// <returns></returns>
protected string HandleObjectMediaNavigateMessage(
string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
{
// m_log.DebugFormat("[MOAP]: Got ObjectMediaNavigate request [{0}]", request);
OSDMap osd = (OSDMap)OSDParser.DeserializeLLSDXml(request);
ObjectMediaNavigateMessage omn = new ObjectMediaNavigateMessage();
omn.Deserialize(osd);
omn.Deserialize(osd);
UUID primId = omn.PrimID;
SceneObjectPart part = m_scene.GetSceneObjectPart(primId);
SceneObjectPart part = m_scene.GetSceneObjectPart(primId);
if (null == part)
{
@@ -456,12 +456,12 @@ namespace OpenSim.Region.CoreModules.Media.Moap
"[MOAP]: Received an ObjectMediaNavigateMessage for prim {0} but this doesn't exist in region {1}",
primId, m_scene.RegionInfo.RegionName);
return string.Empty;
}
}
UUID agentId = default(UUID);
lock (m_omuCapUsers)
agentId = m_omuCapUsers[path];
agentId = m_omuCapUsers[path];
if (!m_scene.Permissions.CanInteractWithPrimMedia(agentId, part.UUID, omn.Face))
return string.Empty;
@@ -484,7 +484,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
return string.Empty;
if (me.EnableWhiteList)
{
{
if (!CheckUrlAgainstWhitelist(omn.URL, me.WhiteList))
{
// m_log.DebugFormat(
@@ -493,18 +493,18 @@ namespace OpenSim.Region.CoreModules.Media.Moap
return string.Empty;
}
}
}
me.CurrentURL = omn.URL;
UpdateMediaUrl(part, agentId);
part.ScheduleFullUpdate();
part.ScheduleFullUpdate();
part.TriggerScriptChangedEvent(Changed.MEDIA);
return OSDParser.SerializeLLSDXmlString(new OSD());
}
}
/// <summary>
/// Check that the face number is valid for the given prim.
@@ -519,7 +519,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
int maxFaces = part.GetNumberOfSides() - 1;
if (face > maxFaces)
throw new ArgumentException(
string.Format("Face argument was {0} but max is {1}", face, maxFaces));
string.Format("Face argument was {0} but max is {1}", face, maxFaces));
}
/// <summary>
@@ -542,9 +542,9 @@ namespace OpenSim.Region.CoreModules.Media.Moap
string rawVersion = part.MediaUrl.Substring(5, 10);
int version = int.Parse(rawVersion);
part.MediaUrl = string.Format("x-mv:{0:D10}/{1}", ++version, updateId);
}
}
// m_log.DebugFormat("[MOAP]: Storing media url [{0}] in prim {1} {2}", part.MediaUrl, part.Name, part.UUID);
// m_log.DebugFormat("[MOAP]: Storing media url [{0}] in prim {1} {2}", part.MediaUrl, part.Name, part.UUID);
}
/// <summary>
@@ -554,7 +554,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
/// <param name="whitelist"></param>
/// <returns>true if the url matches an entry on the whitelist, false otherwise</returns>
protected bool CheckUrlAgainstWhitelist(string rawUrl, string[] whitelist)
{
{
Uri url = new Uri(rawUrl);
foreach (string origWlUrl in whitelist)
@@ -575,7 +575,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
if (url.Host.Contains(wlUrl))
{
// m_log.DebugFormat("[MOAP]: Whitelist URL {0} matches {1}", origWlUrl, rawUrl);
return true;
return true;
}
}
else
@@ -588,7 +588,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
return true;
}
}
}
}
return false;
}

View File

@@ -49,8 +49,8 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
protected Scene m_scene = null;
protected IDialogModule m_dialogModule;
public string Name { get { return "Object BuySell Module"; } }
public Type ReplaceableInterface { get { return null; } }
public string Name { get { return "Object BuySell Module"; } }
public Type ReplaceableInterface { get { return null; } }
public void Initialise(IConfigSource source) {}
@@ -78,8 +78,8 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
public void SubscribeToClientEvents(IClientAPI client)
{
client.OnObjectSaleInfo += ObjectSaleInfo;
}
client.OnObjectSaleInfo += ObjectSaleInfo;
}
protected void ObjectSaleInfo(
IClientAPI client, UUID agentID, UUID sessionID, uint localID, byte saleType, int salePrice)
@@ -99,7 +99,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
part.ParentGroup.HasGroupChanged = true;
part.GetProperties(client);
}
}
public bool BuyObject(IClientAPI remoteClient, UUID categoryID, uint localID, byte saleType)
{
@@ -225,7 +225,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
}
else
{
if (m_dialogModule != null)
if (m_dialogModule != null)
m_dialogModule.SendAlertToUser(remoteClient, "Cannot buy now. Your inventory is unavailable");
return false;
}
@@ -261,6 +261,6 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
}
return true;
}
}
}
}

View File

@@ -397,13 +397,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions
m_groupsModule = m_scene.RequestModuleInterface<IGroupsModule>();
if (m_groupsModule == null)
m_log.Warn("[PERMISSIONS]: Groups module not found, group permissions will not work");
m_log.Warn("[PERMISSIONS]: Groups module not found, group permissions will not work");
m_moapModule = m_scene.RequestModuleInterface<IMoapModule>();
// This log line will be commented out when no longer required for debugging
// if (m_moapModule == null)
// m_log.Warn("[PERMISSIONS]: Media on a prim module not found, media on a prim permissions will not work");
// m_log.Warn("[PERMISSIONS]: Media on a prim module not found, media on a prim permissions will not work");
}
public void Close()
@@ -1906,7 +1906,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
}
private bool CanControlPrimMedia(UUID agentID, UUID primID, int face)
{
{
// m_log.DebugFormat(
// "[PERMISSONS]: Performing CanControlPrimMedia check with agentID {0}, primID {1}, face {2}",
// agentID, primID, face);
@@ -1918,7 +1918,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
if (null == part)
return false;
MediaEntry me = m_moapModule.GetMediaEntry(part, face);
MediaEntry me = m_moapModule.GetMediaEntry(part, face);
// If there is no existing media entry then it can be controlled (in this context, created).
if (null == me)
@@ -1929,7 +1929,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
// agentID, primID, face, me.ControlPermissions);
return GenericPrimMediaPermission(part, agentID, me.ControlPermissions);
}
}
private bool CanInteractWithPrimMedia(UUID agentID, UUID primID, int face)
{
@@ -1952,15 +1952,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions
// m_log.DebugFormat(
// "[PERMISSIONS]: Checking CanInteractWithPrimMedia for {0} on {1} face {2} with interact permissions {3}",
// agentID, primID, face, me.InteractPermissions);
// agentID, primID, face, me.InteractPermissions);
return GenericPrimMediaPermission(part, agentID, me.InteractPermissions);
}
}
private bool GenericPrimMediaPermission(SceneObjectPart part, UUID agentID, MediaPermission perms)
{
// if (IsAdministrator(agentID))
// return true;
// return true;
if ((perms & MediaPermission.Anyone) == MediaPermission.Anyone)
return true;
@@ -1969,15 +1969,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions
{
if (agentID == part.OwnerID)
return true;
}
}
if ((perms & MediaPermission.Group) == MediaPermission.Group)
{
if (IsGroupMember(part.GroupID, agentID, 0))
return true;
}
}
return false;
return false;
}
}
}

View File

@@ -814,7 +814,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
{
//m_log.Debug("Terrain packet unacked, resending patch: " + patchX + " , " + patchY);
client.SendLayerData(patchX, patchY, m_scene.Heightmap.GetFloatsSerialised());
}
}
private void StoreUndoState()
{

View File

@@ -425,7 +425,7 @@ namespace OpenSim.Region.CoreModules
{
if (m_ready)
{
if(m_scene.GetRootAgentCount() > 0)
if (m_scene.GetRootAgentCount() > 0)
{
// Ask wind plugin to generate a LL wind array to be cached locally
// Try not to update this too often, as it may involve array copies

View File

@@ -228,7 +228,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
SceneObjectGroup mapdot = (SceneObjectGroup)obj;
Color mapdotspot = Color.Gray; // Default color when prim color is white
// Loop over prim in group
// Loop over prim in group
List<SceneObjectPart> partList = null;
lock (mapdot.Children)
partList = new List<SceneObjectPart>(mapdot.Children.Values);

View File

@@ -307,7 +307,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
lock (m_rootAgents)
{
m_rootAgents.Remove(AgentId);
if(m_rootAgents.Count == 0)
if (m_rootAgents.Count == 0)
StopThread();
}
}