From 1d992217de369b349ab6236d0fdad62709d65260 Mon Sep 17 00:00:00 2001 From: Madpeter Date: Sun, 26 Apr 2020 15:45:42 +0100 Subject: [PATCH] new command: GetParcelDesc --- Core/Commands/Parcel/GetParcelDesc.cs | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Core/Commands/Parcel/GetParcelDesc.cs diff --git a/Core/Commands/Parcel/GetParcelDesc.cs b/Core/Commands/Parcel/GetParcelDesc.cs new file mode 100644 index 0000000..29477dc --- /dev/null +++ b/Core/Commands/Parcel/GetParcelDesc.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Text; +using BetterSecondBotShared.logs; +using BetterSecondBotShared.Static; +using OpenMetaverse; + +namespace BSB.Commands.CMD_Parcel +{ + + public class GetParcelDesc : CoreCommand + { + public override string[] ArgTypes { get { return new[] { "Smart"}; } } + public override string[] ArgHints { get { return new[] { "Smart reply [Channel|Avatar|http url]" }; } } + public override int MinArgs { get { return 1; } } + public override string Helpfile { get { return "Fetchs the current parcels desc and sends it to the smart reply target on [ARG 1]"; } } + + public override bool CallFunction(string[] args) + { + if (base.CallFunction(args) == true) + { + int localid = bot.GetClient.Parcels.GetParcelLocalID(bot.GetClient.Network.CurrentSim, bot.GetClient.Self.SimPosition); + return bot.GetCommandsInterface.SmartCommandReply(args[0], bot.GetClient.Network.CurrentSim.Parcels[localid].Desc, CommandName); + } + return false; + } + } +}