diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs | 19 | ||||
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs | 66 |
2 files changed, 52 insertions, 33 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs index 5c779de..6d26075 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs | |||
@@ -63,7 +63,26 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
63 | void SetAgentActiveGroupRole(UUID RequestingAgentID, UUID AgentID, UUID GroupID, UUID RoleID); | 63 | void SetAgentActiveGroupRole(UUID RequestingAgentID, UUID AgentID, UUID GroupID, UUID RoleID); |
64 | void SetAgentGroupInfo(UUID RequestingAgentID, UUID AgentID, UUID GroupID, bool AcceptNotices, bool ListInProfile); | 64 | void SetAgentGroupInfo(UUID RequestingAgentID, UUID AgentID, UUID GroupID, bool AcceptNotices, bool ListInProfile); |
65 | 65 | ||
66 | /// <summary> | ||
67 | /// Get information about a specific group to which the user belongs. | ||
68 | /// </summary> | ||
69 | /// <param name="RequestingAgentID">The agent requesting the information.</param> | ||
70 | /// <param name="AgentID">The agent requested.</param> | ||
71 | /// <param name="GroupID">The group requested.</param> | ||
72 | /// <returns> | ||
73 | /// If the user is a member of the group then the data structure is returned. If not, then null is returned. | ||
74 | /// </returns> | ||
66 | GroupMembershipData GetAgentGroupMembership(UUID RequestingAgentID, UUID AgentID, UUID GroupID); | 75 | GroupMembershipData GetAgentGroupMembership(UUID RequestingAgentID, UUID AgentID, UUID GroupID); |
76 | |||
77 | /// <summary> | ||
78 | /// Get information about the groups to which a user belongs. | ||
79 | /// </summary> | ||
80 | /// <param name="RequestingAgentID">The agent requesting the information.</param> | ||
81 | /// <param name="AgentID">The agent requested.</param> | ||
82 | /// <returns> | ||
83 | /// Information about the groups to which the user belongs. If the user belongs to no groups then an empty | ||
84 | /// list is returned. | ||
85 | /// </returns> | ||
67 | List<GroupMembershipData> GetAgentGroupMemberships(UUID RequestingAgentID, UUID AgentID); | 86 | List<GroupMembershipData> GetAgentGroupMemberships(UUID RequestingAgentID, UUID AgentID); |
68 | 87 | ||
69 | void AddGroupNotice(UUID RequestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, byte[] binaryBucket); | 88 | void AddGroupNotice(UUID RequestingAgentID, UUID groupID, UUID noticeID, string fromName, string subject, string message, byte[] binaryBucket); |
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs index 0d265f2..81725c5 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs | |||
@@ -704,7 +704,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
704 | } | 704 | } |
705 | } | 705 | } |
706 | 706 | ||
707 | |||
708 | return findings; | 707 | return findings; |
709 | } | 708 | } |
710 | 709 | ||
@@ -712,54 +711,55 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
712 | { | 711 | { |
713 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); | 712 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); |
714 | 713 | ||
715 | GroupMembershipData data = new GroupMembershipData(); | 714 | GroupMembershipData data = null; |
716 | 715 | bool foundData = false; | |
717 | /////////////////////////////// | ||
718 | // Agent Specific Information: | ||
719 | // | ||
720 | OSDMap UserActiveGroup; | ||
721 | if (SimianGetGenericEntry(agentID, "Group", "ActiveGroup", out UserActiveGroup)) | ||
722 | { | ||
723 | data.Active = UserActiveGroup["GroupID"].AsUUID().Equals(groupID); | ||
724 | } | ||
725 | 716 | ||
726 | OSDMap UserGroupMemberInfo; | 717 | OSDMap UserGroupMemberInfo; |
727 | if (SimianGetGenericEntry(agentID, "GroupMember", groupID.ToString(), out UserGroupMemberInfo)) | 718 | if (SimianGetGenericEntry(agentID, "GroupMember", groupID.ToString(), out UserGroupMemberInfo)) |
728 | { | 719 | { |
720 | data = new GroupMembershipData(); | ||
729 | data.AcceptNotices = UserGroupMemberInfo["AcceptNotices"].AsBoolean(); | 721 | data.AcceptNotices = UserGroupMemberInfo["AcceptNotices"].AsBoolean(); |
730 | data.Contribution = UserGroupMemberInfo["Contribution"].AsInteger(); | 722 | data.Contribution = UserGroupMemberInfo["Contribution"].AsInteger(); |
731 | data.ListInProfile = UserGroupMemberInfo["ListInProfile"].AsBoolean(); | 723 | data.ListInProfile = UserGroupMemberInfo["ListInProfile"].AsBoolean(); |
732 | data.ActiveRole = UserGroupMemberInfo["SelectedRoleID"].AsUUID(); | 724 | data.ActiveRole = UserGroupMemberInfo["SelectedRoleID"].AsUUID(); |
725 | |||
726 | /////////////////////////////// | ||
727 | // Agent Specific Information: | ||
728 | // | ||
729 | OSDMap UserActiveGroup; | ||
730 | if (SimianGetGenericEntry(agentID, "Group", "ActiveGroup", out UserActiveGroup)) | ||
731 | { | ||
732 | data.Active = UserActiveGroup["GroupID"].AsUUID().Equals(groupID); | ||
733 | } | ||
733 | 734 | ||
734 | /////////////////////////////// | 735 | /////////////////////////////// |
735 | // Role Specific Information: | 736 | // Role Specific Information: |
736 | // | 737 | // |
737 | |||
738 | OSDMap GroupRoleInfo; | 738 | OSDMap GroupRoleInfo; |
739 | if (SimianGetGenericEntry(groupID, "GroupRole", data.ActiveRole.ToString(), out GroupRoleInfo)) | 739 | if (SimianGetGenericEntry(groupID, "GroupRole", data.ActiveRole.ToString(), out GroupRoleInfo)) |
740 | { | 740 | { |
741 | data.GroupTitle = GroupRoleInfo["Title"].AsString(); | 741 | data.GroupTitle = GroupRoleInfo["Title"].AsString(); |
742 | data.GroupPowers = GroupRoleInfo["Powers"].AsULong(); | 742 | data.GroupPowers = GroupRoleInfo["Powers"].AsULong(); |
743 | } | 743 | } |
744 | } | 744 | |
745 | 745 | /////////////////////////////// | |
746 | /////////////////////////////// | 746 | // Group Specific Information: |
747 | // Group Specific Information: | 747 | // |
748 | // | 748 | OSDMap GroupInfo; |
749 | OSDMap GroupInfo; | 749 | string GroupName; |
750 | string GroupName; | 750 | if (SimianGetFirstGenericEntry(groupID, "Group", out GroupName, out GroupInfo)) |
751 | if (SimianGetFirstGenericEntry(groupID, "Group", out GroupName, out GroupInfo)) | 751 | { |
752 | { | 752 | data.GroupID = groupID; |
753 | data.GroupID = groupID; | 753 | data.AllowPublish = GroupInfo["AllowPublish"].AsBoolean(); |
754 | data.AllowPublish = GroupInfo["AllowPublish"].AsBoolean(); | 754 | data.Charter = GroupInfo["Charter"].AsString(); |
755 | data.Charter = GroupInfo["Charter"].AsString(); | 755 | data.FounderID = GroupInfo["FounderID"].AsUUID(); |
756 | data.FounderID = GroupInfo["FounderID"].AsUUID(); | 756 | data.GroupName = GroupName; |
757 | data.GroupName = GroupName; | 757 | data.GroupPicture = GroupInfo["InsigniaID"].AsUUID(); |
758 | data.GroupPicture = GroupInfo["InsigniaID"].AsUUID(); | 758 | data.MaturePublish = GroupInfo["MaturePublish"].AsBoolean(); |
759 | data.MaturePublish = GroupInfo["MaturePublish"].AsBoolean(); | 759 | data.MembershipFee = GroupInfo["MembershipFee"].AsInteger(); |
760 | data.MembershipFee = GroupInfo["MembershipFee"].AsInteger(); | 760 | data.OpenEnrollment = GroupInfo["OpenEnrollment"].AsBoolean(); |
761 | data.OpenEnrollment = GroupInfo["OpenEnrollment"].AsBoolean(); | 761 | data.ShowInList = GroupInfo["ShowInList"].AsBoolean(); |
762 | data.ShowInList = GroupInfo["ShowInList"].AsBoolean(); | 762 | } |
763 | } | 763 | } |
764 | 764 | ||
765 | return data; | 765 | return data; |