SecondBot/Core/Commands/Parcel/GetParcelBanlist.cs
Madpeterz 92bc9dceb9 group role storage and more
adds new http namespace parcelestate
adds grouprole metadata storage

adds the following http commands:
parcelestate/parcelbanlist
groups/ismember
groups/listgrouproles

Adds new core command
getparcelbanlist
2021-02-07 19:03:33 +00:00

27 lines
1 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
using static OpenMetaverse.ParcelManager;
namespace BSB.Commands.Parcel
{
class GetParcelBanlist : ParcelCommand_CheckParcel_1arg_smart
{
public override string Helpfile { get { return "Fetchs the current parcels banlist and sends it to the smart reply target on [ARG 1]"; } }
public override bool CallFunction(string[] args)
{
if (base.CallFunction(args) == true)
{
Dictionary<string, string> reply = new Dictionary<string, string>();
foreach(ParcelAccessEntry e in targetparcel.AccessBlackList)
{
string name = bot.FindAvatarKey2Name(e.AgentID);
reply.Add(e.AgentID.ToString(), name);
}
return bot.GetCommandsInterface.SmartCommandReply(true, args[0], targetparcel.Name, CommandName, reply);
}
return false;
}
}
}