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


C# IClientAPI.SendMuteListUpdate方法代码示例

本文整理汇总了C#中IClientAPI.SendMuteListUpdate方法的典型用法代码示例。如果您正苦于以下问题:C# IClientAPI.SendMuteListUpdate方法的具体用法?C# IClientAPI.SendMuteListUpdate怎么用?C# IClientAPI.SendMuteListUpdate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IClientAPI的用法示例。


在下文中一共展示了IClientAPI.SendMuteListUpdate方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnMuteListRequest

        /// <summary>
        ///   Get all the mutes the client has set
        /// </summary>
        /// <param name = "client"></param>
        /// <param name = "crc"></param>
        private void OnMuteListRequest(IClientAPI client, uint crc)
        {
            if (!m_useMuteListModule)
                return;
            //Sends the name of the file being sent by the xfer module DO NOT EDIT!!!
            string filename = "mutes" + client.AgentId.ToString();
            byte[] fileData = new byte[0];
            string invString = "";
            int i = 0;
            bool cached = false;
            MuteList[] List = GetMutes(client.AgentId, out cached);
            if (List == null)
                return;
            if (cached)
                client.SendUseCachedMuteList();

            Dictionary<UUID, bool> cache = new Dictionary<UUID, bool>();
            foreach (MuteList mute in List)
            {
                cache[mute.MuteID] = true;
                invString += (mute.MuteType + " " + mute.MuteID + " " + mute.MuteName + " |\n");
                i++;
            }

            if (invString != "")
                invString = invString.Remove(invString.Length - 3, 3);

            fileData = Utils.StringToBytes(invString);
            IXfer xfer = client.Scene.RequestModuleInterface<IXfer>();
            if (xfer != null)
            {
                xfer.AddNewFile(filename, fileData);
                client.SendMuteListUpdate(filename);
            }
        }
开发者ID:JAllard,项目名称:Aurora-Sim,代码行数:40,代码来源:AuroraChatModule.cs

示例2: OnMuteListRequest

		private void OnMuteListRequest(IClientAPI client, uint crc)
		{
			//m_log.DebugFormat("[NSL MUTE LIST] Got MUTE LIST request for crc {0}", crc);

			int cnt = 0;
			string str = "";
			string url = m_RestURL + "/RequestList/";

			List<GridMuteList> mllist = SynchronousRestObjectPoster.BeginPostObject<UUID, List<GridMuteList>>("POST", url, client.AgentId);
			while (mllist==null && cnt<10) {		// retry
				mllist = SynchronousRestObjectPoster.BeginPostObject<UUID, List<GridMuteList>>("POST", url, client.AgentId);
				cnt++;
			}

			if (mllist!=null) {
				foreach (GridMuteList ml in mllist)
				{
					str += ml.muteType.ToString()+" "+ml.muteID.ToString()+" "+ml.muteName+"|"+ml.muteFlags.ToString()+"\n";
				}
			}
			else {
				m_log.ErrorFormat("[NSL MUTE LIST] Not response from mute.php");
				return;
			}

			string filename = "mutes" + client.AgentId.ToString();
			IXfer xfer = client.Scene.RequestModuleInterface<IXfer>();
			if (xfer != null)
			{
 				byte[] byteArray = System.Text.Encoding.GetEncoding("UTF-8").GetBytes(str);
				xfer.AddNewFile(filename, byteArray);
				client.SendMuteListUpdate(filename);
			}
		}
开发者ID:phantasmagoric,项目名称:InfiniteGrid-Opensim,代码行数:34,代码来源:NSLMuteListModule.cs

示例3: OnMuteListRequest

        // Apparently this is needed in order for the viewer to request the IMs.
        private void OnMuteListRequest(IClientAPI client, uint crc)
        {
            m_log.DebugFormat("[OfflineIM.V2] Got mute list request for crc {0}", crc);
            string filename = "mutes" + client.AgentId.ToString();

            IXfer xfer = client.Scene.RequestModuleInterface<IXfer>();
            if (xfer != null)
            {
                xfer.AddNewFile(filename, new Byte[0]);
                client.SendMuteListUpdate(filename);
            }
        }
开发者ID:AkiraSonoda,项目名称:akisim,代码行数:13,代码来源:OfflineIMRegionModule.cs

示例4: OnMuteListRequest

        private void OnMuteListRequest(IClientAPI client, uint crc)
        {
            m_log.DebugFormat("[MUTE LIST] List request for crc {0}", crc);
            string filename = "mutes"+client.AgentId.ToString();

            IXfer xfer = client.Scene.RequestModuleInterface<IXfer>();
            if (xfer != null)
            {
                xfer.AddNewFile(filename, GetMuteListFileData(client.AgentId));
                client.SendMuteListUpdate(filename);
            }
        }
开发者ID:zwagoth,项目名称:halcyon,代码行数:12,代码来源:MuteListModule.cs


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