aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
diff options
context:
space:
mode:
authorUbitUmarov2016-07-02 00:18:29 +0100
committerUbitUmarov2016-07-02 00:18:29 +0100
commit7991bb08f163f3697c5ff87ebafcf78b8e19d3f6 (patch)
treeef01aa9f966ee1602c60d35a76e0340b2918470c /OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
parentxmlrpcgroups: make use of a forgotten GetMemberGroupProfilemethod, put back x... (diff)
downloadopensim-SC-7991bb08f163f3697c5ff87ebafcf78b8e19d3f6.zip
opensim-SC-7991bb08f163f3697c5ff87ebafcf78b8e19d3f6.tar.gz
opensim-SC-7991bb08f163f3697c5ff87ebafcf78b8e19d3f6.tar.bz2
opensim-SC-7991bb08f163f3697c5ff87ebafcf78b8e19d3f6.tar.xz
reduce absurd viewers blind retries of GroupProfileRequest
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs97
1 files changed, 57 insertions, 40 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 22b11e6..1dfd5b4 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -11096,11 +11096,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11096 } 11096 }
11097 return true; 11097 return true;
11098 } 11098 }
11099
11100 UUID lastGroupProfileRequestID = UUID.Zero;
11101 double lastGroupProfileRequestTS = Util.GetTimeStampMS();
11102
11099 private bool HandleGroupProfileRequest(IClientAPI sender, Packet Pack) 11103 private bool HandleGroupProfileRequest(IClientAPI sender, Packet Pack)
11100 { 11104 {
11105 if(m_GroupsModule == null)
11106 return true;
11107
11101 GroupProfileRequestPacket groupProfileRequest = 11108 GroupProfileRequestPacket groupProfileRequest =
11102 (GroupProfileRequestPacket)Pack; 11109 (GroupProfileRequestPacket)Pack;
11103 11110
11111
11104 #region Packet Session and User Check 11112 #region Packet Session and User Check
11105 if (m_checkPackets) 11113 if (m_checkPackets)
11106 { 11114 {
@@ -11110,50 +11118,59 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11110 } 11118 }
11111 #endregion 11119 #endregion
11112 11120
11113 if (m_GroupsModule != null) 11121 UUID grpID = groupProfileRequest.GroupData.GroupID;
11114 { 11122 double ts = Util.GetTimeStampMS();
11115 GroupProfileReplyPacket groupProfileReply = (GroupProfileReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupProfileReply); 11123 if(grpID == lastGroupProfileRequestID && ts - lastGroupProfileRequestTS < 10000)
11116 11124 return true;
11117 groupProfileReply.AgentData = new GroupProfileReplyPacket.AgentDataBlock(); 11125
11118 groupProfileReply.GroupData = new GroupProfileReplyPacket.GroupDataBlock(); 11126 lastGroupProfileRequestID = grpID;
11119 groupProfileReply.AgentData.AgentID = AgentId; 11127 lastGroupProfileRequestTS = ts;
11120 11128
11121 GroupProfileData d = m_GroupsModule.GroupProfileRequest(this, 11129 GroupProfileReplyPacket groupProfileReply = (GroupProfileReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupProfileReply);
11122 groupProfileRequest.GroupData.GroupID); 11130
11123 11131 groupProfileReply.AgentData = new GroupProfileReplyPacket.AgentDataBlock();
11124 groupProfileReply.GroupData.GroupID = d.GroupID; 11132 groupProfileReply.GroupData = new GroupProfileReplyPacket.GroupDataBlock();
11125 groupProfileReply.GroupData.Name = Util.StringToBytes256(d.Name); 11133 groupProfileReply.AgentData.AgentID = AgentId;
11126 groupProfileReply.GroupData.Charter = Util.StringToBytes1024(d.Charter); 11134
11127 groupProfileReply.GroupData.ShowInList = d.ShowInList; 11135 GroupProfileData d = m_GroupsModule.GroupProfileRequest(this,
11128 groupProfileReply.GroupData.MemberTitle = Util.StringToBytes256(d.MemberTitle); 11136 groupProfileRequest.GroupData.GroupID);
11129 groupProfileReply.GroupData.PowersMask = d.PowersMask; 11137
11130 groupProfileReply.GroupData.InsigniaID = d.InsigniaID; 11138 groupProfileReply.GroupData.GroupID = d.GroupID;
11131 groupProfileReply.GroupData.FounderID = d.FounderID; 11139 groupProfileReply.GroupData.Name = Util.StringToBytes256(d.Name);
11132 groupProfileReply.GroupData.MembershipFee = d.MembershipFee; 11140 groupProfileReply.GroupData.Charter = Util.StringToBytes1024(d.Charter);
11133 groupProfileReply.GroupData.OpenEnrollment = d.OpenEnrollment; 11141 groupProfileReply.GroupData.ShowInList = d.ShowInList;
11134 groupProfileReply.GroupData.Money = d.Money; 11142 groupProfileReply.GroupData.MemberTitle = Util.StringToBytes256(d.MemberTitle);
11135 groupProfileReply.GroupData.GroupMembershipCount = d.GroupMembershipCount; 11143 groupProfileReply.GroupData.PowersMask = d.PowersMask;
11136 groupProfileReply.GroupData.GroupRolesCount = d.GroupRolesCount; 11144 groupProfileReply.GroupData.InsigniaID = d.InsigniaID;
11137 groupProfileReply.GroupData.AllowPublish = d.AllowPublish; 11145 groupProfileReply.GroupData.FounderID = d.FounderID;
11138 groupProfileReply.GroupData.MaturePublish = d.MaturePublish; 11146 groupProfileReply.GroupData.MembershipFee = d.MembershipFee;
11139 groupProfileReply.GroupData.OwnerRole = d.OwnerRole; 11147 groupProfileReply.GroupData.OpenEnrollment = d.OpenEnrollment;
11140 11148 groupProfileReply.GroupData.Money = d.Money;
11141 Scene scene = (Scene)m_scene; 11149 groupProfileReply.GroupData.GroupMembershipCount = d.GroupMembershipCount;
11142 if (scene.Permissions.IsGod(sender.AgentId) && (!sender.IsGroupMember(groupProfileRequest.GroupData.GroupID))) 11150 groupProfileReply.GroupData.GroupRolesCount = d.GroupRolesCount;
11143 { 11151 groupProfileReply.GroupData.AllowPublish = d.AllowPublish;
11144 ScenePresence p; 11152 groupProfileReply.GroupData.MaturePublish = d.MaturePublish;
11145 if (scene.TryGetScenePresence(sender.AgentId, out p)) 11153 groupProfileReply.GroupData.OwnerRole = d.OwnerRole;
11154
11155 Scene scene = (Scene)m_scene;
11156 if (scene.Permissions.IsGod(sender.AgentId) && (!sender.IsGroupMember(groupProfileRequest.GroupData.GroupID)))
11157 {
11158 ScenePresence p;
11159 if (scene.TryGetScenePresence(sender.AgentId, out p))
11160 {
11161 if (p.GodLevel >= 200)
11146 { 11162 {
11147 if (p.GodLevel >= 200) 11163 groupProfileReply.GroupData.OpenEnrollment = true;
11148 { 11164 groupProfileReply.GroupData.MembershipFee = 0;
11149 groupProfileReply.GroupData.OpenEnrollment = true;
11150 groupProfileReply.GroupData.MembershipFee = 0;
11151 }
11152 } 11165 }
11153 } 11166 }
11154
11155 OutPacket(groupProfileReply, ThrottleOutPacketType.Task);
11156 } 11167 }
11168
11169 OutPacket(groupProfileReply, ThrottleOutPacketType.Task);
11170
11171 if(grpID == lastGroupProfileRequestID)
11172 lastGroupProfileRequestTS = Util.GetTimeStampMS() - 7000;
11173
11157 return true; 11174 return true;
11158 } 11175 }
11159 private bool HandleGroupMembersRequest(IClientAPI sender, Packet Pack) 11176 private bool HandleGroupMembersRequest(IClientAPI sender, Packet Pack)