/// <summary> /// Change the rights of a friend avatar. /// </summary> /// <param name="friendID">the <seealso cref="UUID"/> of the friend</param> /// <param name="rights">the new rights to give the friend</param> /// <remarks>This method will implicitly set the rights to those passed in the rights parameter.</remarks> public void GrantRights(UUID friendID, FriendRights rights) { GrantUserRightsPacket request = new GrantUserRightsPacket(); request.AgentData.AgentID = Client.Self.AgentID; request.AgentData.SessionID = Client.Self.SessionID; request.Rights = new GrantUserRightsPacket.RightsBlock[1]; request.Rights[0] = new GrantUserRightsPacket.RightsBlock(); request.Rights[0].AgentRelated = friendID; request.Rights[0].RelatedRights = (int)rights; Client.Network.SendPacket(request); }
/// <summary> /// Change the rights of a friend avatar. To use this routine, first change the right of the /// avatar stored in the item property. /// </summary> /// <param name="agentID">System ID of the avatar you are changing the rights of</param> public void GrantRights(LLUUID agentID) { GrantUserRightsPacket request = new GrantUserRightsPacket(); request.AgentData.AgentID = Client.Self.AgentID; request.AgentData.SessionID = Client.Self.SessionID; request.Rights = new GrantUserRightsPacket.RightsBlock[1]; request.Rights[0] = new GrantUserRightsPacket.RightsBlock(); request.Rights[0].AgentRelated = agentID; request.Rights[0].RelatedRights = (int)(_Friends[agentID].TheirFriendRights); Client.Network.SendPacket(request); }
/// <summary> /// Grants the specified user rights such as map or modify /// </summary> /// <param name="targetID">The user to grant rights to</param> /// <param name="viewOnlineStatus">User can see your online status</param> /// <param name="viewMapLocation">User can see your map location</param> /// <param name="modifyObjects">User can modify your objects</param> public void GrantUserRights(LLUUID targetID, bool viewOnlineStatus, bool viewMapLocation, bool modifyObjects) { UserRights rights = UserRights.None; if (viewOnlineStatus) rights |= UserRights.ViewOnlineStatus; if (viewMapLocation) rights |= UserRights.ViewMapLocation; if (modifyObjects) rights |= UserRights.ModifyObjects; GrantUserRightsPacket p = new GrantUserRightsPacket(); p.AgentData.AgentID = Client.Network.AgentID; p.AgentData.SessionID = Client.Network.SessionID; p.Rights = new GrantUserRightsPacket.RightsBlock[1]; p.Rights[0] = new GrantUserRightsPacket.RightsBlock(); p.Rights[0].AgentRelated = targetID; p.Rights[0].RelatedRights = (int)rights; Client.Network.SendPacket(p); }
/// <summary> /// Change the rights of a friend avatar. To use this routine, first change the right of the /// avatar stored in the item property. /// </summary> /// <param name="agentID">System ID of the avatar you are changing the rights of</param> public void GrantRights(LLUUID agentID) { GrantUserRightsPacket request = new GrantUserRightsPacket(); request.AgentData.AgentID = Client.Self.AgentID; request.AgentData.SessionID = Client.Self.SessionID; request.Rights = new GrantUserRightsPacket.RightsBlock[1]; request.Rights[0] = new GrantUserRightsPacket.RightsBlock(); request.Rights[0].AgentRelated = agentID; request.Rights[0].RelatedRights = (int)(FriendList[agentID].TheirFriendRights); Client.Network.SendPacket(request); }