From bb824eadeeb2b35025954d0c97f15123c6fd0cbe Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 5 Dec 2007 06:44:32 +0000 Subject: * Refactored Permissions into ScenePresence as requested by MW * Un-hackerized generating the client_flags * Now handling the ObjectPermissions Update packet * Warning: Backup your prim before updating. If you fail to do so and something goes wrong then, All Yr prim are belong to us! --- OpenSim/Region/ClientStack/ClientView.cs | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 06470b6..3198731 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs @@ -564,6 +564,8 @@ namespace OpenSim.Region.ClientStack // Previously ClientView.API partial class public event Action OnLogout; + public event ObjectPermissions OnObjectPermissions; + public event Action OnConnectionClosed; public event ViewerEffectEventHandler OnViewerEffect; public event ImprovedInstantMessage OnInstantMessage; @@ -2919,7 +2921,35 @@ namespace OpenSim.Region.ClientStack } break; case PacketType.ObjectPermissions: - // MainLog.Instance.Warn("CLIENT", "unhandled packet " + Pack.ToString()); + MainLog.Instance.Warn("CLIENT", "unhandled packet " + PacketType.ObjectPermissions.ToString()); + ObjectPermissionsPacket newobjPerms = (ObjectPermissionsPacket)Pack; + + List permChanges = new List(); + + for (int i = 0; i < newobjPerms.ObjectData.Length; i++) + { + permChanges.Add(newobjPerms.ObjectData[i]); + } + + // Here's our data, + // PermField contains the field the info goes into + // PermField determines which mask we're changing + // + // chmask is the mask of the change + // setTF is whether we're adding it or taking it away + // + // objLocalID is the localID of the object. + + // Unfortunately, we have to pass the event the packet because objData is an array + // That means multiple object perms may be updated in a single packet. + + LLUUID AgentID = newobjPerms.AgentData.AgentID; + LLUUID SessionID = newobjPerms.AgentData.SessionID; + if (OnObjectPermissions != null) + { + OnObjectPermissions(this, AgentID, SessionID, permChanges); + } + break; case PacketType.RequestObjectPropertiesFamily: -- cgit v1.1