add a few methods to modify clientview group powers
parent
1777324a86
commit
aa744eecf2
|
@ -1473,6 +1473,9 @@ namespace OpenSim.Framework
|
|||
|
||||
void SendAgentDropGroup(UUID groupID);
|
||||
void RefreshGroupMembership();
|
||||
void UpdateGroupMembership(GroupMembershipData[] data);
|
||||
void GroupMembershipRemove(UUID GroupID);
|
||||
void GroupMembershipAddReplace(UUID GroupID,ulong GroupPowers);
|
||||
void SendAvatarNotesReply(UUID targetID, string text);
|
||||
void SendAvatarPicksReply(UUID targetID, Dictionary<UUID, string> picks);
|
||||
void SendPickInfoReply(UUID pickID,UUID creatorID, bool topPick, UUID parcelID, string name, string desc, UUID snapshotID, string user, string originalName, string simName, Vector3 posGlobal, int sortOrder, bool enabled);
|
||||
|
|
|
@ -2755,29 +2755,34 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
public void SendGroupMembership(GroupMembershipData[] GroupMembership)
|
||||
{
|
||||
m_groupPowers.Clear();
|
||||
|
||||
// maybe removed in future, use SendAgentGroupDataUpdate instead ( but make sure to update groupPowers )
|
||||
AgentGroupDataUpdatePacket Groupupdate = new AgentGroupDataUpdatePacket();
|
||||
AgentGroupDataUpdatePacket.GroupDataBlock[] Groups = new AgentGroupDataUpdatePacket.GroupDataBlock[GroupMembership.Length];
|
||||
for (int i = 0; i < GroupMembership.Length; i++)
|
||||
|
||||
lock(m_groupPowers)
|
||||
{
|
||||
m_groupPowers[GroupMembership[i].GroupID] = GroupMembership[i].GroupPowers;
|
||||
|
||||
AgentGroupDataUpdatePacket.GroupDataBlock Group = new AgentGroupDataUpdatePacket.GroupDataBlock();
|
||||
Group.AcceptNotices = GroupMembership[i].AcceptNotices;
|
||||
Group.Contribution = GroupMembership[i].Contribution;
|
||||
Group.GroupID = GroupMembership[i].GroupID;
|
||||
Group.GroupInsigniaID = GroupMembership[i].GroupPicture;
|
||||
Group.GroupName = Util.StringToBytes256(GroupMembership[i].GroupName);
|
||||
Group.GroupPowers = GroupMembership[i].GroupPowers;
|
||||
Groups[i] = Group;
|
||||
m_groupPowers.Clear();
|
||||
|
||||
for (int i = 0; i < GroupMembership.Length; i++)
|
||||
{
|
||||
m_groupPowers[GroupMembership[i].GroupID] = GroupMembership[i].GroupPowers;
|
||||
|
||||
AgentGroupDataUpdatePacket.GroupDataBlock Group = new AgentGroupDataUpdatePacket.GroupDataBlock();
|
||||
Group.AcceptNotices = GroupMembership[i].AcceptNotices;
|
||||
Group.Contribution = GroupMembership[i].Contribution;
|
||||
Group.GroupID = GroupMembership[i].GroupID;
|
||||
Group.GroupInsigniaID = GroupMembership[i].GroupPicture;
|
||||
Group.GroupName = Util.StringToBytes256(GroupMembership[i].GroupName);
|
||||
Group.GroupPowers = GroupMembership[i].GroupPowers;
|
||||
Groups[i] = Group;
|
||||
}
|
||||
}
|
||||
|
||||
Groupupdate.GroupData = Groups;
|
||||
Groupupdate.AgentData = new AgentGroupDataUpdatePacket.AgentDataBlock();
|
||||
Groupupdate.AgentData.AgentID = AgentId;
|
||||
|
||||
|
||||
IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
|
||||
try
|
||||
{
|
||||
|
@ -5639,9 +5644,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
if (groupID == ActiveGroupId)
|
||||
return ActiveGroupPowers;
|
||||
|
||||
if (m_groupPowers.ContainsKey(groupID))
|
||||
return m_groupPowers[groupID];
|
||||
|
||||
lock(m_groupPowers)
|
||||
{
|
||||
if (m_groupPowers.ContainsKey(groupID))
|
||||
return m_groupPowers[groupID];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -12952,23 +12959,57 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
public void RefreshGroupMembership()
|
||||
{
|
||||
if (m_GroupsModule != null)
|
||||
lock(m_groupPowers)
|
||||
{
|
||||
GroupMembershipData[] GroupMembership =
|
||||
if (m_GroupsModule != null)
|
||||
{
|
||||
GroupMembershipData[] GroupMembership =
|
||||
m_GroupsModule.GetMembershipData(AgentId);
|
||||
|
||||
m_groupPowers.Clear();
|
||||
|
||||
if (GroupMembership != null)
|
||||
{
|
||||
for (int i = 0; i < GroupMembership.Length; i++)
|
||||
m_groupPowers.Clear();
|
||||
|
||||
if (GroupMembership != null)
|
||||
{
|
||||
m_groupPowers[GroupMembership[i].GroupID] = GroupMembership[i].GroupPowers;
|
||||
for (int i = 0; i < GroupMembership.Length; i++)
|
||||
{
|
||||
m_groupPowers[GroupMembership[i].GroupID] = GroupMembership[i].GroupPowers;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateGroupMembership(GroupMembershipData[] data)
|
||||
{
|
||||
lock(m_groupPowers)
|
||||
{
|
||||
m_groupPowers.Clear();
|
||||
|
||||
if (data != null)
|
||||
{
|
||||
for (int i = 0; i < data.Length; i++)
|
||||
m_groupPowers[data[i].GroupID] = data[i].GroupPowers;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void GroupMembershipRemove(UUID GroupID)
|
||||
{
|
||||
lock(m_groupPowers)
|
||||
{
|
||||
if(m_groupPowers.ContainsKey(GroupID))
|
||||
m_groupPowers.Remove(GroupID);
|
||||
}
|
||||
}
|
||||
|
||||
public void GroupMembershipAddReplace(UUID GroupID,ulong GroupPowers)
|
||||
{
|
||||
lock(m_groupPowers)
|
||||
{
|
||||
m_groupPowers[GroupID] = GroupPowers;
|
||||
}
|
||||
}
|
||||
|
||||
public string Report()
|
||||
{
|
||||
return m_udpClient.GetStats();
|
||||
|
|
|
@ -1626,6 +1626,22 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
|||
|
||||
}
|
||||
|
||||
public void UpdateGroupMembership(GroupMembershipData[] data)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void GroupMembershipRemove(UUID GroupID)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void GroupMembershipAddReplace(UUID GroupID,ulong GroupPowers)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void SendAvatarNotesReply(UUID targetID, string text)
|
||||
{
|
||||
|
||||
|
|
|
@ -1255,6 +1255,18 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
|||
{
|
||||
}
|
||||
|
||||
public void UpdateGroupMembership(GroupMembershipData[] data)
|
||||
{
|
||||
}
|
||||
|
||||
public void GroupMembershipRemove(UUID GroupID)
|
||||
{
|
||||
}
|
||||
|
||||
public void GroupMembershipAddReplace(UUID GroupID,ulong GroupPowers)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendUseCachedMuteList()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -1281,6 +1281,18 @@ namespace OpenSim.Tests.Common
|
|||
{
|
||||
}
|
||||
|
||||
public void UpdateGroupMembership(GroupMembershipData[] data)
|
||||
{
|
||||
}
|
||||
|
||||
public void GroupMembershipRemove(UUID GroupID)
|
||||
{
|
||||
}
|
||||
|
||||
public void GroupMembershipAddReplace(UUID GroupID,ulong GroupPowers)
|
||||
{
|
||||
}
|
||||
|
||||
public void SendUseCachedMuteList()
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue