Now removes Friend from _Friends when TerminateFriendship packet is received. git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1491 52acb1d6-8a22-11de-b505-999d5b087335
38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using libsecondlife;
|
|
using libsecondlife.Packets;
|
|
using System.Text;
|
|
|
|
namespace libsecondlife.TestClient
|
|
{
|
|
public class FriendsCommand : Command
|
|
{
|
|
ManualResetEvent GetCurrentGroupsEvent = new ManualResetEvent(false);
|
|
|
|
public FriendsCommand(TestClient testClient)
|
|
{
|
|
Name = "friends";
|
|
Description = "List avatar friends. Usage: friends";
|
|
}
|
|
public override string Execute(string[] args, LLUUID fromAgentID)
|
|
{
|
|
List<FriendsManager.FriendInfo> friends = Client.Friends.FriendsList();
|
|
if (friends.Count > 0)
|
|
{
|
|
StringBuilder sb = new StringBuilder();
|
|
foreach (FriendsManager.FriendInfo friend in friends)
|
|
{
|
|
sb.AppendLine(friend.Name);
|
|
}
|
|
return sb.ToString();
|
|
}
|
|
else
|
|
{
|
|
return "No friends";
|
|
}
|
|
}
|
|
}
|
|
}
|