mirror of
https://github.com/TechplexEngineer/plexview.git
synced 2026-07-28 06:22:14 +00:00
I wish I could figure out how to have PlexVie be out of the LibOMV tree but its just not working die to a DLL not found exception about libopenjpeg. (Yes the dll is in the bin folder) This will do for now
43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using OpenMetaverse;
|
|
using OpenMetaverse.Packets;
|
|
using System.Text;
|
|
|
|
namespace OpenMetaverse.TestClient
|
|
{
|
|
public class GroupsCommand : Command
|
|
{
|
|
public GroupsCommand(TestClient testClient)
|
|
{
|
|
Name = "groups";
|
|
Description = "List avatar groups. Usage: groups";
|
|
Category = CommandCategory.Groups;
|
|
}
|
|
|
|
public override string Execute(string[] args, UUID fromAgentID)
|
|
{
|
|
Client.ReloadGroupsCache();
|
|
return getGroupsString();
|
|
}
|
|
|
|
string getGroupsString()
|
|
{
|
|
if (null == Client.GroupsCache)
|
|
return "Groups cache failed.";
|
|
if (0 == Client.GroupsCache.Count)
|
|
return "No groups";
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.AppendLine("got "+Client.GroupsCache.Count +" groups:");
|
|
foreach (Group group in Client.GroupsCache.Values)
|
|
{
|
|
sb.AppendLine(group.ID + ", " + group.Name);
|
|
|
|
}
|
|
|
|
return sb.ToString();
|
|
}
|
|
}
|
|
}
|