add get group by name method to IGroupsModule
parent
19c659ca99
commit
f0703cad2c
|
@ -37,6 +37,30 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
{
|
||||
event NewGroupNotice OnNewGroupNotice;
|
||||
|
||||
/// <summary>
|
||||
/// Create a group
|
||||
/// </summary>
|
||||
/// <param name="remoteClient"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="charter"></param>
|
||||
/// <param name="showInList"></param>
|
||||
/// <param name="insigniaID"></param>
|
||||
/// <param name="membershipFee"></param>
|
||||
/// <param name="openEnrollment"></param>
|
||||
/// <param name="allowPublish"></param>
|
||||
/// <param name="maturePublish"></param>
|
||||
/// <returns>The UUID of the created group</returns>
|
||||
UUID CreateGroup(
|
||||
IClientAPI remoteClient, string name, string charter, bool showInList, UUID insigniaID, int membershipFee,
|
||||
bool openEnrollment, bool allowPublish, bool maturePublish);
|
||||
|
||||
/// <summary>
|
||||
/// Get a group given its name
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <returns>The group's data. Null if there is no such group.</returns>
|
||||
DirGroupsReplyData? GetGroup(string name);
|
||||
|
||||
void ActivateGroup(IClientAPI remoteClient, UUID groupID);
|
||||
List<GroupTitlesData> GroupTitlesRequest(IClientAPI remoteClient, UUID groupID);
|
||||
List<GroupMembersData> GroupMembersRequest(IClientAPI remoteClient, UUID groupID);
|
||||
|
@ -50,8 +74,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
|
||||
void SetGroupAcceptNotices(IClientAPI remoteClient, UUID groupID, bool acceptNotices, bool listInProfile);
|
||||
|
||||
void GroupTitleUpdate(IClientAPI remoteClient, UUID GroupID, UUID TitleRoleID);
|
||||
UUID CreateGroup(IClientAPI remoteClient, string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish);
|
||||
void GroupTitleUpdate(IClientAPI remoteClient, UUID GroupID, UUID TitleRoleID);
|
||||
|
||||
GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID GroupID);
|
||||
string GetGroupTitle(UUID avatarID);
|
||||
|
@ -67,4 +90,4 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
GroupRecord GetGroupRecord(UUID GroupID);
|
||||
void NotifyChange(UUID GroupID);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -328,17 +328,19 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
|||
}
|
||||
*/
|
||||
|
||||
|
||||
void OnDirFindQuery(IClientAPI remoteClient, UUID queryID, string queryText, uint queryFlags, int queryStart)
|
||||
{
|
||||
if (((DirFindFlags)queryFlags & DirFindFlags.Groups) == DirFindFlags.Groups)
|
||||
{
|
||||
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called with queryText({1}) queryFlags({2}) queryStart({3})", System.Reflection.MethodBase.GetCurrentMethod().Name, queryText, (DirFindFlags)queryFlags, queryStart);
|
||||
if (m_debugEnabled)
|
||||
m_log.DebugFormat(
|
||||
"[GROUPS]: {0} called with queryText({1}) queryFlags({2}) queryStart({3})",
|
||||
System.Reflection.MethodBase.GetCurrentMethod().Name, queryText, (DirFindFlags)queryFlags, queryStart);
|
||||
|
||||
// TODO: This currently ignores pretty much all the query flags including Mature and sort order
|
||||
remoteClient.SendDirGroupsReply(queryID, m_groupData.FindGroups(GetClientGroupRequestID(remoteClient), queryText).ToArray());
|
||||
}
|
||||
|
||||
remoteClient.SendDirGroupsReply(
|
||||
queryID, m_groupData.FindGroups(GetClientGroupRequestID(remoteClient), queryText).ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
private void OnAgentDataUpdateRequest(IClientAPI remoteClient, UUID dataForAgentID, UUID sessionID)
|
||||
|
@ -652,7 +654,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
|||
List<GroupRolesData> data = m_groupData.GetGroupRoles(GetClientGroupRequestID(remoteClient), groupID);
|
||||
|
||||
return data;
|
||||
|
||||
}
|
||||
|
||||
public List<GroupRoleMembersData> GroupRoleMembersRequest(IClientAPI remoteClient, UUID groupID)
|
||||
|
@ -662,8 +663,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
|||
List<GroupRoleMembersData> data = m_groupData.GetGroupRoleMembers(GetClientGroupRequestID(remoteClient), groupID);
|
||||
|
||||
return data;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public GroupProfileData GroupProfileRequest(IClientAPI remoteClient, UUID groupID)
|
||||
|
@ -746,7 +745,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
|||
return UUID.Zero;
|
||||
}
|
||||
// is there is a money module present ?
|
||||
IMoneyModule money=remoteClient.Scene.RequestModuleInterface<IMoneyModule>();
|
||||
IMoneyModule money = remoteClient.Scene.RequestModuleInterface<IMoneyModule>();
|
||||
if (money != null)
|
||||
{
|
||||
// do the transaction, that is if the agent has got sufficient funds
|
||||
|
@ -766,6 +765,25 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
|||
return groupID;
|
||||
}
|
||||
|
||||
public DirGroupsReplyData? GetGroup(string name)
|
||||
{
|
||||
if (m_debugEnabled)
|
||||
m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
||||
|
||||
List<DirGroupsReplyData> groups = m_groupData.FindGroups(null, name);
|
||||
|
||||
DirGroupsReplyData? foundGroup = null;
|
||||
|
||||
foreach (DirGroupsReplyData group in groups)
|
||||
{
|
||||
// We must have an exact match - I believe FindGroups will return partial matches
|
||||
if (group.groupName == name)
|
||||
foundGroup = group;
|
||||
}
|
||||
|
||||
return foundGroup;
|
||||
}
|
||||
|
||||
public GroupNoticeData[] GroupNoticesListRequest(IClientAPI remoteClient, UUID groupID)
|
||||
{
|
||||
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
|
||||
|
|
|
@ -470,7 +470,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
|
|||
XmlRpcCall(requestID, "groups.removeAgentFromGroupRole", param);
|
||||
}
|
||||
|
||||
|
||||
public List<DirGroupsReplyData> FindGroups(GroupRequestID requestID, string search)
|
||||
{
|
||||
Hashtable param = new Hashtable();
|
||||
|
|
Loading…
Reference in New Issue