Merge branch 'master' into httptests

This commit is contained in:
UbitUmarov
2016-07-27 23:39:50 +01:00
43 changed files with 863 additions and 630 deletions

View File

@@ -568,12 +568,12 @@ namespace OpenSim.Region.ClientStack.Linden
}
public void ChatterBoxSessionAgentListUpdates(UUID sessionID, UUID fromAgent, UUID anotherAgent, bool canVoiceChat,
bool isModerator, bool textMute)
public void ChatterBoxSessionAgentListUpdates(UUID sessionID, UUID fromAgent, UUID toAgent, bool canVoiceChat,
bool isModerator, bool textMute, bool isEnterorLeave)
{
OSD item = EventQueueHelper.ChatterBoxSessionAgentListUpdates(sessionID, fromAgent, canVoiceChat,
isModerator, textMute);
Enqueue(item, fromAgent);
isModerator, textMute, isEnterorLeave);
Enqueue(item, toAgent);
//m_log.InfoFormat("########### eq ChatterBoxSessionAgentListUpdates #############\n{0}", item);
}

View File

@@ -308,20 +308,29 @@ namespace OpenSim.Region.ClientStack.Linden
}
public static OSD ChatterBoxSessionAgentListUpdates(UUID sessionID,
UUID agentID, bool canVoiceChat, bool isModerator, bool textMute)
UUID agentID, bool canVoiceChat, bool isModerator, bool textMute, bool isEnterorLeave)
{
OSDMap body = new OSDMap();
OSDMap agentUpdates = new OSDMap();
OSDMap infoDetail = new OSDMap();
OSDMap mutes = new OSDMap();
// this should be a list of agents and parameters
// foreach agent
mutes.Add("text", OSD.FromBoolean(textMute));
infoDetail.Add("can_voice_chat", OSD.FromBoolean(canVoiceChat));
infoDetail.Add("is_moderator", OSD.FromBoolean(isModerator));
infoDetail.Add("mutes", mutes);
OSDMap info = new OSDMap();
info.Add("info", infoDetail);
if(isEnterorLeave)
info.Add("transition",OSD.FromString("ENTER"));
else
info.Add("transition",OSD.FromString("LEAVE"));
agentUpdates.Add(agentID.ToString(), info);
// foreach end
body.Add("agent_updates", agentUpdates);
body.Add("session_id", OSD.FromUUID(sessionID));
body.Add("updates", new OSD());

View File

@@ -421,9 +421,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
public UUID AgentId { get { return m_agentId; } }
public ISceneAgent SceneAgent { get; set; }
public UUID ActiveGroupId { get { return m_activeGroupID; } private set { m_activeGroupID = value; } }
public string ActiveGroupName { get { return m_activeGroupName; } private set { m_activeGroupName = value; } }
public ulong ActiveGroupPowers { get { return m_activeGroupPowers; } private set { m_activeGroupPowers = value; } }
public UUID ActiveGroupId { get { return m_activeGroupID; } set { m_activeGroupID = value; } }
public string ActiveGroupName { get { return m_activeGroupName; } set { m_activeGroupName = value; } }
public ulong ActiveGroupPowers { get { return m_activeGroupPowers; } set { m_activeGroupPowers = value; } }
public bool IsGroupMember(UUID groupID) { return m_groupPowers.ContainsKey(groupID); }
public int PingTimeMS
@@ -953,7 +953,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
/// Send an instant message to this client
/// </summary>
//
// Don't remove transaction ID! Groups and item gives need to set it!
public void SendInstantMessage(GridInstantMessage im)
{
if (((Scene)(m_scene)).Permissions.CanInstantMessage(new UUID(im.fromAgentID), new UUID(im.toAgentID)))
@@ -962,14 +961,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
= (ImprovedInstantMessagePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedInstantMessage);
msg.AgentData.AgentID = new UUID(im.fromAgentID);
msg.AgentData.SessionID = UUID.Zero;
msg.AgentData.SessionID = new UUID(im.imSessionID);
msg.MessageBlock.FromAgentName = Util.StringToBytes256(im.fromAgentName);
msg.MessageBlock.Dialog = im.dialog;
msg.MessageBlock.FromGroup = im.fromGroup;
if (im.imSessionID == UUID.Zero.Guid)
msg.MessageBlock.ID = new UUID(im.fromAgentID) ^ new UUID(im.toAgentID);
else
msg.MessageBlock.ID = new UUID(im.imSessionID);
msg.MessageBlock.ID = new UUID(im.ID);
msg.MessageBlock.Offline = im.offline;
msg.MessageBlock.ParentEstateID = im.ParentEstateID;
msg.MessageBlock.Position = im.Position;
@@ -5786,6 +5782,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(packet, ThrottleOutPacketType.Task);
}
public Dictionary<UUID, ulong> GetGroupPowers()
{
lock(m_groupPowers)
{
return new Dictionary<UUID, ulong>(m_groupPowers);
}
}
public void SetGroupPowers(Dictionary<UUID, ulong> powers)
{
lock(m_groupPowers)
{
m_groupPowers.Clear();
m_groupPowers = powers;
}
}
public ulong GetGroupPowers(UUID groupID)
{
if (groupID == ActiveGroupId)