aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/Null/NullRegionData.cs4
-rw-r--r--OpenSim/Framework/GroupData.cs2
-rw-r--r--OpenSim/Region/Framework/Interfaces/IGroupsModule.cs14
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs46
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs3
5 files changed, 38 insertions, 31 deletions
diff --git a/OpenSim/Data/Null/NullRegionData.cs b/OpenSim/Data/Null/NullRegionData.cs
index 5b9898c..30ad747 100644
--- a/OpenSim/Data/Null/NullRegionData.cs
+++ b/OpenSim/Data/Null/NullRegionData.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Data.Null
40 { 40 {
41 private static NullRegionData Instance = null; 41 private static NullRegionData Instance = null;
42 42
43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 43// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
44 44
45 Dictionary<UUID, RegionData> m_regionData = new Dictionary<UUID, RegionData>(); 45 Dictionary<UUID, RegionData> m_regionData = new Dictionary<UUID, RegionData>();
46 46
@@ -192,4 +192,4 @@ namespace OpenSim.Data.Null
192 return ret; 192 return ret;
193 } 193 }
194 } 194 }
195} 195} \ No newline at end of file
diff --git a/OpenSim/Framework/GroupData.cs b/OpenSim/Framework/GroupData.cs
index e3b8626..815946c 100644
--- a/OpenSim/Framework/GroupData.cs
+++ b/OpenSim/Framework/GroupData.cs
@@ -48,7 +48,6 @@ namespace OpenSim.Framework
48 public class GroupMembershipData 48 public class GroupMembershipData
49 { 49 {
50 // Group base data 50 // Group base data
51 //
52 public UUID GroupID; 51 public UUID GroupID;
53 public string GroupName; 52 public string GroupName;
54 public bool AllowPublish = true; 53 public bool AllowPublish = true;
@@ -61,7 +60,6 @@ namespace OpenSim.Framework
61 public bool ShowInList = true; 60 public bool ShowInList = true;
62 61
63 // Per user data 62 // Per user data
64 //
65 public bool AcceptNotices = true; 63 public bool AcceptNotices = true;
66 public int Contribution = 0; 64 public int Contribution = 0;
67 public ulong GroupPowers = 0; 65 public ulong GroupPowers = 0;
diff --git a/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs b/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs
index e357969..2c091e7 100644
--- a/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IGroupsModule.cs
@@ -55,11 +55,18 @@ namespace OpenSim.Region.Framework.Interfaces
55 bool openEnrollment, bool allowPublish, bool maturePublish); 55 bool openEnrollment, bool allowPublish, bool maturePublish);
56 56
57 /// <summary> 57 /// <summary>
58 /// Get a group given its name 58 /// Get a group
59 /// </summary> 59 /// </summary>
60 /// <param name="name"></param> 60 /// <param name="name">Name of the group</param>
61 /// <returns>The group's data. Null if there is no such group.</returns> 61 /// <returns>The group's data. Null if there is no such group.</returns>
62 DirGroupsReplyData? GetGroup(string name); 62 GroupRecord GetGroupRecord(string name);
63
64 /// <summary>
65 /// Get a group
66 /// </summary>
67 /// <param name="GroupID">ID of the group</param>
68 /// <returns>The group's data. Null if there is no such group.</returns>
69 GroupRecord GetGroupRecord(UUID GroupID);
63 70
64 void ActivateGroup(IClientAPI remoteClient, UUID groupID); 71 void ActivateGroup(IClientAPI remoteClient, UUID groupID);
65 List<GroupTitlesData> GroupTitlesRequest(IClientAPI remoteClient, UUID groupID); 72 List<GroupTitlesData> GroupTitlesRequest(IClientAPI remoteClient, UUID groupID);
@@ -87,7 +94,6 @@ namespace OpenSim.Region.Framework.Interfaces
87 void LeaveGroupRequest(IClientAPI remoteClient, UUID GroupID); 94 void LeaveGroupRequest(IClientAPI remoteClient, UUID GroupID);
88 void EjectGroupMemberRequest(IClientAPI remoteClient, UUID GroupID, UUID EjecteeID); 95 void EjectGroupMemberRequest(IClientAPI remoteClient, UUID GroupID, UUID EjecteeID);
89 void InviteGroupRequest(IClientAPI remoteClient, UUID GroupID, UUID InviteeID, UUID RoleID); 96 void InviteGroupRequest(IClientAPI remoteClient, UUID GroupID, UUID InviteeID, UUID RoleID);
90 GroupRecord GetGroupRecord(UUID GroupID);
91 void NotifyChange(UUID GroupID); 97 void NotifyChange(UUID GroupID);
92 } 98 }
93} \ No newline at end of file 99} \ No newline at end of file
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);
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
index af1018f..24ae4f7 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
@@ -352,11 +352,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
352 MemberGroupProfile.PowersMask = MemberInfo.GroupPowers; 352 MemberGroupProfile.PowersMask = MemberInfo.GroupPowers;
353 353
354 return MemberGroupProfile; 354 return MemberGroupProfile;
355
356 } 355 }
357 356
358
359
360 public void SetAgentActiveGroup(GroupRequestID requestID, UUID AgentID, UUID GroupID) 357 public void SetAgentActiveGroup(GroupRequestID requestID, UUID AgentID, UUID GroupID)
361 { 358 {
362 Hashtable param = new Hashtable(); 359 Hashtable param = new Hashtable();