本文整理汇总了C#中IClientAPI.SendJoinGroupReply方法的典型用法代码示例。如果您正苦于以下问题:C# IClientAPI.SendJoinGroupReply方法的具体用法?C# IClientAPI.SendJoinGroupReply怎么用?C# IClientAPI.SendJoinGroupReply使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IClientAPI
的用法示例。
在下文中一共展示了IClientAPI.SendJoinGroupReply方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: JoinGroupRequest
public void JoinGroupRequest(IClientAPI remoteClient, UUID groupID)
{
if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
string reason = string.Empty;
// Should check to see if OpenEnrollment, or if there's an outstanding invitation
if (m_groupData.AddAgentToGroup(GetRequestingAgentIDStr(remoteClient), GetRequestingAgentIDStr(remoteClient), groupID, UUID.Zero, string.Empty, out reason))
{
remoteClient.SendJoinGroupReply(groupID, true);
// Should this send updates to everyone in the group?
SendAgentGroupDataUpdate(remoteClient, GetRequestingAgentID(remoteClient));
if (reason != string.Empty)
// A warning
remoteClient.SendAlertMessage("Warning: " + reason);
}
else
remoteClient.SendJoinGroupReply(groupID, false);
}
示例2: JoinGroupRequest
public void JoinGroupRequest(IClientAPI remoteClient, UUID groupID)
{
if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
// Should check to see if OpenEnrollment, or if there's an outstanding invitation
m_groupData.AddAgentToGroup(GetRequestingAgentID(remoteClient), GetRequestingAgentID(remoteClient), groupID, UUID.Zero);
remoteClient.SendJoinGroupReply(groupID, true);
// Should this send updates to everyone in the group?
SendAgentGroupDataUpdate(remoteClient, GetRequestingAgentID(remoteClient));
}
示例3: JoinGroupRequest
public void JoinGroupRequest (IClientAPI remoteClient, UUID groupID)
{
if (m_debugEnabled)
MainConsole.Instance.DebugFormat ("[Groups]: {0} called", MethodBase.GetCurrentMethod ().Name);
var requestingAgentID = GetRequestingAgentID (remoteClient);
GroupRecord record = m_groupData.GetGroupRecord (requestingAgentID, groupID, "");
if (record != null) {
// check if this user is banned
var isBanned = m_groupData.IsGroupBannedUser (groupID, requestingAgentID);
if (isBanned) {
remoteClient.SendJoinGroupReply (groupID, false);
return;
}
// invited users (not sure if this is needed really)
var invites = m_groupData.GetGroupInvites (requestingAgentID);
var invitedAgent = false;
if (invites.Count > 0) {
foreach (var invite in invites) {
if (invite.GroupID == groupID)
invitedAgent = true;
}
}
// open enrolment or invited
if (record.OpenEnrollment || invitedAgent) {
m_groupData.AddAgentToGroup (requestingAgentID, requestingAgentID,
groupID,
UUID.Zero);
m_cachedGroupMemberships.Remove (remoteClient.AgentId);
RemoveFromGroupPowersCache (remoteClient.AgentId, groupID);
remoteClient.SendJoinGroupReply (groupID, true);
ActivateGroup (remoteClient, groupID);
// Should this send updates to everyone in the group?
SendAgentGroupDataUpdate (remoteClient, requestingAgentID);
return;
}
}
// unable to join the group
remoteClient.SendJoinGroupReply (groupID, false);
}
示例4: JoinGroupRequest
public void JoinGroupRequest(IClientAPI remoteClient, UUID groupID)
{
if (m_debugEnabled)
MainConsole.Instance.DebugFormat("[GROUPS]: {0} called", MethodBase.GetCurrentMethod().Name);
GroupRecord record = m_groupData.GetGroupRecord(GetRequestingAgentID(remoteClient), groupID, "");
if (record != null && record.OpenEnrollment)
{
// Should check to see if OpenEnrollment, or if there's an outstanding invitation
m_groupData.AddAgentToGroup(GetRequestingAgentID(remoteClient), GetRequestingAgentID(remoteClient),
groupID,
UUID.Zero);
m_cachedGroupMemberships.Remove(remoteClient.AgentId);
RemoveFromGroupPowersCache(remoteClient.AgentId, groupID);
remoteClient.SendJoinGroupReply(groupID, true);
ActivateGroup(remoteClient, groupID);
// Should this send updates to everyone in the group?
SendAgentGroupDataUpdate(remoteClient, GetRequestingAgentID(remoteClient));
}
}