本文整理汇总了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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}