Files
libremetaverse/libsecondlife/examples/TestClient/Commands/Inventory/GiveAllCommand.cs
John Hurliman 2bb6a50b08 * Rewrote GiveMoney function and created several offspring Give*Money functions
* Added GroupPowers enum courtesy of Thoys and switched GroupManager over to use it
* Renamed Simulator.SimCaps to Simulator.Caps
* Turned off Keep-Alive and Expect-100: Continue headers on Login
* Added MoneyTransactionType and TransactionFlags

git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1391 52acb1d6-8a22-11de-b505-999d5b087335
2007-09-05 01:21:36 +00:00

28 lines
713 B
C#

using System;
using System.Collections.Generic;
using System.Text;
using libsecondlife;
using libsecondlife.Packets;
namespace libsecondlife.TestClient
{
public class GiveAllCommand: Command
{
public GiveAllCommand(TestClient testClient)
{
Name = "giveAll";
Description = "Gives you all it's money.";
}
public override string Execute(string[] args, LLUUID fromAgentID)
{
if (fromAgentID == null)
return "Unable to send money to console. This command only works when IMed.";
int amount = Client.Self.Balance;
Client.Self.GiveAvatarMoney(fromAgentID, Client.Self.Balance, "TestClient.GiveAll");
return "Gave $" + amount + " to " + fromAgentID;
}
}
}