diff options
author | UbitUmarov | 2016-08-04 20:57:57 +0100 |
---|---|---|
committer | UbitUmarov | 2016-08-04 20:57:57 +0100 |
commit | a66e747c95eb2b1fc090142ee5bba973a4ab1079 (patch) | |
tree | d31bfda8b5ca86617077035399922689db9c8bbc | |
parent | add a weak safeguard (diff) | |
download | opensim-SC_OLD-a66e747c95eb2b1fc090142ee5bba973a4ab1079.zip opensim-SC_OLD-a66e747c95eb2b1fc090142ee5bba973a4ab1079.tar.gz opensim-SC_OLD-a66e747c95eb2b1fc090142ee5bba973a4ab1079.tar.bz2 opensim-SC_OLD-a66e747c95eb2b1fc090142ee5bba973a4ab1079.tar.xz |
add GetActiveMembershipData() to groups modules, let core groups also have GetMembershipData(), wait for client to ask for it not telling in OnNewClient, as other modules do.
4 files changed, 24 insertions, 5 deletions
diff --git a/OpenSim/Addons/Groups/GroupsModule.cs b/OpenSim/Addons/Groups/GroupsModule.cs index e586dd7..b6bf5f1 100644 --- a/OpenSim/Addons/Groups/GroupsModule.cs +++ b/OpenSim/Addons/Groups/GroupsModule.cs | |||
@@ -714,6 +714,12 @@ namespace OpenSim.Groups | |||
714 | return m_groupData.GetAgentGroupMembership(UUID.Zero.ToString(), agentID.ToString(), groupID); | 714 | return m_groupData.GetAgentGroupMembership(UUID.Zero.ToString(), agentID.ToString(), groupID); |
715 | } | 715 | } |
716 | 716 | ||
717 | public GroupMembershipData GetActiveMembershipData(UUID agentID) | ||
718 | { | ||
719 | string agentIDstr = agentID.ToString(); | ||
720 | return m_groupData.GetAgentActiveMembership(agentIDstr, agentIDstr); | ||
721 | } | ||
722 | |||
717 | public void UpdateGroupInfo(IClientAPI remoteClient, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish) | 723 | public void UpdateGroupInfo(IClientAPI remoteClient, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish) |
718 | { | 724 | { |
719 | if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 725 | if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
diff --git a/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs b/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs index b735c61..543410e 100644 --- a/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Groups/GroupsModule.cs | |||
@@ -182,11 +182,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups | |||
182 | m_ClientMap.Add(client.AgentId, client); | 182 | m_ClientMap.Add(client.AgentId, client); |
183 | } | 183 | } |
184 | } | 184 | } |
185 | |||
186 | GroupMembershipData[] updateGroups = new GroupMembershipData[1]; | ||
187 | updateGroups[0] = osGroup; | ||
188 | |||
189 | client.SendGroupMembership(updateGroups); | ||
190 | } | 185 | } |
191 | 186 | ||
192 | private void OnAgentDataUpdateRequest(IClientAPI remoteClient, | 187 | private void OnAgentDataUpdateRequest(IClientAPI remoteClient, |
@@ -237,6 +232,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Groups | |||
237 | remote_client.SendGroupNameReply(groupUUID, groupnamereply); | 232 | remote_client.SendGroupNameReply(groupUUID, groupnamereply); |
238 | } | 233 | } |
239 | 234 | ||
235 | public GroupMembershipData[] GetMembershipData(UUID agentID) | ||
236 | { | ||
237 | GroupMembershipData[] updateGroups = new GroupMembershipData[1]; | ||
238 | updateGroups[0] = osGroup; | ||
239 | return updateGroups; | ||
240 | } | ||
241 | |||
242 | public GroupMembershipData GetActiveMembershipData(UUID agentID) | ||
243 | { | ||
244 | return osGroup; | ||
245 | } | ||
246 | |||
240 | private void OnClientClosed(UUID agentID, Scene scene) | 247 | private void OnClientClosed(UUID agentID, Scene scene) |
241 | { | 248 | { |
242 | lock (m_ClientMap) | 249 | lock (m_ClientMap) |
diff --git a/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs b/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs index 9ae5e87..110cb00 100644 --- a/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs | |||
@@ -76,6 +76,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
76 | GroupProfileData GroupProfileRequest(IClientAPI remoteClient, UUID groupID); | 76 | GroupProfileData GroupProfileRequest(IClientAPI remoteClient, UUID groupID); |
77 | GroupMembershipData[] GetMembershipData(UUID UserID); | 77 | GroupMembershipData[] GetMembershipData(UUID UserID); |
78 | GroupMembershipData GetMembershipData(UUID GroupID, UUID UserID); | 78 | GroupMembershipData GetMembershipData(UUID GroupID, UUID UserID); |
79 | GroupMembershipData GetActiveMembershipData(UUID UserID); | ||
79 | 80 | ||
80 | void UpdateGroupInfo(IClientAPI remoteClient, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish); | 81 | void UpdateGroupInfo(IClientAPI remoteClient, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish); |
81 | 82 | ||
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index 5205eae..112a41f 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | |||
@@ -837,6 +837,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
837 | return m_groupData.GetAgentGroupMembership(UUID.Zero, agentID, groupID); | 837 | return m_groupData.GetAgentGroupMembership(UUID.Zero, agentID, groupID); |
838 | } | 838 | } |
839 | 839 | ||
840 | public GroupMembershipData GetActiveMembershipData(UUID agentID) | ||
841 | { | ||
842 | return m_groupData.GetAgentActiveMembership(agentID, agentID); | ||
843 | } | ||
844 | |||
840 | public void UpdateGroupInfo(IClientAPI remoteClient, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish) | 845 | public void UpdateGroupInfo(IClientAPI remoteClient, UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish) |
841 | { | 846 | { |
842 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 847 | if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |