2006-11-22 00:09:31 +00:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using libsecondlife;
|
|
|
|
|
using libsecondlife.Packets;
|
|
|
|
|
|
2006-11-24 22:27:15 +00:00
|
|
|
namespace libsecondlife.TestClient
|
2006-11-22 00:09:31 +00:00
|
|
|
{
|
|
|
|
|
public class PrimCountCommand: Command
|
|
|
|
|
{
|
2006-12-21 08:53:08 +00:00
|
|
|
public PrimCountCommand(TestClient testClient)
|
2006-11-22 00:09:31 +00:00
|
|
|
{
|
|
|
|
|
Name = "primCount";
|
|
|
|
|
Description = "Shows the number of prims that have been received.";
|
|
|
|
|
}
|
|
|
|
|
|
2006-12-21 08:53:08 +00:00
|
|
|
public override string Execute(string[] args, LLUUID fromAgentID)
|
2006-11-22 00:09:31 +00:00
|
|
|
{
|
2006-12-13 21:15:49 +00:00
|
|
|
int count = 0;
|
|
|
|
|
|
2007-01-04 05:41:23 +00:00
|
|
|
lock (Client.SimPrims)
|
2006-12-13 21:15:49 +00:00
|
|
|
{
|
2007-01-04 05:41:23 +00:00
|
|
|
foreach (Dictionary<uint, PrimObject> prims in Client.SimPrims.Values)
|
2006-12-13 21:15:49 +00:00
|
|
|
{
|
|
|
|
|
count += prims.Count;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return count.ToString();
|
2006-11-22 00:09:31 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|