* Tweaked patch mantis 1302 and committing it.

0.6.0-stable
Teravus Ovares 2008-05-17 00:16:16 +00:00
parent a5f08b430d
commit 349a17f664
8 changed files with 98 additions and 15 deletions

View File

@ -634,9 +634,14 @@ namespace OpenSim.Framework
LLUUID SecureSessionId { get; } LLUUID SecureSessionId { get; }
[Obsolete("LLClientView Specific - Use .Name instead. Do not assume an av has two names. Adam, this is impossible to completely refactor out. Nor would I suggest it. All applications that i've ever dealt with have firstname and lastname. However the firstname and lastname are not always the username.")] LLUUID ActiveGroupId { get; }
string ActiveGroupName { get; }
ulong ActiveGroupPowers { get; }
string FirstName { get; } string FirstName { get; }
[Obsolete("LLClientView Specific - Use .Name instead. Do not assume an av has two names. Adam, this is impossible to completely refactor out. Nor would I suggest it. All applications that i've ever dealt with have firstname and lastname. However the firstname and lastname are not always the username.")]
string LastName { get; } string LastName { get; }
[Obsolete("LLClientView Specific - Replace with ???")] [Obsolete("LLClientView Specific - Replace with ???")]
@ -655,6 +660,8 @@ namespace OpenSim.Framework
set; set;
} }
[Obsolete("LLClientView Specific - Circuits are unique to LLClientView")] [Obsolete("LLClientView Specific - Circuits are unique to LLClientView")]
uint CircuitCode { get; } uint CircuitCode { get; }
[Obsolete("LLClientView Specific - Replace with more bare-bones arguments.")] [Obsolete("LLClientView Specific - Replace with more bare-bones arguments.")]

View File

@ -129,6 +129,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
protected LLVector3 m_startpos; protected LLVector3 m_startpos;
protected EndPoint m_userEndPoint; protected EndPoint m_userEndPoint;
protected EndPoint m_proxyEndPoint; protected EndPoint m_proxyEndPoint;
protected LLUUID m_activeGroupID = LLUUID.Zero;
protected string m_activeGroupName = String.Empty;
protected ulong m_activeGroupPowers = 0;
/* Instantiated Designated Event Delegates */ /* Instantiated Designated Event Delegates */
//- used so we don't create new objects for each incoming packet and then toss it out later */ //- used so we don't create new objects for each incoming packet and then toss it out later */
@ -274,6 +277,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
get { return m_agentId; } get { return m_agentId; }
} }
public LLUUID ActiveGroupId
{
get { return m_activeGroupID; }
}
public string ActiveGroupName
{
get { return m_activeGroupName; }
}
public ulong ActiveGroupPowers
{
get { return m_activeGroupPowers; }
}
/// <summary> /// <summary>
/// This is a utility method used by single states to not duplicate kicks and blue card of death messages. /// This is a utility method used by single states to not duplicate kicks and blue card of death messages.
/// </summary> /// </summary>
@ -1691,6 +1709,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
public void SendAgentDataUpdate(LLUUID agentid, LLUUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) public void SendAgentDataUpdate(LLUUID agentid, LLUUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle)
{ {
m_activeGroupID = activegroupid;
m_activeGroupName = groupname;
m_activeGroupPowers = grouppowers;
AgentDataUpdatePacket sendAgentDataUpdate = (AgentDataUpdatePacket)PacketPool.Instance.GetPacket(PacketType.AgentDataUpdate); AgentDataUpdatePacket sendAgentDataUpdate = (AgentDataUpdatePacket)PacketPool.Instance.GetPacket(PacketType.AgentDataUpdate);
sendAgentDataUpdate.AgentData.ActiveGroupID = activegroupid; sendAgentDataUpdate.AgentData.ActiveGroupID = activegroupid;
sendAgentDataUpdate.AgentData.AgentID = agentid; sendAgentDataUpdate.AgentData.AgentID = agentid;

View File

@ -331,6 +331,21 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
set { } set { }
} }
public LLUUID ActiveGroupId
{
get { return LLUUID.Zero; }
}
public string ActiveGroupName
{
get { return String.Empty; }
}
public ulong ActiveGroupPowers
{
get { return 0; }
}
public virtual int NextAnimationSequenceNumber public virtual int NextAnimationSequenceNumber
{ {
get { return 1; } get { return 1; }
@ -743,4 +758,4 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
} }
#endregion #endregion
} }
} }

View File

@ -882,7 +882,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
if (m_bypassPermissions) return m_bypassPermissionsValue; if (m_bypassPermissions) return m_bypassPermissionsValue;
return true; return false;
} }
private bool CanViewNotecard(LLUUID notecard, LLUUID objectID, LLUUID user, Scene scene) private bool CanViewNotecard(LLUUID notecard, LLUUID objectID, LLUUID user, Scene scene)
@ -890,7 +890,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
if (m_bypassPermissions) return m_bypassPermissionsValue; if (m_bypassPermissions) return m_bypassPermissionsValue;
return true; return false;
} }
#endregion #endregion

View File

@ -769,7 +769,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
if (XferManager != null) if (XferManager != null)
{ {
group.RequestInventoryFile(primLocalID, XferManager); group.RequestInventoryFile(remoteClient, primLocalID, XferManager);
} }
} }
} }

View File

