Merge branch 'master' of opensimulator.org:/var/git/opensim
commit
4468aa0dcf
|
@ -1276,13 +1276,9 @@ namespace OpenSim.Groups
|
||||||
SendDataUpdate(remoteClient, tellOthers);
|
SendDataUpdate(remoteClient, tellOthers);
|
||||||
|
|
||||||
GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, agentID);
|
GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, agentID);
|
||||||
IEventQueue eq = remoteClient.Scene.RequestModuleInterface<IEventQueue>();
|
|
||||||
if (eq != null)
|
|
||||||
eq.GroupMembershipData(agentID, membershipArray);
|
|
||||||
else
|
|
||||||
remoteClient.SendGroupMembership(membershipArray);
|
|
||||||
|
|
||||||
remoteClient.RefreshGroupMembership();
|
remoteClient.RefreshGroupMembership();
|
||||||
|
remoteClient.SendAgentGroupDataUpdate(agentID, membershipArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -1473,6 +1473,9 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
void SendAgentDropGroup(UUID groupID);
|
void SendAgentDropGroup(UUID groupID);
|
||||||
void RefreshGroupMembership();
|
void RefreshGroupMembership();
|
||||||
|
void UpdateGroupMembership(GroupMembershipData[] data);
|
||||||
|
void GroupMembershipRemove(UUID GroupID);
|
||||||
|
void GroupMembershipAddReplace(UUID GroupID,ulong GroupPowers);
|
||||||
void SendAvatarNotesReply(UUID targetID, string text);
|
void SendAvatarNotesReply(UUID targetID, string text);
|
||||||
void SendAvatarPicksReply(UUID targetID, Dictionary<UUID, string> picks);
|
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);
|
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);
|
||||||
|
|
|
@ -579,12 +579,6 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
Enqueue(item, avatarID);
|
Enqueue(item, avatarID);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void GroupMembership(AgentGroupDataUpdatePacket groupUpdate, UUID avatarID)
|
|
||||||
{
|
|
||||||
OSD item = EventQueueHelper.GroupMembership(groupUpdate);
|
|
||||||
Enqueue(item, avatarID);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data)
|
public void GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data)
|
||||||
{
|
{
|
||||||
OSD item = EventQueueHelper.GroupMembershipData(receiverAgent, data);
|
OSD item = EventQueueHelper.GroupMembershipData(receiverAgent, data);
|
||||||
|
|
|
@ -333,40 +333,6 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
return chatterBoxSessionAgentListUpdates;
|
return chatterBoxSessionAgentListUpdates;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static OSD GroupMembership(AgentGroupDataUpdatePacket groupUpdatePacket)
|
|
||||||
{
|
|
||||||
OSDMap groupUpdate = new OSDMap();
|
|
||||||
groupUpdate.Add("message", OSD.FromString("AgentGroupDataUpdate"));
|
|
||||||
|
|
||||||
OSDMap body = new OSDMap();
|
|
||||||
OSDArray agentData = new OSDArray();
|
|
||||||
OSDMap agentDataMap = new OSDMap();
|
|
||||||
agentDataMap.Add("AgentID", OSD.FromUUID(groupUpdatePacket.AgentData.AgentID));
|
|
||||||
agentData.Add(agentDataMap);
|
|
||||||
body.Add("AgentData", agentData);
|
|
||||||
|
|
||||||
OSDArray groupData = new OSDArray();
|
|
||||||
|
|
||||||
foreach (AgentGroupDataUpdatePacket.GroupDataBlock groupDataBlock in groupUpdatePacket.GroupData)
|
|
||||||
{
|
|
||||||
OSDMap groupDataMap = new OSDMap();
|
|
||||||
groupDataMap.Add("ListInProfile", OSD.FromBoolean(false));
|
|
||||||
groupDataMap.Add("GroupID", OSD.FromUUID(groupDataBlock.GroupID));
|
|
||||||
groupDataMap.Add("GroupInsigniaID", OSD.FromUUID(groupDataBlock.GroupInsigniaID));
|
|
||||||
groupDataMap.Add("Contribution", OSD.FromInteger(groupDataBlock.Contribution));
|
|
||||||
groupDataMap.Add("GroupPowers", OSD.FromBinary(ulongToByteArray(groupDataBlock.GroupPowers)));
|
|
||||||
groupDataMap.Add("GroupName", OSD.FromString(Utils.BytesToString(groupDataBlock.GroupName)));
|
|
||||||
groupDataMap.Add("AcceptNotices", OSD.FromBoolean(groupDataBlock.AcceptNotices));
|
|
||||||
|
|
||||||
groupData.Add(groupDataMap);
|
|
||||||
|
|
||||||
}
|
|
||||||
body.Add("GroupData", groupData);
|
|
||||||
groupUpdate.Add("body", body);
|
|
||||||
|
|
||||||
return groupUpdate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static OSD GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data)
|
public static OSD GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data)
|
||||||
{
|
{
|
||||||
OSDArray AgentData = new OSDArray(1);
|
OSDArray AgentData = new OSDArray(1);
|
||||||
|
|
|
@ -2755,44 +2755,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
public void SendGroupMembership(GroupMembershipData[] GroupMembership)
|
public void SendGroupMembership(GroupMembershipData[] GroupMembership)
|
||||||
{
|
{
|
||||||
m_groupPowers.Clear();
|
|
||||||
|
|
||||||
AgentGroupDataUpdatePacket Groupupdate = new AgentGroupDataUpdatePacket();
|
UpdateGroupMembership(GroupMembership);
|
||||||
AgentGroupDataUpdatePacket.GroupDataBlock[] Groups = new AgentGroupDataUpdatePacket.GroupDataBlock[GroupMembership.Length];
|
SendAgentGroupDataUpdate(AgentId,GroupMembership);
|
||||||
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;
|
|
||||||
//OutPacket(Groupupdate, ThrottleOutPacketType.Task);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
|
|
||||||
if (eq != null)
|
|
||||||
{
|
|
||||||
eq.GroupMembership(Groupupdate, this.AgentId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
m_log.Error("Unable to send group membership data via eventqueue - exception: " + ex.ToString());
|
|
||||||
m_log.Warn("sending group membership data via UDP");
|
|
||||||
OutPacket(Groupupdate, ThrottleOutPacketType.Task);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendPartPhysicsProprieties(ISceneEntity entity)
|
public void SendPartPhysicsProprieties(ISceneEntity entity)
|
||||||
|
@ -3423,41 +3388,35 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
public void SendAgentGroupDataUpdate(UUID avatarID, GroupMembershipData[] data)
|
public void SendAgentGroupDataUpdate(UUID avatarID, GroupMembershipData[] data)
|
||||||
{
|
{
|
||||||
|
if(avatarID != AgentId)
|
||||||
|
m_log.Debug("[CLIENT]: SendAgentGroupDataUpdate avatarID != AgentId");
|
||||||
|
|
||||||
IEventQueue eq = this.Scene.RequestModuleInterface<IEventQueue>();
|
IEventQueue eq = this.Scene.RequestModuleInterface<IEventQueue>();
|
||||||
|
if(eq != null)
|
||||||
// use UDP if no caps
|
|
||||||
if (eq == null)
|
|
||||||
{
|
{
|
||||||
SendGroupMembership(data);
|
eq.GroupMembershipData(avatarID,data);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
OSDMap llsd = new OSDMap(3);
|
|
||||||
OSDArray AgentData = new OSDArray(1);
|
|
||||||
OSDMap AgentDataMap = new OSDMap(1);
|
|
||||||
AgentDataMap.Add("AgentID", OSD.FromUUID(this.AgentId));
|
|
||||||
AgentDataMap.Add("AvatarID", OSD.FromUUID(avatarID));
|
|
||||||
AgentData.Add(AgentDataMap);
|
|
||||||
llsd.Add("AgentData", AgentData);
|
|
||||||
OSDArray GroupData = new OSDArray(data.Length);
|
|
||||||
OSDArray NewGroupData = new OSDArray(data.Length);
|
|
||||||
foreach (GroupMembershipData m in data)
|
|
||||||
{
|
{
|
||||||
OSDMap GroupDataMap = new OSDMap(6);
|
// use UDP if no caps
|
||||||
OSDMap NewGroupDataMap = new OSDMap(1);
|
AgentGroupDataUpdatePacket Groupupdate = new AgentGroupDataUpdatePacket();
|
||||||
GroupDataMap.Add("GroupPowers", OSD.FromULong(m.GroupPowers));
|
AgentGroupDataUpdatePacket.GroupDataBlock[] Groups = new AgentGroupDataUpdatePacket.GroupDataBlock[data.Length];
|
||||||
GroupDataMap.Add("AcceptNotices", OSD.FromBoolean(m.AcceptNotices));
|
for (int i = 0; i < data.Length; i++)
|
||||||
GroupDataMap.Add("GroupTitle", OSD.FromString(m.GroupTitle));
|
{
|
||||||
GroupDataMap.Add("GroupID", OSD.FromUUID(m.GroupID));
|
AgentGroupDataUpdatePacket.GroupDataBlock Group = new AgentGroupDataUpdatePacket.GroupDataBlock();
|
||||||
GroupDataMap.Add("GroupName", OSD.FromString(m.GroupName));
|
Group.AcceptNotices = data[i].AcceptNotices;
|
||||||
GroupDataMap.Add("GroupInsigniaID", OSD.FromUUID(m.GroupPicture));
|
Group.Contribution = data[i].Contribution;
|
||||||
NewGroupDataMap.Add("ListInProfile", OSD.FromBoolean(m.ListInProfile));
|
Group.GroupID = data[i].GroupID;
|
||||||
GroupData.Add(GroupDataMap);
|
Group.GroupInsigniaID = data[i].GroupPicture;
|
||||||
NewGroupData.Add(NewGroupDataMap);
|
Group.GroupName = Util.StringToBytes256(data[i].GroupName);
|
||||||
|
Group.GroupPowers = data[i].GroupPowers;
|
||||||
|
Groups[i] = Group;
|
||||||
|
}
|
||||||
|
Groupupdate.GroupData = Groups;
|
||||||
|
Groupupdate.AgentData = new AgentGroupDataUpdatePacket.AgentDataBlock();
|
||||||
|
Groupupdate.AgentData.AgentID = avatarID;
|
||||||
|
OutPacket(Groupupdate, ThrottleOutPacketType.Task);
|
||||||
}
|
}
|
||||||
llsd.Add("GroupData", GroupData);
|
|
||||||
llsd.Add("NewGroupData", NewGroupData);
|
|
||||||
|
|
||||||
eq.Enqueue(BuildEvent("AgentGroupDataUpdate", llsd), this.AgentId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendJoinGroupReply(UUID groupID, bool success)
|
public void SendJoinGroupReply(UUID groupID, bool success)
|
||||||
|
@ -5642,9 +5601,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
if (groupID == ActiveGroupId)
|
if (groupID == ActiveGroupId)
|
||||||
return ActiveGroupPowers;
|
return ActiveGroupPowers;
|
||||||
|
|
||||||
if (m_groupPowers.ContainsKey(groupID))
|
lock(m_groupPowers)
|
||||||
return m_groupPowers[groupID];
|
{
|
||||||
|
if (m_groupPowers.ContainsKey(groupID))
|
||||||
|
return m_groupPowers[groupID];
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11011,7 +10972,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
if (m_GroupsModule != null)
|
if (m_GroupsModule != null)
|
||||||
{
|
{
|
||||||
m_GroupsModule.ActivateGroup(this, activateGroupPacket.AgentData.GroupID);
|
m_GroupsModule.ActivateGroup(this, activateGroupPacket.AgentData.GroupID);
|
||||||
m_GroupsModule.SendAgentGroupDataUpdate(this);
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -11136,11 +11096,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UUID lastGroupProfileRequestID = UUID.Zero;
|
||||||
|
double lastGroupProfileRequestTS = Util.GetTimeStampMS();
|
||||||
|
|
||||||
private bool HandleGroupProfileRequest(IClientAPI sender, Packet Pack)
|
private bool HandleGroupProfileRequest(IClientAPI sender, Packet Pack)
|
||||||
{
|
{
|
||||||
|
if(m_GroupsModule == null)
|
||||||
|
return true;
|
||||||
|
|
||||||
GroupProfileRequestPacket groupProfileRequest =
|
GroupProfileRequestPacket groupProfileRequest =
|
||||||
(GroupProfileRequestPacket)Pack;
|
(GroupProfileRequestPacket)Pack;
|
||||||
|
|
||||||
|
|
||||||
#region Packet Session and User Check
|
#region Packet Session and User Check
|
||||||
if (m_checkPackets)
|
if (m_checkPackets)
|
||||||
{
|
{
|
||||||
|
@ -11150,50 +11118,62 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
if (m_GroupsModule != null)
|
UUID grpID = groupProfileRequest.GroupData.GroupID;
|
||||||
|
double ts = Util.GetTimeStampMS();
|
||||||
|
if(grpID == lastGroupProfileRequestID && ts - lastGroupProfileRequestTS < 10000)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
lastGroupProfileRequestID = grpID;
|
||||||
|
lastGroupProfileRequestTS = ts;
|
||||||
|
|
||||||
|
GroupProfileReplyPacket groupProfileReply = (GroupProfileReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupProfileReply);
|
||||||
|
|
||||||
|
groupProfileReply.AgentData = new GroupProfileReplyPacket.AgentDataBlock();
|
||||||
|
groupProfileReply.GroupData = new GroupProfileReplyPacket.GroupDataBlock();
|
||||||
|
groupProfileReply.AgentData.AgentID = AgentId;
|
||||||
|
|
||||||
|
GroupProfileData d = m_GroupsModule.GroupProfileRequest(this,
|
||||||
|
groupProfileRequest.GroupData.GroupID);
|
||||||
|
|
||||||
|
if(d.GroupID == UUID.Zero) // don't send broken data
|
||||||
|
return true;
|
||||||
|
|
||||||
|
groupProfileReply.GroupData.GroupID = d.GroupID;
|
||||||
|
groupProfileReply.GroupData.Name = Util.StringToBytes256(d.Name);
|
||||||
|
groupProfileReply.GroupData.Charter = Util.StringToBytes1024(d.Charter);
|
||||||
|
groupProfileReply.GroupData.ShowInList = d.ShowInList;
|
||||||
|
groupProfileReply.GroupData.MemberTitle = Util.StringToBytes256(d.MemberTitle);
|
||||||
|
groupProfileReply.GroupData.PowersMask = d.PowersMask;
|
||||||
|
groupProfileReply.GroupData.InsigniaID = d.InsigniaID;
|
||||||
|
groupProfileReply.GroupData.FounderID = d.FounderID;
|
||||||
|
groupProfileReply.GroupData.MembershipFee = d.MembershipFee;
|
||||||
|
groupProfileReply.GroupData.OpenEnrollment = d.OpenEnrollment;
|
||||||
|
groupProfileReply.GroupData.Money = d.Money;
|
||||||
|
groupProfileReply.GroupData.GroupMembershipCount = d.GroupMembershipCount;
|
||||||
|
groupProfileReply.GroupData.GroupRolesCount = d.GroupRolesCount;
|
||||||
|
groupProfileReply.GroupData.AllowPublish = d.AllowPublish;
|
||||||
|
groupProfileReply.GroupData.MaturePublish = d.MaturePublish;
|
||||||
|
groupProfileReply.GroupData.OwnerRole = d.OwnerRole;
|
||||||
|
|
||||||
|
Scene scene = (Scene)m_scene;
|
||||||
|
if (scene.Permissions.IsGod(sender.AgentId) && (!sender.IsGroupMember(groupProfileRequest.GroupData.GroupID)))
|
||||||
{
|
{
|
||||||
GroupProfileReplyPacket groupProfileReply = (GroupProfileReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupProfileReply);
|
ScenePresence p;
|
||||||
|
if (scene.TryGetScenePresence(sender.AgentId, out p))
|
||||||
groupProfileReply.AgentData = new GroupProfileReplyPacket.AgentDataBlock();
|
|
||||||
groupProfileReply.GroupData = new GroupProfileReplyPacket.GroupDataBlock();
|
|
||||||
groupProfileReply.AgentData.AgentID = AgentId;
|
|
||||||
|
|
||||||
GroupProfileData d = m_GroupsModule.GroupProfileRequest(this,
|
|
||||||
groupProfileRequest.GroupData.GroupID);
|
|
||||||
|
|
||||||
groupProfileReply.GroupData.GroupID = d.GroupID;
|
|
||||||
groupProfileReply.GroupData.Name = Util.StringToBytes256(d.Name);
|
|
||||||
groupProfileReply.GroupData.Charter = Util.StringToBytes1024(d.Charter);
|
|
||||||
groupProfileReply.GroupData.ShowInList = d.ShowInList;
|
|
||||||
groupProfileReply.GroupData.MemberTitle = Util.StringToBytes256(d.MemberTitle);
|
|
||||||
groupProfileReply.GroupData.PowersMask = d.PowersMask;
|
|
||||||
groupProfileReply.GroupData.InsigniaID = d.InsigniaID;
|
|
||||||
groupProfileReply.GroupData.FounderID = d.FounderID;
|
|
||||||
groupProfileReply.GroupData.MembershipFee = d.MembershipFee;
|
|
||||||
groupProfileReply.GroupData.OpenEnrollment = d.OpenEnrollment;
|
|
||||||
groupProfileReply.GroupData.Money = d.Money;
|
|
||||||
groupProfileReply.GroupData.GroupMembershipCount = d.GroupMembershipCount;
|
|
||||||
groupProfileReply.GroupData.GroupRolesCount = d.GroupRolesCount;
|
|
||||||
groupProfileReply.GroupData.AllowPublish = d.AllowPublish;
|
|
||||||
groupProfileReply.GroupData.MaturePublish = d.MaturePublish;
|
|
||||||
groupProfileReply.GroupData.OwnerRole = d.OwnerRole;
|
|
||||||
|
|
||||||
Scene scene = (Scene)m_scene;
|
|
||||||
if (scene.Permissions.IsGod(sender.AgentId) && (!sender.IsGroupMember(groupProfileRequest.GroupData.GroupID)))
|
|
||||||
{
|
{
|
||||||
ScenePresence p;
|
if (p.GodLevel >= 200)
|
||||||
if (scene.TryGetScenePresence(sender.AgentId, out p))
|
|
||||||
{
|
{
|
||||||
if (p.GodLevel >= 200)
|
groupProfileReply.GroupData.OpenEnrollment = true;
|
||||||
{
|
groupProfileReply.GroupData.MembershipFee = 0;
|
||||||
groupProfileReply.GroupData.OpenEnrollment = true;
|
|
||||||
groupProfileReply.GroupData.MembershipFee = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OutPacket(groupProfileReply, ThrottleOutPacketType.Task);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OutPacket(groupProfileReply, ThrottleOutPacketType.Task);
|
||||||
|
|
||||||
|
if(grpID == lastGroupProfileRequestID)
|
||||||
|
lastGroupProfileRequestTS = Util.GetTimeStampMS() - 7000;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
private bool HandleGroupMembersRequest(IClientAPI sender, Packet Pack)
|
private bool HandleGroupMembersRequest(IClientAPI sender, Packet Pack)
|
||||||
|
@ -12955,23 +12935,57 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
public void RefreshGroupMembership()
|
public void RefreshGroupMembership()
|
||||||
{
|
{
|
||||||
if (m_GroupsModule != null)
|
lock(m_groupPowers)
|
||||||
{
|
{
|
||||||
GroupMembershipData[] GroupMembership =
|
if (m_GroupsModule != null)
|
||||||
|
{
|
||||||
|
GroupMembershipData[] GroupMembership =
|
||||||
m_GroupsModule.GetMembershipData(AgentId);
|
m_GroupsModule.GetMembershipData(AgentId);
|
||||||
|
|
||||||
m_groupPowers.Clear();
|
m_groupPowers.Clear();
|
||||||
|
|
||||||
if (GroupMembership != null)
|
if (GroupMembership != null)
|
||||||
{
|
|
||||||
for (int i = 0; i < GroupMembership.Length; i++)
|
|
||||||
{
|
{
|
||||||
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()
|
public string Report()
|
||||||
{
|
{
|
||||||
return m_udpClient.GetStats();
|
return m_udpClient.GetStats();
|
||||||
|
|
|
@ -1302,7 +1302,11 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||||
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
|
||||||
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
if (m_bypassPermissions) return m_bypassPermissionsValue;
|
||||||
|
|
||||||
if ((newPoint.X > 257f || newPoint.X < -1f || newPoint.Y > 257f || newPoint.Y < -1f))
|
|
||||||
|
// allow outide region??
|
||||||
|
if (newPoint.X < -1f || newPoint.Y < -1f)
|
||||||
|
return true;
|
||||||
|
if (newPoint.X > scene.RegionInfo.RegionSizeX + 1.0f || newPoint.Y > scene.RegionInfo.RegionSizeY + 1.0f)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,6 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
void ChatterBoxSessionAgentListUpdates(UUID sessionID, UUID fromAgent, UUID anotherAgent, bool canVoiceChat,
|
void ChatterBoxSessionAgentListUpdates(UUID sessionID, UUID fromAgent, UUID anotherAgent, bool canVoiceChat,
|
||||||
bool isModerator, bool textMute);
|
bool isModerator, bool textMute);
|
||||||
void ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID);
|
void ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID);
|
||||||
void GroupMembership(AgentGroupDataUpdatePacket groupUpdate, UUID avatarID);
|
|
||||||
void GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data);
|
void GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data);
|
||||||
OSD ScriptRunningEvent(UUID objectID, UUID itemID, bool running, bool mono);
|
OSD ScriptRunningEvent(UUID objectID, UUID itemID, bool running, bool mono);
|
||||||
OSD BuildEvent(string eventName, OSD eventBody);
|
OSD BuildEvent(string eventName, OSD eventBody);
|
||||||
|
|
|
@ -250,6 +250,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
///
|
///
|
||||||
public int m_linksetPhysCapacity = 0;
|
public int m_linksetPhysCapacity = 0;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// When placed outside the region's border, do we transfer the objects or
|
||||||
|
/// do we keep simulating them here?
|
||||||
|
/// </summary>
|
||||||
|
public bool DisableObjectTransfer { get; set; }
|
||||||
|
|
||||||
public bool m_useFlySlow;
|
public bool m_useFlySlow;
|
||||||
public bool m_useTrashOnDelete = true;
|
public bool m_useTrashOnDelete = true;
|
||||||
|
|
||||||
|
@ -1155,6 +1161,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (entityTransferConfig != null)
|
if (entityTransferConfig != null)
|
||||||
{
|
{
|
||||||
AllowAvatarCrossing = entityTransferConfig.GetBoolean("AllowAvatarCrossing", AllowAvatarCrossing);
|
AllowAvatarCrossing = entityTransferConfig.GetBoolean("AllowAvatarCrossing", AllowAvatarCrossing);
|
||||||
|
DisableObjectTransfer = entityTransferConfig.GetBoolean("DisableObjectTransfer", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Interest Management
|
#region Interest Management
|
||||||
|
@ -4309,14 +4316,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (banned || restricted)
|
if (banned || restricted)
|
||||||
{
|
{
|
||||||
ILandObject nearestParcel = GetNearestAllowedParcel(agentID, posX, posY);
|
ILandObject nearestParcel = GetNearestAllowedParcel(agentID, posX, posY);
|
||||||
|
Vector2? newPosition = null;
|
||||||
if (nearestParcel != null)
|
if (nearestParcel != null)
|
||||||
{
|
{
|
||||||
//Move agent to nearest allowed
|
//Move agent to nearest allowed
|
||||||
Vector2 newPosition = GetParcelSafeCorner(nearestParcel);
|
// Vector2 newPosition = GetParcelSafeCorner(nearestParcel);
|
||||||
posX = newPosition.X;
|
newPosition = nearestParcel.GetNearestPoint(new Vector3(posX, posY,0));
|
||||||
posY = newPosition.Y;
|
|
||||||
}
|
}
|
||||||
else
|
if(newPosition == null)
|
||||||
{
|
{
|
||||||
if (banned)
|
if (banned)
|
||||||
{
|
{
|
||||||
|
@ -4329,6 +4336,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
posX = newPosition.Value.X;
|
||||||
|
posY = newPosition.Value.Y;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
reason = "";
|
reason = "";
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -242,6 +242,19 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
coarseLocations = new List<Vector3>();
|
coarseLocations = new List<Vector3>();
|
||||||
avatarUUIDs = new List<UUID>();
|
avatarUUIDs = new List<UUID>();
|
||||||
|
|
||||||
|
// coarse locations are sent as BYTE, so limited to the 255m max of normal regions
|
||||||
|
// try to work around that scale down X and Y acording to region size, so reducing the resolution
|
||||||
|
//
|
||||||
|
// viewers need to scale up
|
||||||
|
float scaleX = m_parentScene.RegionInfo.RegionSizeX / Constants.RegionSize;
|
||||||
|
if (scaleX == 0)
|
||||||
|
scaleX = 1.0f;
|
||||||
|
scaleX = 1.0f / scaleX;
|
||||||
|
float scaleY = m_parentScene.RegionInfo.RegionSizeY / Constants.RegionSize;
|
||||||
|
if (scaleY == 0)
|
||||||
|
scaleY = 1.0f;
|
||||||
|
scaleY = 1.0f / scaleY;
|
||||||
|
|
||||||
List<ScenePresence> presences = GetScenePresences();
|
List<ScenePresence> presences = GetScenePresences();
|
||||||
for (int i = 0; i < Math.Min(presences.Count, maxLocations); ++i)
|
for (int i = 0; i < Math.Min(presences.Count, maxLocations); ++i)
|
||||||
{
|
{
|
||||||
|
@ -250,9 +263,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// If this presence is a child agent, we don't want its coarse locations
|
// If this presence is a child agent, we don't want its coarse locations
|
||||||
if (sp.IsChildAgent)
|
if (sp.IsChildAgent)
|
||||||
continue;
|
continue;
|
||||||
|
Vector3 pos = sp.AbsolutePosition;
|
||||||
|
pos.X *= scaleX;
|
||||||
|
pos.Y *= scaleY;
|
||||||
|
|
||||||
coarseLocations.Add(sp.AbsolutePosition);
|
coarseLocations.Add(pos);
|
||||||
|
|
||||||
avatarUUIDs.Add(sp.UUID);
|
avatarUUIDs.Add(sp.UUID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -556,6 +556,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
&& !Scene.PositionIsInCurrentRegion(val)
|
&& !Scene.PositionIsInCurrentRegion(val)
|
||||||
&& !IsAttachmentCheckFull()
|
&& !IsAttachmentCheckFull()
|
||||||
&& !Scene.LoadingPrims
|
&& !Scene.LoadingPrims
|
||||||
|
&& !Scene.DisableObjectTransfer
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (!inTransit)
|
if (!inTransit)
|
||||||
|
|
|
@ -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)
|
public void SendAvatarNotesReply(UUID targetID, string text)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -786,7 +786,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
|
|
||||||
GroupProfileData profile = new GroupProfileData();
|
GroupProfileData profile = new GroupProfileData();
|
||||||
|
|
||||||
|
|
||||||
GroupRecord groupInfo = m_groupData.GetGroupRecord(GetRequestingAgentID(remoteClient), groupID, null);
|
GroupRecord groupInfo = m_groupData.GetGroupRecord(GetRequestingAgentID(remoteClient), groupID, null);
|
||||||
if (groupInfo != null)
|
if (groupInfo != null)
|
||||||
{
|
{
|
||||||
|
@ -812,7 +811,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
profile.MemberTitle = memberInfo.GroupTitle;
|
profile.MemberTitle = memberInfo.GroupTitle;
|
||||||
profile.PowersMask = memberInfo.GroupPowers;
|
profile.PowersMask = memberInfo.GroupPowers;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
this should save xmlrpc calls, but seems to return wrong GroupMembershipCount and GroupRolesCount
|
||||||
|
UUID agent = GetRequestingAgentID(remoteClient);
|
||||||
|
GroupProfileData profile = m_groupData.GetMemberGroupProfile(agent, groupID, agent);
|
||||||
|
*/
|
||||||
return profile;
|
return profile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1407,13 +1410,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
SendDataUpdate(remoteClient, tellOthers);
|
SendDataUpdate(remoteClient, tellOthers);
|
||||||
|
|
||||||
GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, agentID);
|
GroupMembershipData[] membershipArray = GetProfileListedGroupMemberships(remoteClient, agentID);
|
||||||
IEventQueue eq = remoteClient.Scene.RequestModuleInterface<IEventQueue>();
|
remoteClient.UpdateGroupMembership(membershipArray);
|
||||||
if (eq != null)
|
|
||||||
eq.GroupMembershipData(agentID, membershipArray);
|
|
||||||
else
|
|
||||||
remoteClient.SendGroupMembership(membershipArray);
|
|
||||||
|
|
||||||
remoteClient.RefreshGroupMembership();
|
remoteClient.SendAgentGroupDataUpdate(agentID, membershipArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -51,7 +51,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
/// GroupID may be specified instead, in which case this parmeter will be null.
|
/// GroupID may be specified instead, in which case this parmeter will be null.
|
||||||
/// </param>
|
/// </param>
|
||||||
GroupRecord GetGroupRecord(UUID RequestingAgentID, UUID GroupID, string GroupName);
|
GroupRecord GetGroupRecord(UUID RequestingAgentID, UUID GroupID, string GroupName);
|
||||||
|
GroupProfileData GetMemberGroupProfile(UUID requestingAgentID, UUID GroupID, UUID AgentID);
|
||||||
|
|
||||||
List<DirGroupsReplyData> FindGroups(UUID RequestingAgentID, string search);
|
List<DirGroupsReplyData> FindGroups(UUID RequestingAgentID, string search);
|
||||||
List<GroupMembersData> GetGroupMembers(UUID RequestingAgentID, UUID GroupID);
|
List<GroupMembersData> GetGroupMembers(UUID RequestingAgentID, UUID GroupID);
|
||||||
|
|
||||||
|
|
|
@ -181,9 +181,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
|
|
||||||
m_cacheTimeout = groupsConfig.GetInt("GroupsCacheTimeout", 30);
|
m_cacheTimeout = groupsConfig.GetInt("GroupsCacheTimeout", 30);
|
||||||
|
|
||||||
// disable cache until it is fixed
|
|
||||||
m_cacheTimeout = 0;
|
|
||||||
|
|
||||||
if (m_cacheTimeout == 0)
|
if (m_cacheTimeout == 0)
|
||||||
{
|
{
|
||||||
m_log.WarnFormat("[XMLRPC-GROUPS-CONNECTOR]: Groups Cache Disabled.");
|
m_log.WarnFormat("[XMLRPC-GROUPS-CONNECTOR]: Groups Cache Disabled.");
|
||||||
|
@ -385,10 +382,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
|
|
||||||
GroupMembershipData MemberInfo = GetAgentGroupMembership(requestingAgentID, AgentID, GroupID);
|
GroupMembershipData MemberInfo = GetAgentGroupMembership(requestingAgentID, AgentID, GroupID);
|
||||||
GroupProfileData MemberGroupProfile = GroupProfileHashtableToGroupProfileData(respData);
|
GroupProfileData MemberGroupProfile = GroupProfileHashtableToGroupProfileData(respData);
|
||||||
|
if(MemberInfo != null)
|
||||||
MemberGroupProfile.MemberTitle = MemberInfo.GroupTitle;
|
{
|
||||||
MemberGroupProfile.PowersMask = MemberInfo.GroupPowers;
|
MemberGroupProfile.MemberTitle = MemberInfo.GroupTitle;
|
||||||
|
MemberGroupProfile.PowersMask = MemberInfo.GroupPowers;
|
||||||
|
}
|
||||||
return MemberGroupProfile;
|
return MemberGroupProfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -977,12 +975,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
resp = req.Send(m_groupsServerURI, 30000);
|
resp = req.Send(m_groupsServerURI);
|
||||||
|
|
||||||
if ((m_cacheTimeout > 0) && (CacheKey != null))
|
|
||||||
{
|
|
||||||
m_memoryCache.AddOrUpdate(CacheKey, resp, TimeSpan.FromSeconds(m_cacheTimeout));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -1004,12 +997,22 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
||||||
m_log.WarnFormat("[XMLRPC-GROUPS-CONNECTOR]: {0} :: {1}", key, param[key].ToString());
|
m_log.WarnFormat("[XMLRPC-GROUPS-CONNECTOR]: {0} :: {1}", key, param[key].ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((m_cacheTimeout > 0) && (CacheKey != null))
|
||||||
|
{
|
||||||
|
m_memoryCache.AddOrUpdate(CacheKey, resp, 10.0);
|
||||||
|
}
|
||||||
Hashtable respData = new Hashtable();
|
Hashtable respData = new Hashtable();
|
||||||
respData.Add("error", e.ToString());
|
respData.Add("error", e.ToString());
|
||||||
return respData;
|
return respData;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((m_cacheTimeout > 0) && (CacheKey != null))
|
||||||
|
{
|
||||||
|
m_memoryCache.AddOrUpdate(CacheKey, resp, TimeSpan.FromSeconds(m_cacheTimeout));
|
||||||
|
}
|
||||||
|
|
||||||
if (resp.Value is Hashtable)
|
if (resp.Value is Hashtable)
|
||||||
{
|
{
|
||||||
Hashtable respData = (Hashtable)resp.Value;
|
Hashtable respData = (Hashtable)resp.Value;
|
||||||
|
@ -1138,6 +1141,7 @@ namespace Nwc.XmlRpc
|
||||||
request.ContentType = "text/xml";
|
request.ContentType = "text/xml";
|
||||||
request.AllowWriteStreamBuffering = true;
|
request.AllowWriteStreamBuffering = true;
|
||||||
request.KeepAlive = !_disableKeepAlive;
|
request.KeepAlive = !_disableKeepAlive;
|
||||||
|
request.Timeout = 30000;
|
||||||
|
|
||||||
using (Stream stream = request.GetRequestStream())
|
using (Stream stream = request.GetRequestStream())
|
||||||
{
|
{
|
||||||
|
|
|
@ -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()
|
public void SendUseCachedMuteList()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -2680,7 +2680,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
if (part.ParentGroup.RootPart == part)
|
if (part.ParentGroup.RootPart == part)
|
||||||
{
|
{
|
||||||
SceneObjectGroup parent = part.ParentGroup;
|
SceneObjectGroup parent = part.ParentGroup;
|
||||||
if (!World.Permissions.CanObjectEntry(parent.UUID, false, (Vector3)toPos))
|
if (!parent.IsAttachment && !World.Permissions.CanObjectEntry(parent.UUID, false, (Vector3)toPos))
|
||||||
return;
|
return;
|
||||||
parent.UpdateGroupPosition((Vector3)toPos);
|
parent.UpdateGroupPosition((Vector3)toPos);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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()
|
public void SendUseCachedMuteList()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -157,11 +157,6 @@ namespace OpenSim.Tests.Common
|
||||||
AddEvent(avatarID, "ParcelProperties", parcelPropertiesMessage);
|
AddEvent(avatarID, "ParcelProperties", parcelPropertiesMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void GroupMembership (OpenMetaverse.Packets.AgentGroupDataUpdatePacket groupUpdate, UUID avatarID)
|
|
||||||
{
|
|
||||||
AddEvent(avatarID, "GroupMembership", groupUpdate);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data)
|
public void GroupMembershipData(UUID receiverAgent, GroupMembershipData[] data)
|
||||||
{
|
{
|
||||||
AddEvent(receiverAgent, "AgentGroupDataUpdate", data);
|
AddEvent(receiverAgent, "AgentGroupDataUpdate", data);
|
||||||
|
|
|
@ -800,6 +800,10 @@
|
||||||
; Allow avatars to cross into and out of the region.
|
; Allow avatars to cross into and out of the region.
|
||||||
AllowAvatarCrossing = true
|
AllowAvatarCrossing = true
|
||||||
|
|
||||||
|
; This disables border transfers for objects. When true, objects can be placed outside
|
||||||
|
; the region's border without being transferred to another simulator.
|
||||||
|
DisableObjectTransfer = false
|
||||||
|
|
||||||
; Minimum user level required for HyperGrid teleports
|
; Minimum user level required for HyperGrid teleports
|
||||||
LevelHGTeleport = 0
|
LevelHGTeleport = 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue