Merge branch 'avination' into ubitwork
commit
e6c8eca504
|
@ -1116,17 +1116,17 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AddNewInventoryItem(m_HostCapsObj.AgentID, item, (uint)cost);
|
AddNewInventoryItem(m_HostCapsObj.AgentID, item, (uint)cost);
|
||||||
if (client != null)
|
// if (client != null)
|
||||||
{
|
// {
|
||||||
// let users see anything.. i don't so far
|
// // let users see anything.. i don't so far
|
||||||
string str;
|
// string str;
|
||||||
if (cost > 0)
|
// if (cost > 0)
|
||||||
// dont remember where is money unit name to put here
|
// // dont remember where is money unit name to put here
|
||||||
str = "Upload complete. charged " + cost.ToString() + "$";
|
// str = "Upload complete. charged " + cost.ToString() + "$";
|
||||||
else
|
// else
|
||||||
str = "Upload complete";
|
// str = "Upload complete";
|
||||||
client.SendAgentAlertMessage(str, true);
|
// client.SendAgentAlertMessage(str, true);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -104,9 +104,9 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
|
|
||||||
if (m_workerThreads == null)
|
if (m_workerThreads == null)
|
||||||
{
|
{
|
||||||
m_workerThreads = new Thread[4];
|
m_workerThreads = new Thread[2];
|
||||||
|
|
||||||
for (uint i = 0; i < 4; i++)
|
for (uint i = 0; i < 2; i++)
|
||||||
{
|
{
|
||||||
m_workerThreads[i] = Watchdog.StartThread(DoTextureRequests,
|
m_workerThreads[i] = Watchdog.StartThread(DoTextureRequests,
|
||||||
String.Format("TextureWorkerThread{0}", i),
|
String.Format("TextureWorkerThread{0}", i),
|
||||||
|
|
|
@ -104,7 +104,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
|
|
||||||
public void RegisterCaps(UUID agentID, Caps caps)
|
public void RegisterCaps(UUID agentID, Caps caps)
|
||||||
{
|
{
|
||||||
if (!m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(agentID))
|
if (!m_scene.RegionInfo.EstateSettings.IsEstateManagerOrOwner(agentID) && !m_scene.Permissions.IsGod(agentID))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
UUID capID = UUID.Random();
|
UUID capID = UUID.Random();
|
||||||
|
|
|
@ -164,8 +164,8 @@ namespace OpenSim.Region.CoreModules.Avatar.InstantMessage
|
||||||
// try child avatar second
|
// try child avatar second
|
||||||
foreach (Scene scene in m_Scenes)
|
foreach (Scene scene in m_Scenes)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat(
|
//m_log.DebugFormat(
|
||||||
"[INSTANT MESSAGE]: Looking for child of {0} in {1}", toAgentID, scene.RegionInfo.RegionName);
|
// "[INSTANT MESSAGE]: Looking for child of {0} in {1}", toAgentID, scene.RegionInfo.RegionName);
|
||||||
|
|
||||||
ScenePresence sp = scene.GetScenePresence(toAgentID);
|
ScenePresence sp = scene.GetScenePresence(toAgentID);
|
||||||
if (sp != null)
|
if (sp != null)
|
||||||
|
|
|
@ -335,7 +335,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
// Needs to determine which engine was running it and use that
|
// Needs to determine which engine was running it and use that
|
||||||
//
|
//
|
||||||
errors = part.Inventory.CreateScriptInstanceEr(item.ItemID, 0, false, DefaultScriptEngine, 0);
|
errors = part.Inventory.CreateScriptInstanceEr(item.ItemID, 0, false, DefaultScriptEngine, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tell anyone managing scripts that a script has been reloaded/changed
|
// Tell anyone managing scripts that a script has been reloaded/changed
|
||||||
|
@ -2503,6 +2503,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
m_sceneGraph.LinkObjects(root, children);
|
m_sceneGraph.LinkObjects(root, children);
|
||||||
|
|
||||||
|
ScenePresence sp;
|
||||||
|
if (TryGetScenePresence(agentId, out sp))
|
||||||
|
{
|
||||||
|
root.SendPropertiesToClient(sp.ControllingClient);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private string PermissionString(uint permissions)
|
private string PermissionString(uint permissions)
|
||||||
|
|
|
@ -1674,7 +1674,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
List<SceneObjectGroup> objs = new List<SceneObjectGroup>();
|
List<SceneObjectGroup> objs = new List<SceneObjectGroup>();
|
||||||
lock (m_groupsWithTargets)
|
lock (m_groupsWithTargets)
|
||||||
objs = new List<SceneObjectGroup>(m_groupsWithTargets.Values);
|
{
|
||||||
|
foreach (SceneObjectGroup grp in m_groupsWithTargets.Values)
|
||||||
|
objs.Add(grp);
|
||||||
|
}
|
||||||
|
|
||||||
foreach (SceneObjectGroup entry in objs)
|
foreach (SceneObjectGroup entry in objs)
|
||||||
entry.checkAtTargets();
|
entry.checkAtTargets();
|
||||||
|
|
|
@ -1849,6 +1849,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SceneObjectGroupsByLocalPartID[part.LocalId] = parentGroup;
|
SceneObjectGroupsByLocalPartID[part.LocalId] = parentGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
parentGroup.AdjustChildPrimPermissions();
|
||||||
parentGroup.HasGroupChanged = true;
|
parentGroup.HasGroupChanged = true;
|
||||||
parentGroup.ProcessBackup(m_parentScene.SimulationDataService, true);
|
parentGroup.ProcessBackup(m_parentScene.SimulationDataService, true);
|
||||||
parentGroup.ScheduleGroupForFullUpdate();
|
parentGroup.ScheduleGroupForFullUpdate();
|
||||||
|
@ -1989,6 +1990,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// return unless the root is deleted. This will remove them
|
// return unless the root is deleted. This will remove them
|
||||||
// from the database. They will be rewritten immediately,
|
// from the database. They will be rewritten immediately,
|
||||||
// minus the rows for the unlinked child prims.
|
// minus the rows for the unlinked child prims.
|
||||||
|
g.AdjustChildPrimPermissions();
|
||||||
m_parentScene.SimulationDataService.RemoveObject(g.UUID, m_parentScene.RegionInfo.RegionID);
|
m_parentScene.SimulationDataService.RemoveObject(g.UUID, m_parentScene.RegionInfo.RegionID);
|
||||||
g.TriggerScriptChangedEvent(Changed.LINK);
|
g.TriggerScriptChangedEvent(Changed.LINK);
|
||||||
g.HasGroupChanged = true; // Persist
|
g.HasGroupChanged = true; // Persist
|
||||||
|
|
|
@ -307,6 +307,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
private bool m_isBackedUp;
|
private bool m_isBackedUp;
|
||||||
|
|
||||||
|
public bool IsBackedUp
|
||||||
|
{
|
||||||
|
get { return m_isBackedUp; }
|
||||||
|
}
|
||||||
|
|
||||||
protected MapAndArray<UUID, SceneObjectPart> m_parts = new MapAndArray<UUID, SceneObjectPart>();
|
protected MapAndArray<UUID, SceneObjectPart> m_parts = new MapAndArray<UUID, SceneObjectPart>();
|
||||||
|
|
||||||
protected ulong m_regionHandle;
|
protected ulong m_regionHandle;
|
||||||
|
@ -3410,11 +3415,18 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public void AdjustChildPrimPermissions()
|
public void AdjustChildPrimPermissions()
|
||||||
{
|
{
|
||||||
|
uint newOwnerMask = (uint)PermissionMask.All & 0xfffffff8; // Mask folded bits
|
||||||
|
uint foldedPerms = RootPart.OwnerMask & 3;
|
||||||
|
|
||||||
ForEachPart(part =>
|
ForEachPart(part =>
|
||||||
{
|
{
|
||||||
|
newOwnerMask &= part.BaseMask;
|
||||||
if (part != RootPart)
|
if (part != RootPart)
|
||||||
part.ClonePermissions(RootPart);
|
part.ClonePermissions(RootPart);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
RootPart.OwnerMask = newOwnerMask | foldedPerms;
|
||||||
|
RootPart.ScheduleFullUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdatePermissions(UUID AgentID, byte field, uint localID,
|
public void UpdatePermissions(UUID AgentID, byte field, uint localID,
|
||||||
|
@ -3422,8 +3434,24 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
RootPart.UpdatePermissions(AgentID, field, localID, mask, addRemTF);
|
RootPart.UpdatePermissions(AgentID, field, localID, mask, addRemTF);
|
||||||
|
|
||||||
|
bool god = Scene.Permissions.IsGod(AgentID);
|
||||||
|
|
||||||
|
if (field == 1 && god)
|
||||||
|
{
|
||||||
|
ForEachPart(part =>
|
||||||
|
{
|
||||||
|
part.BaseMask = RootPart.BaseMask;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
AdjustChildPrimPermissions();
|
AdjustChildPrimPermissions();
|
||||||
|
|
||||||
|
if (field == 1 && god) // Base mask was set. Update all child part inventories
|
||||||
|
{
|
||||||
|
foreach (SceneObjectPart part in Parts)
|
||||||
|
part.Inventory.ApplyGodPermissions(RootPart.BaseMask);
|
||||||
|
}
|
||||||
|
|
||||||
HasGroupChanged = true;
|
HasGroupChanged = true;
|
||||||
|
|
||||||
// Send the group's properties to all clients once all parts are updated
|
// Send the group's properties to all clients once all parts are updated
|
||||||
|
|
|
@ -4468,7 +4468,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (god)
|
if (god)
|
||||||
{
|
{
|
||||||
BaseMask = ApplyMask(BaseMask, set, mask);
|
BaseMask = ApplyMask(BaseMask, set, mask);
|
||||||
Inventory.ApplyGodPermissions(_baseMask);
|
Inventory.ApplyGodPermissions(BaseMask);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -4487,7 +4487,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
case 16:
|
case 16:
|
||||||
NextOwnerMask = ApplyMask(NextOwnerMask, set, mask) &
|
NextOwnerMask = ApplyMask(NextOwnerMask, set, mask) &
|
||||||
baseMask;
|
baseMask;
|
||||||
// Prevent the client from creating no mod, no copy
|
// Prevent the client from creating no copy, no transfer
|
||||||
// objects
|
// objects
|
||||||
if ((NextOwnerMask & (uint)PermissionMask.Copy) == 0)
|
if ((NextOwnerMask & (uint)PermissionMask.Copy) == 0)
|
||||||
NextOwnerMask |= (uint)PermissionMask.Transfer;
|
NextOwnerMask |= (uint)PermissionMask.Transfer;
|
||||||
|
@ -4505,20 +4505,20 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
bool update = false;
|
bool update = false;
|
||||||
|
|
||||||
if (BaseMask != source.BaseMask ||
|
uint prevOwnerMask = OwnerMask;
|
||||||
OwnerMask != source.OwnerMask ||
|
uint prevGroupMask = GroupMask;
|
||||||
GroupMask != source.GroupMask ||
|
uint prevEveryoneMask = EveryoneMask;
|
||||||
EveryoneMask != source.EveryoneMask ||
|
uint prevNextOwnerMask = NextOwnerMask;
|
||||||
NextOwnerMask != source.NextOwnerMask)
|
|
||||||
update = true;
|
|
||||||
|
|
||||||
BaseMask = source.BaseMask;
|
OwnerMask = source.OwnerMask & BaseMask;
|
||||||
OwnerMask = source.OwnerMask;
|
GroupMask = source.GroupMask & BaseMask;
|
||||||
GroupMask = source.GroupMask;
|
EveryoneMask = source.EveryoneMask & BaseMask;
|
||||||
EveryoneMask = source.EveryoneMask;
|
NextOwnerMask = source.NextOwnerMask & BaseMask;
|
||||||
NextOwnerMask = source.NextOwnerMask;
|
|
||||||
|
|
||||||
if (update)
|
if (OwnerMask != prevOwnerMask ||
|
||||||
|
GroupMask != prevGroupMask ||
|
||||||
|
EveryoneMask != prevEveryoneMask ||
|
||||||
|
NextOwnerMask != prevNextOwnerMask)
|
||||||
SendFullUpdateToAllClients();
|
SendFullUpdateToAllClients();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3795,6 +3795,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
if (World.GetExtraSetting("auto_grant_attach_perms") == "true")
|
if (World.GetExtraSetting("auto_grant_attach_perms") == "true")
|
||||||
implicitPerms = ScriptBaseClass.PERMISSION_ATTACH;
|
implicitPerms = ScriptBaseClass.PERMISSION_ATTACH;
|
||||||
}
|
}
|
||||||
|
if (World.GetExtraSetting("auto_grant_all_perms") == "true")
|
||||||
|
{
|
||||||
|
implicitPerms = perm;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((perm & (~implicitPerms)) == 0) // Requested only implicit perms
|
if ((perm & (~implicitPerms)) == 0) // Requested only implicit perms
|
||||||
|
|
Loading…
Reference in New Issue