当前位置: 首页>>代码示例>>C#>>正文


C# IClientAPI.SendJoinGroupReply方法代码示例

本文整理汇总了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);
        }
开发者ID:JamesStallings,项目名称:opensimulator,代码行数:21,代码来源:GroupsModule.cs

示例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));
        }
开发者ID:AkiraSonoda,项目名称:akisim,代码行数:12,代码来源:GroupsModule.cs

示例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);

        }
开发者ID:EnricoNirvana,项目名称:WhiteCore-Dev,代码行数:49,代码来源:GroupsModule.cs

示例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));
            }
        }
开发者ID:BogusCurry,项目名称:WhiteCore-Dev,代码行数:23,代码来源:GroupsModule.cs


注:本文中的IClientAPI.SendJoinGroupReply方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。