Files
libremetaverse/libsecondlife/examples/TestClient/Commands/Friends/FriendsCommand.cs
John Hurliman 9f8e97f13b * Removed the poorly done GetType function from _Packets_.cs
* Housecleaning in FriendsManager
* Make sure LLSDString is never holding a null pointer
* Changes to Login.cs to prepare for the LLSD switch (it is not happening yet!)
* Fixed LLSD export for prims to export light/flex/sculpt data as well, importing that back in is still a TODO

git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1540 52acb1d6-8a22-11de-b505-999d5b087335
2007-12-21 02:25:36 +00:00

38 lines
1.0 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<FriendInfo> friends = Client.Friends.FriendsList();
if (friends.Count > 0)
{
StringBuilder sb = new StringBuilder();
foreach (FriendInfo friend in friends)
{
sb.AppendLine(friend.Name);
}
return sb.ToString();
}
else
{
return "No friends";
}
}
}
}