aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs46
1 files changed, 26 insertions, 20 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index 8ea4b93..b011295 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -365,7 +365,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
365 SendScenePresenceUpdate(dataForAgentID, activeGroupTitle); 365 SendScenePresenceUpdate(dataForAgentID, activeGroupTitle);
366 } 366 }
367 367
368 private void HandleUUIDGroupNameRequest(UUID GroupID,IClientAPI remoteClient) 368 private void HandleUUIDGroupNameRequest(UUID GroupID, IClientAPI remoteClient)
369 { 369 {
370 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 370 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
371 371
@@ -595,6 +595,31 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
595 return m_groupData.GetGroupRecord(null, GroupID, null); 595 return m_groupData.GetGroupRecord(null, GroupID, null);
596 } 596 }
597 597
598 public GroupRecord GetGroupRecord(string name)
599 {
600 if (m_debugEnabled)
601 m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
602
603 // XXX: Two call implementation. This could be done in a single call if the server itself were to
604 // implement the code below.
605
606 List<DirGroupsReplyData> groups = m_groupData.FindGroups(null, name);
607
608 DirGroupsReplyData? foundGroup = null;
609
610 foreach (DirGroupsReplyData group in groups)
611 {
612 // We must have an exact match - I believe FindGroups will return partial matches
613 if (group.groupName == name)
614 foundGroup = group;
615 }
616
617 if (null == foundGroup)
618 return null;
619
620 return GetGroupRecord(((DirGroupsReplyData)foundGroup).groupID);
621 }
622
598 public void ActivateGroup(IClientAPI remoteClient, UUID groupID) 623 public void ActivateGroup(IClientAPI remoteClient, UUID groupID)
599 { 624 {
600 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 625 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
@@ -768,25 +793,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
768 return groupID; 793 return groupID;
769 } 794 }
770 795
771 public DirGroupsReplyData? GetGroup(string name)
772 {
773 if (m_debugEnabled)
774 m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
775
776 List<DirGroupsReplyData> groups = m_groupData.FindGroups(null, name);
777
778 DirGroupsReplyData? foundGroup = null;
779
780 foreach (DirGroupsReplyData group in groups)
781 {
782 // We must have an exact match - I believe FindGroups will return partial matches
783 if (group.groupName == name)
784 foundGroup = group;
785 }
786
787 return foundGroup;
788 }
789
790 public GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID groupID) 796 public GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID groupID)
791 { 797 {
792 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); 798 if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);