From 32ef1b9e239e027dbf5608fb25003a54d3b8eda0 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 27 Nov 2009 15:10:12 +0000
Subject: remove stringent content type checking to make it easier to load oars
directly from urls
---
OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region/CoreModules')
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
index 34b81d8..af72968 100644
--- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs
@@ -454,6 +454,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver
///
/// Resolve path to a working FileStream
///
+ ///
+ ///
private Stream GetStream(string path)
{
if (File.Exists(path))
@@ -500,8 +502,9 @@ namespace OpenSim.Region.CoreModules.World.Archiver
WebResponse response = request.GetResponse();
Stream file = response.GetResponseStream();
- if (response.ContentType != "application/x-oar")
- throw new Exception(String.Format("{0} does not identify an OAR file", uri.ToString()));
+ // justincc: gonna ignore the content type for now and just try anything
+ //if (response.ContentType != "application/x-oar")
+ // throw new Exception(String.Format("{0} does not identify an OAR file", uri.ToString()));
if (response.ContentLength == 0)
throw new Exception(String.Format("{0} returned an empty file", uri.ToString()));
--
cgit v1.1
From 25e2b16451ed68aee4c82ca48f69cb7e0f58cd4e Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 27 Nov 2009 17:52:23 +0000
Subject: Apply patch to stop failure of llParcelMediaCommandList() on group
deeded land See http://opensimulator.org/mantis/view.php?id=3999
---
.../CoreModules/World/Permissions/PermissionsModule.cs | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Region/CoreModules')
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index 013a0ef..c9b3071 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -800,30 +800,31 @@ namespace OpenSim.Region.CoreModules.World.Permissions
}
protected bool GenericParcelOwnerPermission(UUID user, ILandObject parcel, ulong groupPowers)
- {
- bool permission = false;
-
+ {
if (parcel.LandData.OwnerID == user)
{
- permission = true;
+ // Returning immediately so that group deeded objects on group deeded land don't trigger a NRE on
+ // the subsequent redundant checks when using lParcelMediaCommandList()
+ // See http://opensimulator.org/mantis/view.php?id=3999 for more details
+ return true;
}
if (parcel.LandData.IsGroupOwned && IsGroupMember(parcel.LandData.GroupID, user, groupPowers))
{
- permission = true;
+ return true;
}
if (IsEstateManager(user))
{
- permission = true;
+ return true;
}
if (IsAdministrator(user))
{
- permission = true;
+ return true;
}
- return permission;
+ return false;
}
protected bool GenericParcelPermission(UUID user, Vector3 pos, ulong groupPowers)
--
cgit v1.1
From 2e47e5147547d355d8935404c43fbe1b61888ee1 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 27 Nov 2009 19:01:45 +0000
Subject: Make locking of timers and listeners in script related functions
consistent See http://opensimulator.org/mantis/view.php?id=4316 Thanks
KittyLiu!
---
.../Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region/CoreModules')
diff --git a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
index d4a28e2..60df2e7 100644
--- a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
@@ -602,9 +602,12 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm
ListenerInfo info =
ListenerInfo.FromData(localID, itemID, hostID, item);
- if (!m_listeners.ContainsKey((int)item[2]))
- m_listeners.Add((int)item[2], new List());
- m_listeners[(int)item[2]].Add(info);
+ lock (m_listeners)
+ {
+ if (!m_listeners.ContainsKey((int)item[2]))
+ m_listeners.Add((int)item[2], new List());
+ m_listeners[(int)item[2]].Add(info);
+ }
idx+=6;
}
--
cgit v1.1
From e078fb2e713fd20c811bd8a12a914042fdf062ee Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 27 Nov 2009 19:23:51 +0000
Subject: Implement god mode user freezing and unfreezing See
http://opensimulator.org/mantis/view.php?id=4356 Thanks Revolution I
performed a subsequent probable bug fix in this patch
---
.../Region/CoreModules/Avatar/Gods/GodsModule.cs | 71 ++++++++++++++--------
1 file changed, 44 insertions(+), 27 deletions(-)
(limited to 'OpenSim/Region/CoreModules')
diff --git a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
index 273c128..7e1bed5 100644
--- a/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
@@ -98,7 +98,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
/// The person doing the kicking
/// The session of the person doing the kicking
/// the person that is being kicked
- /// This isn't used apparently
+ /// Tells what to do to the user
/// The message to send to the user after it's been turned into a field
public void KickUser(UUID godID, UUID sessionID, UUID agentID, uint kickflags, byte[] reason)
{
@@ -110,39 +110,56 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
{
if (m_scene.Permissions.IsGod(godID))
{
- if (agentID == kickUserID)
+ if (kickflags == 0)
{
- string reasonStr = Utils.BytesToString(reason);
+ if (agentID == kickUserID)
+ {
+ string reasonStr = Utils.BytesToString(reason);
- m_scene.ForEachClient(
- delegate(IClientAPI controller)
- {
- if (controller.AgentId != godID)
- controller.Kick(reasonStr);
- }
- );
+ m_scene.ForEachClient(
+ delegate(IClientAPI controller)
+ {
+ if (controller.AgentId != godID)
+ controller.Kick(reasonStr);
+ }
+ );
- // This is a bit crude. It seems the client will be null before it actually stops the thread
- // The thread will kill itself eventually :/
- // Is there another way to make sure *all* clients get this 'inter region' message?
- m_scene.ForEachScenePresence(
- delegate(ScenePresence p)
- {
- if (p.UUID != godID && !p.IsChildAgent)
+ // This is a bit crude. It seems the client will be null before it actually stops the thread
+ // The thread will kill itself eventually :/
+ // Is there another way to make sure *all* clients get this 'inter region' message?
+ m_scene.ForEachScenePresence(
+ delegate(ScenePresence p)
{
- // Possibly this should really be p.Close() though that method doesn't send a close
- // to the client
- p.ControllingClient.Close();
+ if (p.UUID != godID && !p.IsChildAgent)
+ {
+ // Possibly this should really be p.Close() though that method doesn't send a close
+ // to the client
+ p.ControllingClient.Close();
+ }
}
- }
- );
+ );
+ }
+ else
+ {
+ m_scene.SceneGraph.removeUserCount(!sp.IsChildAgent);
+
+ sp.ControllingClient.Kick(Utils.BytesToString(reason));
+ sp.ControllingClient.Close();
+ }
}
- else
+
+ if (kickflags == 1)
{
- m_scene.SceneGraph.removeUserCount(!sp.IsChildAgent);
-
- sp.ControllingClient.Kick(Utils.BytesToString(reason));
- sp.ControllingClient.Close();
+ sp.AllowMovement = false;
+ m_dialogModule.SendAlertToUser(agentID, Utils.BytesToString(reason));
+ m_dialogModule.SendAlertToUser(godID, "User Frozen");
+ }
+
+ if (kickflags == 2)
+ {
+ sp.AllowMovement = true;
+ m_dialogModule.SendAlertToUser(agentID, Utils.BytesToString(reason));
+ m_dialogModule.SendAlertToUser(godID, "User Unfrozen");
}
}
else
--
cgit v1.1