@ -157,12 +157,12 @@ namespace OpenSim.Region.Environment.Scenes
/// </summary> /// </summary>
/// <param name="localID"></param> /// <param name="localID"></param>
/// <param name="xferManager"></param> /// <param name="xferManager"></param>
public void RequestInventoryFile(uint localID, IXfer xferManager) public void RequestInventoryFile(IClientAPI client, uint localID, IXfer xferManager)
{ {
SceneObjectPart part = GetChildPart(localID); SceneObjectPart part = GetChildPart(localID);
if (part != null) if (part != null)
{ {
part.RequestInventoryFile(xferManager); part.RequestInventoryFile(client, xferManager);
} }
else else
{ {

View File

@ -484,7 +484,7 @@ namespace OpenSim.Region.Environment.Scenes
/// Serialize all the metadata for the items in this prim's inventory ready for sending to the client /// Serialize all the metadata for the items in this prim's inventory ready for sending to the client
/// </summary> /// </summary>
/// <param name="xferManager"></param> /// <param name="xferManager"></param>
public void RequestInventoryFile(IXfer xferManager) public void RequestInventoryFile(IClientAPI client, IXfer xferManager)
{ {
byte[] fileData = new byte[0]; byte[] fileData = new byte[0];
@ -497,23 +497,45 @@ namespace OpenSim.Region.Environment.Scenes
{ {
foreach (TaskInventoryItem item in m_taskInventory.Values) foreach (TaskInventoryItem item in m_taskInventory.Values)
{ {
LLUUID ownerID=item.OwnerID;
uint everyoneMask=0;
uint baseMask=item.BaseMask;
uint ownerMask=item.OwnerMask;
if(item.InvType == 10) // Script
{
if((item.OwnerID != client.AgentId) && m_parentGroup.Scene.ExternalChecks.ExternalChecksCanViewScript(item.ItemID, UUID, client.AgentId))
{
ownerID=client.AgentId;
baseMask=0x7fffffff;
ownerMask=0x7fffffff;
everyoneMask=(uint)(PermissionMask.Move | PermissionMask.Transfer);
}
if((item.OwnerID != client.AgentId) && m_parentGroup.Scene.ExternalChecks.ExternalChecksCanEditScript(item.ItemID, UUID, client.AgentId))
{
ownerID=client.AgentId;
baseMask=0x7fffffff;
ownerMask=0x7fffffff;
everyoneMask=(uint)(PermissionMask.Move | PermissionMask.Transfer | PermissionMask.Modify);
}
}
invString.AddItemStart(); invString.AddItemStart();
invString.AddNameValueLine("item_id", item.ItemID.ToString()); invString.AddNameValueLine("item_id", item.ItemID.ToString());
invString.AddNameValueLine("parent_id", UUID.ToString()); invString.AddNameValueLine("parent_id", UUID.ToString());
invString.AddPermissionsStart(); invString.AddPermissionsStart();
invString.AddNameValueLine("base_mask", Helpers.UIntToHexString(item.BaseMask)); invString.AddNameValueLine("base_mask", Helpers.UIntToHexString(baseMask));
invString.AddNameValueLine("owner_mask", Helpers.UIntToHexString(item.OwnerMask)); invString.AddNameValueLine("owner_mask", Helpers.UIntToHexString(ownerMask));
invString.AddNameValueLine("group_mask", "00000000"); invString.AddNameValueLine("group_mask", Helpers.UIntToHexString(0));
invString.AddNameValueLine("everyone_mask", "00000000"); invString.AddNameValueLine("everyone_mask", Helpers.UIntToHexString(everyoneMask));
invString.AddNameValueLine("next_owner_mask", Helpers.UIntToHexString(item.NextOwnerMask)); invString.AddNameValueLine("next_owner_mask", Helpers.UIntToHexString(item.NextOwnerMask));
invString.AddNameValueLine("creator_id", item.CreatorID.ToString()); invString.AddNameValueLine("creator_id", item.CreatorID.ToString());
invString.AddNameValueLine("owner_id", item.OwnerID.ToString()); invString.AddNameValueLine("owner_id", ownerID.ToString());
invString.AddNameValueLine("last_owner_id", item.LastOwnerID.ToString()); invString.AddNameValueLine("last_owner_id", item.LastOwnerID.ToString());
// invString.AddNameValueLine("last_owner_id", item.OwnerID.ToString());
invString.AddNameValueLine("group_id", item.GroupID.ToString()); invString.AddNameValueLine("group_id", item.GroupID.ToString());
invString.AddSectionEnd(); invString.AddSectionEnd();
@ -538,6 +560,7 @@ namespace OpenSim.Region.Environment.Scenes
fileData = Helpers.StringToField(invString.BuildString); fileData = Helpers.StringToField(invString.BuildString);
//Console.WriteLine(Helpers.FieldToUTF8String(fileData));
//m_log.Debug("[PRIM INVENTORY]: RequestInventoryFile fileData: " + Helpers.FieldToUTF8String(fileData)); //m_log.Debug("[PRIM INVENTORY]: RequestInventoryFile fileData: " + Helpers.FieldToUTF8String(fileData));
if (fileData.Length > 2) if (fileData.Length > 2)

View File

@ -246,6 +246,21 @@ namespace OpenSim.Region.Examples.SimpleModule
set { } set { }
} }
public LLUUID ActiveGroupId
{
get { return LLUUID.Zero; }
}
public string ActiveGroupName
{
get { return String.Empty; }
}
public ulong ActiveGroupPowers
{
get { return 0; }
}
public virtual int NextAnimationSequenceNumber public virtual int NextAnimationSequenceNumber
{ {
get { return 1; } get { return 1; }