Missing wiki command plus new command

This commit is contained in:
Madpeterz 2021-02-06 11:03:05 +00:00
parent de9364a2d8
commit 63d3294580
2 changed files with 36 additions and 0 deletions

View file

@ -505,6 +505,7 @@ namespace BetterSecondBot.WikiMake
core.callable.Add(new nearmewithdetails());
core.callable.Add(new walkto());
core.callable.Add(new teleport());
core.callable.Add(new gesture());
endpoints.Add(core);
Endpoint inventory = new Endpoint();
inventory.name = "inventory";

View file

@ -0,0 +1,35 @@
using OpenMetaverse;
namespace BSB.Commands.CMD_Parcel
{
public class ParcelFreeze : CoreCommand_1arg
{
public override string[] ArgTypes { get { return new[] { "Avatar", "True|False" }; } }
public override string[] ArgHints { get { return new[] { "Avatar [UUID or Firstname Lastname]", "Status (defaults to True)" }; } }
public override string Helpfile { get { return "Freezes an avatar [ARG 1]<br/>Set to False to unfreeze"; } }
public override bool CallFunction(string[] args)
{
if (base.CallFunction(args) == true)
{
if (UUID.TryParse(args[0], out UUID target) == true)
{
bool freezethem = true;
if (args.Length == 2)
{
if (args[1] == "False")
{
freezethem = false;
}
}
bot.GetClient.Parcels.FreezeUser(target, freezethem);
return true;
}
else
{
return Failed("Arg 0 requires UUID");
}
}
return false;
}
}
}